- Egyptian Developer Demonstrates How to Block Ads with an ESP32-C3 “SuperMini” Board
- The ESP32 ad blocking dongle costs just $5 to build
- 537,000 blacklisted domains are stored in the device’s 4 MB 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 if the device reboots or doesn’t work? Egyptian developer ZedAxis claims to have developed a solution that could inspire a rethink of how whitelists and blacklists are processed online.
Based on a sub-$5 ESP32-based mini board, the device somehow squeezes over 500,000 domains into a measly 4MB of onboard flash storage.
The build was demonstrated on YouTube, with the “DNS sinkhole” video seemingly showing how simple it is to set up. All the hard work has been done by ZedAxis, and the code is available through GitHub.
What is an ESP32-C3?
ZedAxis has built the compact Pi-Hole replacement from a $5 ESP32-C3 “SuperMini” board, readily available from online stores (currently £3.50 on UK Amazon). 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 connected to a power source (in this case the back of a router, but it could be a TV, console or any other always-on device with an unused USB port). Direct access to the device is available via a web panel, supports mDNS for easy discovery, and can download over-the-air (OTA) updates.
The project’s code is available on the developer’s GitHub, explaining the unusual compression that shrinks more than 500,000 domains into 4 MB of flash storage.
Isn’t that a lot of domains for 4 MB?
Look
Strictly speaking, 4MB should not be able to hold 500,000 domains. As described on the project’s GitHub, the actual number is about half that (141,000 take up “~2.5 MB of RAM”). So how do you compress the 537,000 domains into 4 MB of RAM?
The chosen board is specifically PSRAM-free (so it only has flash) and, instead of 32 or 64 bits, encodes the domains in 40-bit FNV-1a, an algorithm designed for speed and low collision rates. Therefore, 141,000 domains can be compressed into 0.7 MB of flash memory, with less than 50 KB of RAM distributed to match blacklisted advertising domains.
In most cases, the blacklist is limited to about 250,000 domains, since OTA firmware updates require about 1.3 MB of flash memory. But this can be determined when the device is configured and the first blacklist extraction is performed. Other features will be added to this project, including configuration as a DHCP server.
The big question is: could it be adopted by, say, small businesses seeking a reduction in broadband bandwidth consumed by ad networks?
Follow TechRadar on Google News and add us as a preferred source to receive news, reviews and opinions from our experts in your feeds.




