Innovative Ad-Blocking on a Budget

While many users rely on software solutions or robust hardware like a Raspberry Pi running Pi-Hole to manage intrusive online advertisements, a new project from an Egyptian developer named ZedAxis offers a compact, cost-effective alternative. By utilizing an ESP32-C3 'SuperMini' board, which costs roughly $5, the developer has created a functional 'DNS sinkhole' capable of managing an extensive list of blacklisted domains.


Compact Hardware with Surprising Capacity

The device is built on a minimal footprint, utilizing the board's onboard 4MB flash memory. Despite the limited storage space, the project manages to handle a massive volume of domain filtering. The setup is straightforward, with the board paired with a USB adapter and housed in a 3D-printed enclosure, allowing it to draw power from any active USB port, such as those found on routers, gaming consoles, or smart TVs.


Technical Optimization: Compressing the Blacklist

The core challenge of the project was fitting such a large database into 4MB of flash. The developer explains that traditional methods would not suffice; instead, the system utilizes specific data handling techniques:

  • Efficient Hashing: The project uses 40-bit FNV-1a hashing, an algorithm prioritized for speed and low collision rates.
  • Resource Management: By hashing domains, the system can process hundreds of thousands of entries while consuming minimal RAM.
  • Storage Allocation: Approximately 141,000 domains can be stored in as little as 0.7MB of flash, leaving sufficient space for over-the-air (OTA) firmware updates.

As noted on the project's GitHub repository, while the system is theoretically capable of storing over 500,000 entries, practical limitations regarding memory allocation for updates usually cap the active blacklist at around 250,000 domains.


Future Potential and Functionality

The device offers a user-friendly experience, featuring a web-based dashboard for management and support for mDNS for easy network discovery. With the code fully accessible via GitHub, the project is open for community refinement. Potential future updates to the software may include additional features such as DHCP server functionality, which could make this miniature board a viable tool for small businesses looking to save bandwidth by filtering out heavy advertising traffic at the network level.