# A $2 ESP32-C3 runs a Pi-hole-style DNS ad-blocker with 537,000 domains and no PSRAM

Original title: ESP32-C3 Adblock

> Hacker News story 49986862 · language: en · submitted 2026-10-07
> Web version: https://zeli.app/story/49986862
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 189 · by [jayhoon](<https://news.ycombinator.com/user?id=jayhoon>) · 💬 82
[original](<https://github.com/M-Abozaid/esp32-c3-adblock>) · [HN discussion](<https://news.ycombinator.com/item?id=49986862>)

## Summary

This project packs a Pi-hole-style DNS sinkhole into a $2 ESP32-C3 by storing 537,000 domains as sorted 40-bit FNV-1a hashes in flash and binary-searching them, using only ~50 KB of RAM. It answers blocked lookups in ~10 ms, forwards everything else, and serves a web dashboard with OTA updates. The trick beats string-in-RAM approaches and scales to millions of domains on larger chips.

## Key quote

> Hashes in flash beat strings in PSRAM basically everywhere; the C3 just makes it undeniable.

## HN discussion (82 comments)

### [timvdalen](<https://news.ycombinator.com/item?id=49989399>)

> \> The trick everyone misses:
>
> Please just write the first sentence of your README yourself

### [muti](<https://news.ycombinator.com/item?id=49987489>)

> Weird how the readme talks about hash collisions, but not in the way I would expect. Two blocked domains with the same hash isn't a problem, they both need to be blocked.
>
> Where hash collisions matter is false positives, e.g. if hash(google.com) = hash(adserver.com). There does appear to be a web dashboard and /unblock api so should be straightforward to resolve.

### [yoavm](<https://news.ycombinator.com/item?id=49989497>)

> If you're ever thinking about getting an ESP32-C3, do yourself a favor and get the variant that you can connect an external antenna to. The normal C3 has a built-in antenna that is extremely weak, making it useless for most things I was planning using it for.

### [BLKNSLVR](<https://news.ycombinator.com/item?id=49988699>)

> I'm a bit of a paranoid freak that likes lists, so I've got a PiHole that has a total list of 14-16M blocked domains.
>
> Great idea, and good for casual blocking, but I'm almost moving to an "allow list" mindset. This solution would probably work better for that, I wonder if the good parts of the internet would fit into an 140k list.

### [1vuio0pswjnm7](<https://news.ycombinator.com/item?id=49987962>)

> Whitelist/allowlist is easier, e.g., it's smaller
>
> Depends on the user but not everyone is visiting new websites everyday
>
> Even for those that are, the number of domain-IP mappings needed will be relatively small
>
> Definitely under 140,000
>
> Most DNS data I use is "static", it rarely changes.  As such most times I don't have to make DNS queries.  I store the domain-IP mappings in proxy memory; this is faster than DNS
>
> No "blocklist" needed

---

## Cite

- Page: https://zeli.app/story/49986862
- Date: 2026-10-07
- Source: github.com (https://github.com/M-Abozaid/esp32-c3-adblock)
- Hacker News: https://news.ycombinator.com/item?id=49986862

## Other languages

- zh: https://zeli.app/zh/story/49986862 · markdown: https://zeli.app/zh/story/49986862.md
- ja: https://zeli.app/ja/story/49986862 · markdown: https://zeli.app/ja/story/49986862.md
- ko: https://zeli.app/ko/story/49986862 · markdown: https://zeli.app/ko/story/49986862.md
- de: https://zeli.app/de/story/49986862 · markdown: https://zeli.app/de/story/49986862.md
- es: https://zeli.app/es/story/49986862 · markdown: https://zeli.app/es/story/49986862.md
- ru: https://zeli.app/ru/story/49986862 · markdown: https://zeli.app/ru/story/49986862.md
