M-Abozaid

    M-Abozaid/esp32-c3-adblock

    Pi-hole-class DNS ad-blocker on a $2 ESP32-C3 (no PSRAM): 537k domains as 40-bit FNV-1a hashes in flash, binary-searched. UDP DNS sinkhole + web dashboard. https://youtube.com/shorts/RaxszOUMi8E?feature=share

    networking
    adblocker
    arduino
    dns
    dns-sinkhole
    esp32
    C++
    MIT
    3.4K stars
    373 forks
    3.4K GitHub watchers
    Updated Oct 26, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    1 release in the last 90 days, the latest 21 days ago, with 6 contributors on GitHub.

    Use Cases & Benefits

    • Implements a Pi-hole-style DNS ad-blocker on a low-cost ESP32-C3 microcontroller without requiring PSRAM by storing domain hashes in flash memory.
    • Enables large-scale domain blocking with minimal RAM usage by binary searching 40-bit FNV-1a hashes stored in flash, allowing efficient ad-blocking on constrained hardware.
    • Use for creating a cost-effective, standalone network-wide ad-blocker on ESP32-C3 devices for home or small office networks.
    • Use for integrating a lightweight DNS sinkhole with a web dashboard and OTA updates into IoT environments with limited hardware resources.
    • Use for developers needing a customizable, open-source ad-blocking solution that supports frequent blocklist updates and secure LAN management.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    A Pi-hole-style DNS ad-blocker that runs on a $2 ESP32-C3 — no PSRAM required.

    📰 Featured on Tom's Hardware, XDA Developers, and Korben.

    The trick everyone misses: you don't need to keep the blocklist in RAM. Store the domains as sorted 40-bit hashes in flash and binary-search them. 140,000+ domains fit in ~0.7 MB of flash and are matched in ~10 ms, using ~50 KB of RAM.

    Most ESP32 DNS sinkholes load the blocklist (domain strings) into RAM, so they demand PSRAM. This project stores fixed 5-byte (40-bit) hashes in flash instead:

    Why 40 bits? It's the sweet spot for this flash budget. Collisions follow the birthday bound — at 141k domains you get ~0, at 537k about 1 (i.e. one unlucky domain gets over-blocked). Dropping to 32 bits would save 20% of the flash but cost ~7 collisions at 250k; going to 64 bits wastes 3 bytes per domain to solve a problem you don't have.

    The same trick works on bigger chips — it isn't a C3 workaround. On a 16 MB ESP32-S3 these hashes hold ~2.7M domains vs ~466k for strings in 8 MB of PSRAM. Hashes in flash beat strings in PSRAM basically everywhere; the C3 just makes it undeniable.

    Excerpt from the M-Abozaid/esp32-c3-adblock README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    373+245

    Open issues

    31+20

    Compared with peers in Networking

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    M-Abozaid/esp32-c3-adblock compared with Networking repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    superdesigndev/treg7.2K+65645—
    MHSanaei/3x-ui49.4K+52253134 days ago
    netbirdio/netbird30.7K+399657 days ago
    tailscale/tailscale38.7K+378653 days ago
    caddyserver/caddy78.8K+267601 day ago
    M-Abozaid/esp32-c3-adblock3.4K—2921 days ago
    Category median38.7K+39960—

    Discover Repositories

    Search across tracked repositories by name or description