Firefox Quietly Adds Brave’s Rust-Based Adblocker
Firefox has bundled adblock-rust, Brave’s memory-safe content blocker, into Firefox in version 149, although disabled by default.
It’s an interesting step suggesting a possible default adblocking feature in some future release, although it’s clearly just an experiment for now.
There’s no UI and no filter lists, but if you want to enable it you can do the following, according to the blog post by the VP of Privacy and Security at Brave, Shivan Kaul:
Open about:config in Firefox 149 and up and set:
privacy.trackingprotection.content.protection.enabled = trueThen, you need to give it some filter lists. You can add EasyList and EasyPrivacy:
privacy.trackingprotection.content.protection.test_list_urls = https://easylist.to/easylist/easylist.txt|https://easylist.to/easylist/easyprivacy.txtIn order to find all prefs related to the feature, just search for privacy.trackingprotection.content in about:config.
The developer found these options:
privacy.trackingprotection.content.protection.enabledto enable blockingprivacy.trackingprotection.content.annotation.enabledto enable tagging without blocking the contentprivacy.trackingprotection.content.protection.test_list_urlspipe-delimited list URLs for blockingprivacy.trackingprotection.content.annotation.test_list_urlspipe-delimited list URLs for annotationprivacy.trackingprotection.content.testingfire observer notifications when lists load (for devs)
Shivan says there seems to be two modes currently: Protection and Annotation. Protection is the classic Adblock experience where unwanted content is prevented from loading, while annotation simply tags requests for telemetry and UI but doesn’t block anything.
Perhaps the annotation mode is just for testing purposes and not meant to appear in the final release.
Brave has made strides in its adblocking engine, from writing it fully in Rust, a memory-safe, high-performance programming language designed to eliminate entire classes of vulnerabilities, to their recent work on reducing the memory usage of the engine by 75%, allowing for significantly more filters to be shipped by default.
Interestingly, Tor browser has been looking into shipping UBlock Origin, a highly popular content blocking extension, into Tor browser by default. This would bring the official Tor browser more in line with other versions such as the one shipped with Tails and Mullvad Browser, both of which have been shipping UBO by default for many years.
It’ll be interesting to see how this will play out, as there would no longer be a need for a separate adblocking extension in these projects if Firefox ships one out of the box, closing the gap between Tor browser and Firefox further.
Community Discussion