esp32-c3-adblock: DNS ad blocking on a two dollar chip
esp32-c3-adblock runs a Pi-hole-class DNS ad-blocker on a 2 dollar ESP32-C3 with no PSRAM, storing 537k domains as 40-bit hashes in flash.
TL;DR: esp32-c3-adblock puts a network-wide DNS ad-blocker on a 2 dollar ESP32-C3 with no PSRAM. It fits 537,000 domains into flash as 40-bit FNV-1a hashes, binary searches them at query time, and serves a web dashboard alongside the sinkhole.
What the project is
Pi-hole is the reference point here, and the pitch is that the class of appliance usually needs a mini PC is now a 2 dollar microcontroller. The published topics confirm the framing: dns, dns-sinkhole, adblocker, esp32, esp32-c3, and arduino.
The constraint that shapes the entire design is the chip it targets. The description specifies no PSRAM, which on an ESP32-C3 means the usual trick of offloading a hash table to external memory is unavailable. Everything has to fit in internal memory and flash.
How the domain list fits
The description states 537,000 domains stored as 40-bit FNV-1a hashes, binary searched. That arithmetic is worth doing, because 40 bits is five bytes:
537,000 domains x 5 bytes = 2,685,000 bytes (about 2.56 MiB)
So the whole blocklist is a sorted array of five-byte values living in flash, with no strings and no per-entry structure. Query time becomes a binary search over that array, and the cost of a lookup is logarithmic in the number of domains rather than proportional to it.
FNV-1a is a fast non-cryptographic hash, which is the right trade here. You are not defending against an attacker choosing colliding domains, you are shrinking a list. A 40-bit truncation also makes collisions vanishingly unlikely at this scale, roughly one in a trillion per comparison.
The sinkhole is described as UDP. That is worth testing deliberately on your own network, because DNS-over-HTTPS and DNS-over-TLS clients will bypass a plain resolver entirely, and large responses that need TCP are a different code path than the one described.
How to try it
The arduino topic says where the flashing toolchain lives:
git clone https://github.com/M-Abozaid/esp32-c3-adblock.git
cd esp32-c3-adblock
ls
The project links a short demo video in its description, which is the fastest way to see the dashboard and the sinkhole working before you commit an evening to a flash.
curl -s https://api.github.com/repos/M-Abozaid/esp32-c3-adblock \
| jq '{topics: .topics, license: .license.spdx_id, language}'
The metadata
| Field | Value |
|---|---|
| Stars | 1,368 |
| Forks | 121 |
| Open issues | 9 |
| Primary language | C++ |
| License | MIT |
| Created | 19 Jun 2026 |
| Last push | 4 Oct 2026 |
| Repository size | about 1.5 MB |
Nine open issues on 1,368 stars is a very quiet issue queue for a firmware project, which reads as a project where people run it and it works rather than one where people report breakage.
MIT is a pleasant surprise in a firmware repository, and it means you are free to fork the blocklist logic into your own hardware project without license obligations.
When to use it
It makes sense when you want ad blocking for every device on a network and would rather not dedicate a small server to it. The whole point is that the hardware costs less than the enclosure.
It is also worth reading as an embedded case study. Constraining a 537,000 entry lookup into five bytes per entry on a part without PSRAM is a clean demonstration of what a sorted array and a good hash can do under a hard memory budget.
When NOT to use it
Do not expect Pi-hole’s feature surface. The description names a domain list, a UDP sinkhole and a dashboard. Anything beyond that, including per-client stats, query logging at volume, regex rules, or group management, is not claimed by the project.
If your devices are configured for DNS-over-HTTPS, a UDP-only resolver will not catch their queries no matter how large your blocklist is.
And if you already run a Raspberry Pi with Pi-hole, this trades capability for a smaller power draw, not the other way around.
Source and Accuracy Notes
- Project page: https://github.com/M-Abozaid/esp32-c3-adblock
- Source repository: M-Abozaid/esp32-c3-adblock (verified via GitHub API
html_url) - License: MIT (verified via GitHub API
license.spdx_id) - Stars at time of writing: 1,368
Related Posts
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026
dev-tools
Baguette iOS Simulator Automation Guide
Set up Baguette for iOS Simulator automation, web dashboards, device farms, gesture input, streaming, and camera testing with Xcode caveats.
5/28/2026