Skip to content
DnsLister Forum

Where domain hunters compare notes

a 153 times faster esp32 adblocker with 650k+ domains

https://github.com/NikoMalik/esp32-block

A network-wide ad/tracker blocker on a cheap ESP32. It runs as a DNS server for your home: normal domains resolve as usual, ad/tracker/malware domains get answered with 0.0.0.0 so they never load. One small box, every device on the WiFi benefits, no app to install on phones or TVs.

Fork of M-Abozaid/esp32-c3-adblock. This fork targets the classic ESP32 (also builds for C3)

~645,000 domains (ads, trackers, malware, plus Russian lists 🙂 ) live in flash as 40-bit hashes in a bucketed index, memory-mapped and looked up on the device – no PSRAM needed.

The blob is memory-mapped (esp_partition_mmap): the CPU reads it straight through the flash cache like RAM, so steps 2-3 are just a few cache-line reads. That is the main speed win. The earlier design kept the list as a LittleFS file and did one random filesystem read per lookup (~1.2 ms); mmap + buckets dropped that to 8 us 150x faster, ~123k lookups/sec.

Source: r/esp32 · by /u/ILYAMALIK

Leave a Reply

Your email address will not be published. Required fields are marked *