Clever hacker fits 537,000 domains in a $5 ESP32 ad-blocking dongle
Budget-Friendly Ad-Blocking: A $5 ESP32 Powerhouse
An ingenious developer has managed to cram a massive database of 537,000 blocked domains into a tiny, inexpensive ESP32 ad-blocking dongle. This impressive feat of engineering allows the firmware to operate using only about 50KB of RAM while maintaining a lightning-fast response time of approximately 10 milliseconds for blocked lookups.
"Free," if you're willing to salvage some used hardware that's being thrown away.
While high-end solutions exist, the current market—characterized by what some call the RAMageddon—has seen the price of even a basic Raspberry Pi climb significantly. However, as Egyptian full-stack developer ZedAxis (known as @M-Abozaid on GitHub) has demonstrated, you don't need a hundred-dollar setup to filter your network traffic.
🛠️ The Hardware Breakdown
ZedAxis utilized an ESP32-C3 "SuperMini" board. Unlike the more expensive variants of the ESP32 family, this specific chip is a cost-optimized version.
Technical Specifications
| Component | Specification | Note |
|---|---|---|
| RAM | No external PSRAM | |
| Flash Memory | Used for the domain list | |
| Cost | \approx \5$ | Extremely budget-friendly |
| Latency | Rapid DNS response |
Because the ESP32-C3 lacks the of PSRAM found in higher-end models, storing a standard plaintext blocklist was impossible. To overcome this, ZedAxis implemented a clever hashing trick.
🧠 The Technical "Magic"
To fit over half a million domains into just of flash, the developer avoided storing the actual strings of the URLs. Instead, the system likely employs a hashing mechanism (similar to a Bloom filter) where the domain is converted into a numerical representation.
The logic can be simplified as:
This allows the device to verify if a domain is on the "blacklist" without needing to store the full text of the domain name.
// Conceptual representation of the hashing lookup
bool isBlocked(String domain) {
uint32_t hash = calculateHash(domain);
if (flash_memory[hash].isSet()) {
return true; // Domain is blocked
}
return false; // Domain is allowed
}
🌐 Network Architecture
In ZedAxis's home environment, this dongle isn't the primary defense but rather a critical fail-safe.
The Setup:
- Primary DNS: A
Pi-hole(Raspberry Pi) managing DHCP and DNS. - Secondary DNS: The
ESP32-C3SuperMini.
📋 Project Requirements & Goals
- Minimize hardware cost (Target: \le \5$)
- Maintain low memory footprint ( RAM)
- Support blocked domains
- Ensure low latency ()
- Provide redundancy for
Pi-hole
🖼️ Visual References
Below are the associated assets and database insights related to the hardware landscape:
Deep-Dive Insights:

While the community hasn't seen a live, third-party verified demonstration of every single domain being blocked, the capabilities of the ESP32 family make this project entirely plausible. It proves that with creative software optimization, you can achieve enterprise-level filtering on consumer-grade, "throwaway" hardware.