Content blocking and the filter engine
In this version JBrowser blocks trackers and ads by domain: the built-in list plus the whole-domain rules it extracts from downloaded lists. Element hiding and full Adblock Plus rules arrived in 1.5.0.
The lists#
BLOCKLIST_SOURCES in services/privacy.py:
| List | Kind |
|---|---|
| EasyPrivacy | trackers and telemetry (Adblock Plus syntax) |
| EasyList | ads (Adblock Plus syntax) |
| Peter Lowe's ad and tracking servers | hosts file |
| NoCoin | cryptominers (hosts file) |
On top of them, services/blocklist_data.py ships a built-in list of ad, tracker, miner and telemetry domains, so blocking works before anything is downloaded.
The lists refresh in the background once a week (privacy.blocklist_auto, privacy.blocklist_updated), 12 seconds
after start-up, through the global proxy if one is set. Update lists now in Settings → Privacy and security
(or the Update tracker blocklists command) refreshes them at once; Use built-in list only deletes the downloaded
ones and stops the weekly refresh.
How blocking works in this version#
BlocklistUpdater downloads every list and parse_filter_list() keeps only whole-domain rules: ||domain^ without
$domain= or first-party options, hosts-file lines and bare domains. They are written to blocklist.txt and merged
with the built-in list. PrivacyService.should_block() then blocks third-party requests to any of those domains or
their sub-domains (the request pipeline).
Everything else in EasyList and EasyPrivacy (URL patterns, exceptions, element hiding) is ignored, which is why ads served from a site's own domain, and the empty boxes of blocked ads, still show.