AdBlocker_Reborn icon indicating copy to clipboard operation
AdBlocker_Reborn copied to clipboard

Add option to control hosts sources like in AdAway

Open mikhaelkh opened this issue 8 years ago • 9 comments

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.

mikhaelkh avatar Feb 13 '17 13:02 mikhaelkh

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 avatar Feb 13 '17 13:02 aviraxp

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

aviraxp avatar Feb 13 '17 13:02 aviraxp

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.

mikhaelkh avatar Feb 13 '17 13:02 mikhaelkh

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

sm4rk0 avatar Feb 16 '17 22:02 sm4rk0

@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

mikhaelkh avatar Feb 17 '17 00:02 mikhaelkh

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.

aviraxp avatar Feb 17 '17 02:02 aviraxp

@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 ?

mikhaelkh avatar Feb 17 '17 02:02 mikhaelkh

  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.

aviraxp avatar Feb 17 '17 04:02 aviraxp

@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).

mikhaelkh avatar Feb 18 '17 14:02 mikhaelkh