esp32-c3-adblock is a DNS ad-blocker that runs on a $2 ESP32-C3 microcontroller with no external RAM required.
The project solves the problem of fitting a large ad-blocking domain list into a tiny, cheap device by storing domains as sorted 40-bit hashes in flash memory instead of keeping domain strings in RAM. A binary search across these hashes retrieves matches in roughly 10 milliseconds while using only about 50 kilobytes of RAM. This approach allows the device to block over 500,000 domains using less than 1 megabyte of flash storage, whereas conventional approaches that store domain strings in RAM would require expensive external memory modules.
The tool suits anyone building a low-cost, low-power DNS sinkhole for home networks or IoT deployments. It works best on ESP32-C3 boards, though the same hash-in-flash technique also compiles for classic ESP32 boards with 4 MB of flash. The project is designed to plug directly into a router's USB port via a USB-C dongle, requiring only a stable power source. After initial flashing via USB, both firmware and blocklists update over WiFi. Developers can supply their own blocklists and configure the device through a web dashboard.
The codebase is written in C++ and built with PlatformIO. The project has been featured in multiple technology publications and includes community contributions such as support for classic ESP32 boards beyond the primary C3 target.