AdBlocker-Reborn / AdBlocker_Reborn

[Xposed Module] The reborn version of AdBlocker - Java Part
GNU General Public License v3.0
165 stars 30 forks source link

Add option to control hosts sources like in AdAway #8

Open mikhaelkh opened 7 years ago

mikhaelkh commented 7 years ago

Add option to control hosts sources like in AdAway or at least for now tell from which sources your hosts file is made and how often it updates.

aviraxp commented 7 years ago

I will introduce this feature later, that needs some time because I have to workaround the limitation Xposed brings (cannot generally read /data when module loads). But for now, I am working on other features.

aviraxp commented 7 years ago

I have told where my hosts is made. You can check into the open-source licenses in app and you will see them.

mikhaelkh commented 7 years ago

I haven't installed it yet, but I'm looking forward to test it. Anyway, list of host sources or screenshot in Readme.md would be nice.

sm4rk0 commented 7 years ago

I think you can find it here: https://github.com/aviraxp/AdBlocker_Reborn/blob/master/tools/rules2regex.py#L37

mikhaelkh commented 7 years ago

@sm4rk0 I see that this module is mainly oriented for people in China. Maybe this'll change in the future, the module is really promising. @aviraxp take a look at https://github.com/StevenBlack/hosts

aviraxp commented 7 years ago

First, the regex list you mentioned is not only aimed at Chinese users. I use it because the regex filter can cause a lot of performance issue when there are many rules, and this is the only list which is kind of universal and short.

Second, as for hosts, I am afraid thousands of lines of hosts will cause performance issue as well. I want to keep it below 2W lines and still effective. I am still searching for good hosts source with the license to use it.

mikhaelkh commented 7 years ago

@aviraxp in that case maybe hosts file support is unnecessary functionality, because AdAway handles large hosts files just fine. You still haven't told whether root is needed for this module or not. What's wrong with license at https://github.com/StevenBlack/hosts ?

aviraxp commented 7 years ago
  1. I do not modify system hosts file, thus root access is not needed. So why can this module handle hosts filter? Because I hook several fundamental methods that one app is needed generally to access network (not all). It is the restriction of Xposed itself that causes such performance issues.

  2. This hosts file is just a hosts 'repo'. Whether I have the license to use the hosts file is uncertain and not handled by Steven Black. For example, the MVPS hosts do not allow to modify the hosts file or redistribute it. Hostsfile.org hosts do not allow to redistribute it. From some case, Steven Black himself is against the rules.

mikhaelkh commented 7 years ago

@aviraxp thanks for the info. In that case maybe it would be best to have user download hosts files manually like in AdAway, if the module can handle such amount of lines. If not, leave it as is, like a bonus functionality or use root access to speed up handling hosts (I'm not sure if the latter is possible without modifying hosts file).