ESP32-C3 Adblock
This project demonstrates a DNS ad-blocker that runs on a low-cost ESP32-C3 microcontroller by storing domain hashes in flash memory instead of RAM. This approach allows for efficient ad-blocking without the need for expensive hardware like PSRAM.
Why it matters
It provides a highly cost-effective and resource-efficient method for network-level ad blocking using commodity hardware.
A Pi-hole-style DNS ad-blocker that runs on a $2 ESP32-C3 — no PSRAM required .
📰 Featured on Tom's Hardware , XDA Developers , and Korben .
The trick everyone misses: you don't need to keep the blocklist in RAM. Store the domains as sorted 40-bit hashes in flash and binary-search them. 140,000+ domains fit in ~0.7 MB of flash and are matched in ~10 ms, using ~50 KB of RAM .
query in ──▶ extract domain ──▶ FNV-1a hash (+ parent suffixes) ──▶ binary-search the flash hash table ├─ hit ──▶ answer 0.0.0.0 (sinkholed) └─ miss ──▶ forward to upstream resolver, relay the reply Why this is interesting Most ESP32 DNS sinkholes load the blocklist (domain strings ) into RAM, so they demand PSRAM. This project stores fixed 5-byte (40-bit) hashes in flash instead:
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in