M-Abozaid/esp32-c3-adblock
Pi-hole-class DNS ad-blocker on a $2 ESP32-C3 (no PSRAM): 537k domains as 40-bit FNV-1a hashes in flash, binary-searched. UDP DNS sinkhole + web dashboard. https://youtube.com/shorts/RaxszOUMi8E?feature=share
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
1 release in the last 90 days, the latest 21 days ago, with 6 contributors on GitHub.
Use Cases & Benefits
- Implements a Pi-hole-style DNS ad-blocker on a low-cost ESP32-C3 microcontroller without requiring PSRAM by storing domain hashes in flash memory.
- Enables large-scale domain blocking with minimal RAM usage by binary searching 40-bit FNV-1a hashes stored in flash, allowing efficient ad-blocking on constrained hardware.
- Use for creating a cost-effective, standalone network-wide ad-blocker on ESP32-C3 devices for home or small office networks.
- Use for integrating a lightweight DNS sinkhole with a web dashboard and OTA updates into IoT environments with limited hardware resources.
- Use for developers needing a customizable, open-source ad-blocking solution that supports frequent blocklist updates and secure LAN management.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
MIT
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
Watch-outs
No watch-outs from GStars' checks.
General guidance from repository metadata, not legal advice. How we score
From the README
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.
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:
Why 40 bits? It's the sweet spot for this flash budget. Collisions follow the birthday bound — at 141k domains you get ~0, at 537k about 1 (i.e. one unlucky domain gets over-blocked). Dropping to 32 bits would save 20% of the flash but cost ~7 collisions at 250k; going to 64 bits wastes 3 bytes per domain to solve a problem you don't have.
The same trick works on bigger chips — it isn't a C3 workaround. On a 16 MB ESP32-S3 these hashes hold ~2.7M domains vs ~466k for strings in 8 MB of PSRAM. Hashes in flash beat strings in PSRAM basically everywhere; the C3 just makes it undeniable.
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
373+245
Open issues
31+20
Compared with peers in Networking
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| superdesigndev/treg | 7.2K | +656 | 45 | — |
| MHSanaei/3x-ui | 49.4K | +522 | 53 | 134 days ago |
| netbirdio/netbird | 30.7K | +399 | 65 | 7 days ago |
| tailscale/tailscale | 38.7K | +378 | 65 | 3 days ago |
| caddyserver/caddy | 78.8K | +267 | 60 | 1 day ago |
| M-Abozaid/esp32-c3-adblock | 3.4K | — | 29 | 21 days ago |
| Category median | 38.7K | +399 | 60 | — |
Discover Repositories
Search across tracked repositories by name or description