0xERR0R / blocky

Fast and lightweight DNS proxy as ad-blocker for local network with many features
https://0xERR0R.github.io/blocky/
Apache License 2.0
4.39k stars 199 forks source link

Support adblock list syntax #950

Open devipasigner opened 1 year ago

devipasigner commented 1 year ago

With the latest Pi-hole update the developers added basic AdBlock style syntax support for their adlists.

I hope the same can be implemented in blocky, as it remains the only dns software without support for a compressed format. AdGuard Home, pfblocker, Pi-hole, Technitium, eBlocker all have 1 or more compressed formats supported.

Preferably, I would like the adblock style to be added just like Pi-hole. But really, any is fine (wildcard, adguard, adblock).

Occasionally, blocky will miss domains that AdGuard Home/Pi-hole catches (using the same lists) because it only supports domains/hosts.

Another problem with domains/hosts is that not all lists support it. Ive run into cases where I cant use a list at all in blocky because the maintainer dropped it/never added it in the first place. This used to be the case as well with Pi-hole.

Another voice (oisd maintainer): https://www.reddit.com/r/oisd_blocklist/comments/11s6dov/important_update_changes_to_blocklist_syntax/ Pi-hole's implementation: https://pi-hole.net/blog/2023/03/22/pi-hole-ftl-v5-22-web-v5-19-and-core-v5-16-1-released/#page-content

kwitsch commented 1 year ago

blocky supports regex lists but not the AdBlock syntax.

ThinkChaos commented 1 year ago

Found a list of syntaxes here: https://github.com/collinbarrett/FilterLists/wiki/Syntax
Supporting more should be pretty easy as long as every line is parsed independently. The AdBlock one is a bit annoying cause it's fairly complex, and we'd be throwing away most lines anyways, but doable.

EDIT: also I don't think blocky currently supports blocking subdomains without using a regex, and that's probably a bigger part of the work here.

kwitsch commented 1 year ago

EDIT: also I don't think blocky currently supports blocking subdomains without using a regex, and that's probably a bigger part of the work here.

That's correct blocking of subdomains has to be done with a Regex. Auto conversion of entries like *.example.com or ||example.com^ to the internally used Regex should be possible

johnmmcgee commented 1 year ago

EDIT: also I don't think blocky currently supports blocking subdomains without using a regex, and that's probably a bigger part of the work here.

That's correct blocking of subdomains has to be done with a Regex. Auto conversion of entries like *.example.com or ||example.com^ to the internally used Regex should be possible

Wait, so if I have a host list that has subdomains, blocky does not block them? The logs seem to tell otherwise...

devipasigner commented 1 year ago

EDIT: also I don't think blocky currently supports blocking subdomains without using a regex, and that's probably a bigger part of the work here.

That's correct blocking of subdomains has to be done with a Regex. Auto conversion of entries like *.example.com or ||example.com^ to the internally used Regex should be possible

Wait, so if I have a host list that has subdomains, blocky does not block them? The logs seem to tell otherwise...

No, if a subdomain is listed it will be blocked, however subdomains that aren't listed will NOT.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 5 days with no activity.

koalalorenzo commented 8 months ago

Any plan to re-open this feature request?

kwitsch commented 7 months ago

Since #1233 (current development version)wildcard lists are now supported.

These should be used in favor of regex since they take much less resources to store and process.

ThinkChaos commented 7 months ago

With wildcards being supported I'm not sure we really need adblock format support since as mentioned above, it's more meant for Browser adblocker extensions than DNS. We can keep this open though.

ftpd commented 6 months ago

I hope this will stay open (and, of course, implemented someday), as there are tons of popular filter lists in adblock/adguard format (EasyList stuff, for example) which I would happily add to my blocky, but currently I can't.

gspannu commented 4 months ago

AdBlock lists support should be kept open. As seed before, AGH seems to be exceedingly popular and many 'good' lists are available for AGH.

Would much appreciate if AGH style lists can be supported natively in Blocky.

zc-devs commented 3 months ago

AGH style lists can be supported natively in Blocky

Meantime, maybe somebody has developed and maintains wildcard list converted from Adguard Home list? Or maybe some converter already exists?

Edit 1 Manually converted AGH main list: AdGuardSDNSFilter.txt

ruben-sprengel commented 2 months ago

Any updates on this issue? I want to migrate from pihole to blocky and it would be nice to have native support for the AdBlock style syntax, so i can use my current pihole lists with blocky without converting and updating them each time upstream gets changes.

kwitsch commented 2 months ago

Nope no news.

All implementations I found so far use Regex in the background which have less performance than pure domain or wildcard lists in blocky.

ruben-sprengel commented 2 months ago

@kwitsch alright, thank you very much for your answer and fast reply!