Project

General

Profile

Actions

Feature #14838

open

Full support for AdBlock-style lists

Added by Andre Brait 7 months ago.

Status:
New
Priority:
Normal-package
Assignee:
-
Category:
pfBlockerNG
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:

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
  • 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"

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

No data to display

Actions

Also available in: Atom PDF