<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb" -->

---
title: Clever hacker fits 537,000 domains in a tiny $5 ESP32...
description: A developer built a DNS-based ad-blocker using a $5 ESP32-C3 microcontroller with only 400KB of RAM and 4MB of flash. The trick: instead of storing plaintext...
canonical: https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Clever hacker fits 537,000 domains in a tiny $5 ESP32 ad-blocking dongle — firmware uses only around 50KB of RAM and can answer blocked lookups in 10 milliseconds | daily.dev
og:description: A developer built a DNS-based ad-blocker using a $5 ESP32-C3 microcontroller with only 400KB of RAM and 4MB of flash. The trick: instead of storing plaintext...
og:url: https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb
og:image: https://api.daily.dev/og/posts/4vXm5FuKb.png
og:image:alt: Clever hacker fits 537,000 domains in a tiny $5 ESP32 ad-blocking dongle — firmware uses only around 50KB of RAM and can answer blocked lookups in 10 milliseconds
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Clever hacker fits 537,000 domains in a tiny $5 ESP32 ad-blocking dongle — firmware uses only around 50KB of RAM and can answer blocked lookups in 10 milliseconds

**[Hacker News](https://daily.dev/sources/hn)** · 7 min read · 4 upvotes · 0 comments

## Summary

A developer built a DNS-based ad-blocker using a $5 ESP32-C3 microcontroller with only 400KB of RAM and 4MB of flash. The trick: instead of storing plaintext domain names, the firmware downloads public blocklists, hashes each domain into a 40-bit FNV-1a value, sorts them, and writes the resulting table to flash. DNS queries are resolved via binary search against this hash table. The result fits 537,000 blocked domains (or ~250,000 with OTA update support retained) into 4MB of flash, uses only ~50KB of RAM at runtime, and answers blocked lookups in ~10ms. The device is designed as a low-power backup to a primary Pi-hole, powered passively from a router's USB port.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.tomshardware.com/networking/clever-hacker-fits-537-000-domains-in-a-tiny-usd5-esp32-ad-blocking-dongle-firmware-uses-only-around-50kb-of-ram-and-can-answer-blocked-lookups-in-10-milliseconds>

## Similar posts on daily.dev

- [This tiny ESP32 gadget blocks 537,000 domains while using just 50KB of RAM](https://daily.dev/posts/this-tiny-esp32-gadget-blocks-537-000-domains-while-using-just-50kb-of-ram-miptesp4w) · XDA Developers · 0 upvotes · 0 comments
- [Your home network doesn't need Pi-hole — an $8 ESP32 blocks ads just as well for a fraction of the cost](https://daily.dev/posts/your-home-network-doesn-t-need-pi-hole-an-8-esp32-blocks-ads-just-as-well-for-a-fraction-of-the-c-zxf5m6v3g) · XDA Developers · 2 upvotes · 0 comments
- [Network-wide ad blocking with a Raspberry Pi Zero is easier than you think, but the Wi-Fi problem is real](https://daily.dev/posts/network-wide-ad-blocking-with-a-raspberry-pi-zero-is-easier-than-you-think-but-the-wi-fi-problem-is-bdjhgjkky) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#iot](https://daily.dev/tags/iot), [#embedded](https://daily.dev/tags/embedded), [#dns](https://daily.dev/tags/dns)

[View this post on daily.dev](https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Clever hacker fits 537,000 domains in a tiny $5 ESP32 ad-blocking dongle — firmware uses only around 50KB of RAM and can answer blocked lookups in 10 milliseconds","url":"https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb"},"datePublished":"2026-07-19T16:41:15.073Z","dateModified":"2026-07-19T17:22:33.123Z","description":"A developer built a DNS-based ad-blocker using a $5 ESP32-C3 microcontroller with only 400KB of RAM and 4MB of flash. The trick: instead of storing plaintext...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aa39a765465aba0857113213c04dcbd8?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aa39a765465aba0857113213c04dcbd8?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/clever-hacker-fits-537-000-domains-in-a-tiny-5-esp32-ad-blocking-dongle-firmware-uses-only-around-4vxm5fukb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"iot,embedded,dns","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Clever hacker fits 537,000 domains in a tiny $5 ESP32 ad-blocking dongle — firmware uses only around 50KB of RAM and can answer blocked lookups in 10 milliseconds"}]}
```

