Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We definitely need Wildcard+Regex support in host/domain name #842

Open
maxdad opened this issue Dec 10, 2016 · 4 comments
Open

We definitely need Wildcard+Regex support in host/domain name #842

maxdad opened this issue Dec 10, 2016 · 4 comments

Comments

@maxdad
Copy link

maxdad commented Dec 10, 2016

A typical AdAway generate host file is now over 2MB, over 60,000 lines.
There are so many dumb repeats due to lack of Wildcard and Regex.

It is so bad to see things like ;
1.abc.com
2.abc.com
...
on and on again

How about this ---
In custom filter we support wildcard in this syntax: .domain.[suffix]
And regex can take dnsmasq regex patch syntax using a pair of :: to indicate regex inside, such as:
:..domain..:
This will achieve exact same result as wildcard format ".domain.", but of course regex has much more flexibility.

Then when we merge with downloaded list, we can remove any line that matches our custom filter.

I did a quick experiment, I can easily cut down number of lines to almost 1/5, andresulted hosts file is less than 500KB vs 2MB. I am sure it can be shrunk even more with better written patterns.

@0-kaladin
Copy link
Contributor

Hosts file doesn't take regex. Using dnsmasq isn't trivial but would allow regex matching.

@maxdad
Copy link
Author

maxdad commented Dec 10, 2016

Ah that is right, hosts file is dumb...we will have to switch to use dnsmasq underneath if we want regex...
Let me do some research. I believe dnsmasq is shipped with every android by default, we might just need to tweak some things.

@weedy
Copy link

weedy commented Dec 11, 2016

There are other ad blocking apps that fake being VPNs. They are able to do much smarter filtering and traffic inspection.
This might just be a sign that it's time to graduate from adaway.

@originalsouth
Copy link

Relevant for OISD users, see this update on their behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants