- Egyptian developer demonstrates how to block ads with an ESP32-C3 “SuperMini” board
- ESP32 ad blocking dongle only costs $5 to build
- 537,000 blacklisted domains are stored in the device’s 4MB of flash memory
When online ads become a problem, ad blocking software is a good idea, used in conjunction with dedicated hardware like a Raspberry Pi running Pi-Hole. But what happens if the device restarts or is out of order? Egyptian developer ZedAxis says it has developed a solution that could prompt a rethink of how online whitelists and blacklists are handled.
Building on a sub-$5 ESP32-based mini-board, the device somehow packs more than 500,000 domains into a paltry 4MB of onboard flash storage.
The build was demonstrated on YouTube, with the “DNS sinkhole” video apparently showing how simple it is to set up. All the hard work was done by ZedAxis, with the code available via GitHub.
What is an ESP32-C3?
ZedAxis built the compact Pi-Hole replacement from a $5 “SuperMini” ESP32-C3 board, readily available from online stores (currently £3.50 on Amazon in the UK). These devices feature USB-C for power, Bluetooth 5.0, and, most importantly for a project like this, Wi-Fi.
The board has been paired with a USB adapter and a 3D printed case to allow it to be plugged into a power source – in this case the back of a router, but it could be a TV, console or other always-on device with an unused USB port. Direct device access is available via a web dashboard, it supports mDNS for easy discovery, and can download updates over-the-air (OTA).
The project code is available on the developer’s GitHub, where the unusual compression that shrinks more than 500,000 domains to 4MB of flash storage is explained.
Isn’t that a lot of domains for 4MB?
Look on it
Strictly speaking, 4MB should not be able to hold 500,000 domains. As described on the project’s GitHub, the actual figure is about half that (141,000 occupying “~2.5MB of RAM”). So how are the 537,000 domains packed into 4MB of RAM?
The card chosen is specifically free of PSRAM (so it only has flash) and rather than 32-bit or 64-bit, hashes domains in 40-bit FNV-1a, an algorithm designed for speed and low collision rates. So 141,000 domains can be compressed into 0.7 MB of Flash, with less than 50 KB of RAM allocated to match blacklisted advertising domains.
In most cases, the blacklist is limited to around 250,000 domains because OTA firmware updates require around 1.3 MB of flash memory. But this can be determined when the device is configured and the first blacklist extract is performed. More features are expected to be added to this project, including configuration as a DHCP server.
The big question is whether this could be adopted by, say, small businesses looking to reduce the broadband bandwidth consumed by ad networks?
Follow TechRadar on Google News And add us as your favorite source to get our news, reviews and expert opinions in your feeds.




