Feature #14838
openFull support for AdBlock-style lists
0%
Description
The AdBlock syntax allows for both blacklisting and whitelisting, as well as using wildcards and sometimes plain regular expressions. Many popular lists make use of such features. Currently, pfBlockerNG only supports parsing simple non-wildcard blacklist entries, as long as they obey the format `^[|]{2}.*[^]$`.
Support can be improved, especially for the Python mode.
- Unbound mode:
- Whitelist entries with wildcards (limited)
- Using grep with regexes to rule out entries from the blacklists
- Whitelist entries with wildcards (limited)
- Python mode
- Blacklist entries with wildcard support
- Requires filtering 100% inside Python
- Whitelist entries with wildcard support
- Probably better and easier if done 100% inside Python
- Default "re" engine might be too slow, better to import "regex"
- Blacklist entries with wildcard support
References:
1. https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters
2. https://adguard.com/kb/general/ad-filtering/create-own-filters/
Some of it is already implemented in this PR: https://github.com/pfsense/FreeBSD-ports/pull/1302
Updated by Bojack Robot about 1 month ago
[ I'm currently lost in a wood full of RedMine & Github tabs :) ]
Would anyone be so kind to provide an update on this issue please?
https://github.com/pfsense/FreeBSD-ports/pull/1302
-> When I follow this, this leads to:
https://github.com/pfsense/FreeBSD-ports/pull/1343
but there it ends... and it seems to be superseded by only Python related issues ?
My personal goal for the moment is to use the OISD feed with PfblockerNG, and I'm surely not the only one:
https://www.reddit.com/r/pfBlockerNG/comments/18vz00e/comment/kfwiu04/
https://www.reddit.com/r/pfBlockerNG/comments/112gdpr/comment/kfvn4qr/
https://oisd.nl/setup/pfblockerng
Would it be an idea to separate this issue / feature (Full support for AdBlock-style lists) into a Python part and an unbound part ?
Also: currently the OISD list is present in the feeds section
https://oisd.nl/
feed https://dbl.oisd.nl/
but the link to the actual list (dbl.oisd.nl) is outdated (https://github.com/sjhgvr/oisd/issues/1
)
These are very probably related, just thought I mention it.
BTW:
https://raw.githubusercontent.com/sjhgvr/oisd/refs/heads/main/oisd_big.txt
https://raw.githubusercontent.com/sjhgvr/oisd/refs/heads/main/domainswild2_big.txt
seem to both load fine... and do work, but then only with the 'wacky' wildcard blocking feature ;)
Thanks in advance!