
Zed (@M-Abozaid) published a DNS ad-blocker on GitHub that runs on a $2 ESP32-C3 with no PSRAM. Most ESP32 DNS sinkholes load blocklist domain strings into RAM, which is why they need PSRAM. This one stores each domain as a sorted 40-bit FNV-1a hash in flash and binary-searches it. Over 140,000 domains fit in about 0.7 MB of flash, match in roughly 10 ms, and use about 50 KB of RAM.
The 40-bit width is a deliberate pick. At 141k domains collisions are near zero, and at 537k there is about one over-blocked domain. A 32-bit hash would save 20% of the flash but produce around seven collisions at 250k domains.
There is a UDP DNS sinkhole, a web dashboard at c3adblock.local, WiFi captive portal setup, and OTA updates for both firmware and blocklist. On a 4 MB board, firmware OTA needs two app slots, leaving about 1.3 MB for the list, so roughly 250k domains. The 537k “ultimate” list requires the single-app partition table. A printable case for the C3 SuperMini is included.
See more on GitHub.
from Adafruit Industries – Makers, hackers, artists, designers and engineers! https://ift.tt/3cz84vV
via IFTTT










