-
-
Notifications
You must be signed in to change notification settings - Fork 144
Adguard Home support - opportunity to contribute #223
Comments
Why adguard ? Is a Russian based service located in Cipro. I prefer use nextdns, usa service located in california who have to respect the new CCPA regulation for privacy Russia is very dangerous at the moment |
It's not the Adguard service, it's the Adguard Home open-source project: https://github.com/AdguardTeam/AdGuardHome Think of it like Pihole. |
AdguardHome uses identical syntax as the standard adblock rules. I will create a combined list in this syntax as it will also enable the use of the notracking lists in (most) browser based adblockers. |
Awesome to hear! I’ve been running a script locally to do this, so glad it will have first level support. |
Regarding the scripts, see: notracking/hosts-blocklists-scripts#2 adblock list is being tested now.. |
hostname filters (subdomains) should be translated into:
This will make a proper adblockplus based list slightly larger |
is used to create a whilelist or exception rule. For hostnames (where one doesn't want to match subdomains), the following syntax works.
This will only match "ads.goodreads.com" exactly. "test.ads.goodreads.com" will not match the rule. So, if I were to use your example, and just match hostnames (not subdomains), I would just write:
|
I cannot find that syntax in the adblockplus documentation, testing in uBlock also shows that the single pipe variant is not working. The option with whitelisting is also not desirable, not sure if i can get the same coverage with the adblockplus standard.. |
The syntax I posted was based off of the Adguard Home documentation However, I did a bit of research, and found documentation on Adblock Plus' website that suggests the syntax is close to what I posted, albeit different by one character:
So a "pipe sandwhich", basically. |
That's for address matching only, the address also includes the protocol etc, eg: So far only the |
The adblockers that do support mixed content filters, threat For now I will only add support for tools that separate hostname from (wildcard)domain base filtering (like dnsmasq / dnscrypt-proxy). I'm not saying that the Adblock Plus standard, or branches of that are worse forms of implementing a filtering syntax, but they do serve a different purpose being browser based extensions. Browser based adblockers have way more context (actual request source etc.) on the requested host queries and are therefore more precise in using of exception rules ($document, $third-party etc.). For tooling that provides a DNS service I do find it a bit silly if they choose to implement anything other than having a domain en hostname separated syntax. Using AdblockPlus syntax for dns based filtering is like using a spoon to cut steak... |
First of all, thank you very much for your lists which I've been using for quite some time. However - and please pardon my ignorance - I'm having trouble to see the problem here. Using your example from above,
We agree that this is what we want. But you're saying that it is not okay that, e.g.,
is blocked as well. Quite frankly, I have a hard time to understand why it would be a realistic scenario that I've had this problem of understanding since using your lists. Why does it make sense that (using 2 examples from your hostnames.txt), e.g.,
are blocked but
are not? In other words, I doubt that the distinction between domains.txt and hostnames.txt is based on a realistic scenario. Why is the distinction between domains and sub-domains within one list not sufficient? But perhaps I'm missing something ... FWIW, the AdGuardHome list compiled by mmotti is exclusively using the |
You raise a very valid question. Though technically it is still better to separate the hostnames. I must agree that the likelihood of running in to problems using only a domain style list is small, but I do need to run some tests to make sure. You made me reconsider merging everything over to domain style lists only. |
AdblockPlus list has been added: Enjoy! |
Thank you! Running in my Adguard Home install, and testing in uBlock Origin right now. |
I'm using the list with AdGuard Pro on my iPhone and iPad, so far without any problems! Thank you very much! |
Just for info: Unfortunately, this doesn't work any more as the list has grown too large causing a tunnel crash. This doesn't affect AdGuard Home, though. |
That's a shame, since network filters (unlike regex or wildcard) are extremely resource efficient if implemented correctly. 100k network filters is almost nothing (5MB of memory using the AdblockPlus libs (see nBlock source code). There is still some room to reduce this version of the blocklist as there are some dupes in there because of the change to domain only filtering. I always try to keep it as small as possible, but full coverage will trump that. |
Since I started running Adguard Home, and I really appreciate the work you've done by building and optimizing this blocklist, I'd like to contribute back by adding output supported natively by Adguard Home.
They use a simplified version of the Adblock syntax, detailed here: https://github.com/AdguardTeam/AdGuardHome/wiki/Hosts-Blocklists#adblock-style
It appears that this repo is intended to hold the scripts that build the blocklist, but the official script hasn't been committed yet.
Would it be possible to see it committed so that I can put a pull request together to start generating AGH compatible blocklists?
I can always do this at home using a quick AWK script, but I figured it would be better to contribute back to the project, if possible.
The text was updated successfully, but these errors were encountered: