denzilrdz/esp32-s3-adblock
关于
Pi-hole-style DNS ad blocker for the ESP32-S3 (N16R8). Blocks ads and trackers for your whole network, sends other lookups over encrypted DNS-over-TLS (Cloudflare/Quad9), caches answers in PSRAM and updates its blocklist daily. DNS rewrites, settings backup/restore, scheduled reboots, browser installer, secure dashboard, OTA updates with rollback.
系统与基础设施可以做什么
- Quick setup - Flash from Chrome/Edge with one click, pick your Wi-Fi on your phone, set a password, point the router at it.
- Blocks for the whole network - Up to 900,000 domains in PSRAM; one entry blocks a domain and all its subdomains.
- Your ISP stops seeing your lookups - Allowed queries leave encrypted (DNS-over-TLS, with DNS-over-HTTPS fallback), unlike a plain sinkhole.
- Maintenance-free - The blocklist updates itself daily; firmware updates are one button on the dashboard, with rollback.
实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文esp32-s3-adblock
A Pi-hole on a tiny board. Network-wide ad and tracker blocking with encrypted DNS, running on a small ESP32-S3 board powered over USB.
Install from the browser · Try the dashboard demo · Quick start · Router setup · How it works · Architecture
It blocks ads, trackers and malware domains for every device on your network (phones, TVs, laptops, no apps to install), sends all other lookups to Cloudflare or Quad9 encrypted with DNS-over-TLS so your ISP can't read them, and refreshes its blocklist every day on its own. No Raspberry Pi, no SD card, no OS to patch.
Highlights
| Feature | What you get |
|---|---|
| Quick setup | Flash from Chrome/Edge with one click, pick your Wi-Fi on your phone, set a password, point the router at it. |
| Blocks for the whole network | Up to 900,000 domains in PSRAM; one entry blocks a domain and all its subdomains. |
| Your ISP stops seeing your lookups | Allowed queries leave encrypted (DNS-over-TLS, with DNS-over-HTTPS fallback), unlike a plain sinkhole. |
| Maintenance-free | The blocklist updates itself daily; firmware updates are one button on the dashboard, with rollback. |
| Fast | Blocklist and answer cache live in RAM: repeat lookups are answered in milliseconds. |
| Dashboard | http://s3adblock.local: live stats, clients, your own block/allow rules, pause blocking, settings. |
| Temporary DNS rewrites | Point a name at your own IP or another domain for 15 min to 24 h (nas.home → 192.168.1.20); ends by itself. |
| Backup and scheduled reboot | Export all settings and rules to one file and import them on any board; optional daily or weekly reboot. |
| Secure by default | Password set with a one-time code from the serial console, login lockout, CSRF and DNS-rebinding guards. |
| Tiny and low-power | Runs from any stable 5 V USB supply; no computer to keep running. |
[!NOTE] Early release, in daily use on an ESP32-S3-DevKitC-1 (N16R8). Tested on hardware: Wi-Fi setup (including hidden networks and a wrong password), DNS-over-TLS, blocking and bans, the daily blocklist update and its "not modified" check, failover to Quad9 and recovery after an internet outage, plain-DNS fallback on and off, the dashboard, over-the-air updates and automatic rollback of a bad update, and weeks of continuous running without a restart. Expect some rough edges; please report issues.
Contents
- How it compares
- Quick start
- Features
- Hardware and requirements
- How it works
- Configuration
- Updating firmware
- Limitations
- Troubleshooting
- Development · Roadmap · Support · Credits
How it compares
| esp32-s3-adblock | Pi-hole on a Raspberry Pi | Original esp32-c3-adblock | |
|---|---|---|---|
| Hardware | ESP32-S3 board, USB-powered | Pi + SD card + power supply | ESP32-C3 board |
| Upkeep | no OS or SD card; one-click firmware updates | OS updates, SD card wear | no OS or SD card |
| Upstream DNS | encrypted (DoT, DoH fallback) | plain by default | plain UDP to 9.9.9.9 |
| Blocklist | up to 900k domains, in PSRAM | millions, on disk | read from flash |
| Failed list update | old list stays active | old list stays active | can leave no list loaded |
| Dashboard login | login screen, hashed password, setup code, lockout | password | Basic Auth |
| Answer cache | yes (PSRAM) | yes | no |
| Local DNS records | timed rewrites: IPv4, IPv6, CNAME, *. wildcards |
permanent A/AAAA and CNAME | no |
| Slow upstream answer | other queries keep flowing; SERVFAIL at 2.5 s | other queries keep flowing | stalls every client |
| DHCP server, IPv6 DNS | not yet | yes | no |
Quick start
You need an ESP32-S3-DevKitC-1 (N16R8) (or another board with that module), a USB data cable, a 2.4 GHz Wi-Fi network and admin access to your router.
1. Flash
Open the web installer in Chrome or Edge, plug the board in (DevKitC-1: the port marked UART), click Install AdBlock and pick the serial port (erasing the device is recommended for a first install). It takes about a minute.
Or build and flash from source (macOS/Linux/Windows with PlatformIO)
git clone https://github.com/denzilrdz/esp32-s3-adblock && cd esp32-s3-adblock
cp src/secrets.example.h src/secrets.h # optional Wi-Fi + OTA password, see comments
pio run -e esp32s3 -t upload # flash firmware over USB
pio device monitor -e esp32s3 # watch it boot
Needs PlatformIO (CLI or the VS Code extension) and Python 3.11+.
2. Connect it to Wi-Fi
On first boot the device opens an access point S3-AdBlock-XXXX. Join it from a
phone; a setup page appears. Tap your network (only 2.4 GHz networks work; Other
network for a hidden one) and enter its password; the device restarts and joins it. (Or put WIFI_SSID/WIFI_PASS in src/secrets.h.) Hold the
BOOT button while powering on to forget Wi-Fi. Once it has joined a network, it
waits for that network at boot (retrying every 5 to 30 s) and never opens the setup
network on its own, so a router that is slow to come back after a power cut or a
scheduled reboot is fine. Changed the router's Wi-Fi password? Hold BOOT while
powering on (or use Forget Wi-Fi in the dashboard) to enter the new one.
3. Set the dashboard password
The serial console prints a one-time setup code. To see it, click Install
AdBlock in the web installer again, pick the port and choose Logs & Console (not
Install; press Reset Device if it stays empty), or run pio device monitor.
Open http://s3adblock.local (or the device IP) and log in as admin with the setup
code. The Set a dashboard password banner asks for the code again and a new password
(10+ characters); then log in with the new password. Until a password is set, nothing
can be changed, so nobody else on your network can claim the device.
The dashboard always opens on a login screen and shows nothing before you log in. You stay logged in while it is open (up to 24 h); Log out is in the top bar, and changing the password logs out every browser.
While you're there, pick your time zone under Settings → Time & scheduled reboot (default UTC; the page offers your browser's zone) so the daily list update runs at night for you. Restoring a board? Device → Backup & restore → Import settings brings back everything you exported before.
4. Point your network at it
Give the device a fixed IP (DHCP reservation in the router), then set the router's DHCP DNS server to that IP and leave the secondary DNS empty.
[!WARNING] IPv6 (most fibre and cable routers): the router also advertises its own IPv6 DNS, and devices will use it to skip the blocker. Turn off IPv6 DNS advertisement or IPv6 on the LAN. The blocker is designed for home networks, where IPv4 alone is sufficient. Some ISP routers lock the DNS fields; the guide lists workarounds. Full walkthrough and checks: docs/ROUTER_SETUP.md.
5. Check it works
From any computer on the network (replace 192.168.1.50 with the device's IP):
$ dig @192.168.1.50 doubleclick.net +short
0.0.0.0
$ dig @192.168.1.50 example.com +short
<one or more real IP addresses>
The first name is blocked; the second gets a real answer, fetched over DNS-over-TLS. After the router change, the dashboard's Clients tab should fill up with your devices and the Overview should show a rising share of queries blocked.
Features
- Network-wide blocking: up to 900,000 domains held in PSRAM (lookups are served from RAM); a listed domain also blocks its subdomains; your own block and allow rules.
- Temporary DNS rewrites: answer a name (or every subdomain with
*.example.com) with an IPv4/IPv6 address or alias it to another domain (CNAME) for 15 minutes to 24 hours. Handy for testing a server before its DNS changes, reaching a LAN device by name, or pointing a site somewhere else for a while. They survive a reboot and end on their own. - Encrypted upstream DNS: DNS-over-TLS to Cloudflare (1.1.1.1) and Quad9 (9.9.9.9) by fixed IP, certificates verified, TLS sessions resumed; DNS-over-HTTPS fallback; plain DNS only as a last resort (and you can switch that off).
- Stays up: health-tracked fallback chain with backoff, answers within 2.5 s or a clean SERVFAIL, PSRAM answer cache, watchdog on every task, automatic rollback of bad firmware updates, Wi-Fi supervision.
- Self-updating blocklist: daily at 02:00 local time (configurable). Unchanged lists aren't downloaded again (ETag); a bad download never replaces the working list.
- Backup and restore: export every setting, the reboot schedule, the blocklist URL and time, your block/allow rules and banned clients to one JSON file, and import it on the same or a new board. A file with an error changes nothing.
- Scheduled reboot (optional): every day or once a week at a time you pick, in the device's time zone, never twice in a day and never right after a start.
- Privacy extras: query padding, DNSSEC "validated" flag pass-through, local answers for private names, and Firefox's DoH canary so Firefox keeps using it.
- Dashboard at
http://s3adblock.local: live stats, upstream health with a one-click test of every upstream, clients, block/allow rules, DNS rewrites, pause blocking, settings (with dropdowns for time zones, times and TTLs), firmware and blocklist uploads, settings backup, and a one-click update check. - Secure by default: hashed dashboard password set with a one-time code from the serial console, login lockout, CSRF and DNS-rebinding checks, HTTPS-only list downloads, LAN-only DNS answers.
Hardware and requirements
| Board | Status | Notes |
|---|---|---|
| ESP32-S3-DevKitC-1, WROOM-1-N16R8 | Supported | 16 MB flash, 8 MB octal PSRAM. |
| Other ESP32-S3 boards with an N16R8 module | Should work | Needs 16 MB flash and 8 MB octal PSRAM (qio_opi). |
Only the ESP32-S3 is supported: the blocklist and DNS cache live in PSRAM, and the partition table needs 16 MB of flash.
Power: any stable 5 V USB supply: a phone charger, a computer, or a router's USB port if it has one. Cheap or loose cables can brown out the board during Wi-Fi transmission; if it reboots randomly, try another cable or charger. Keep the PCB antenna away from metal.
You also need:
- A USB data cable and a 2.4 GHz Wi-Fi network.
- Admin access to your router, to set its DHCP DNS server (and ideally turn off IPv6 DNS advertisement).
- For the web installer: Chrome or Edge on a computer. To build from source: PlatformIO (CLI or the VS Code extension) and Python 3.11+.
How it works
flowchart LR
C([Client query]) --> IO[dns_io task]
IO -->|local name| L[Answer on the device]
IO -->|rewritten| RW["Your IP, or a CNAME<br/>to another domain"]
IO -->|blocked| B["0.0.0.0 / :: / NODATA"]
IO -->|cached| K[Answer from PSRAM cache]
IO -->|otherwise| U[upstream task]
U --> DOT["DNS-over-TLS<br/>Cloudflare, Quad9"]
DOT -.->|port 853 blocked| DOH[DNS-over-HTTPS]
DOH -.->|all encrypted upstreams down| P[plain DNS]
Blocking. Domains are stored as 48-bit hashes in a bucketed index (65,536 buckets).
For a.b.ads.example.com the device checks the name and each parent down to
example.com, so one list entry blocks a whole subtree. Your allowlist wins over
everything, then your custom blocklist, then the main list. Blocked A queries get
0.0.0.0, AAAA gets ::, and anything else (including the HTTPS records modern
browsers ask for) gets an empty answer, never NXDOMAIN.
Rewrites. A rewrite answers a name with your own address before the blocklist is
consulted (it also works while blocking is paused; banned devices stay blocked). An IP
rewrite answers A or AAAA and leaves the other types empty, so a real IPv6 or
HTTPS answer can't slip past it. A domain rewrite answers with a CNAME and resolves
that domain for the client, following other rewrites on the way. Answers carry a TTL
of at most 30 seconds, so devices let go of a rewrite soon after it ends.
Encrypted DNS. Allowed queries go to Cloudflare or Quad9 over DNS-over-TLS (port 853), connecting by IP and verifying the provider's certificate name, so no plaintext lookup is needed to find the resolver. Your ISP then sees only an encrypted connection to 1.1.1.1 or 9.9.9.9, not the names you look up. You do trust Cloudflare or Quad9 with those names instead (pick the order on the dashboard). If port 853 is blocked the device uses DNS-over-HTTPS (port 443). Only when every encrypted upstream is down does it fall back to plain DNS, and it says so loudly in the log and on the dashboard. Why not run a full recursive resolver like Unbound on the chip? See ARCHITECTURE.md §13: it's slow on this CPU and would actually show the ISP more.
Cache. Answers are cached in PSRAM with their real TTLs, so repeat lookups are answered locally in milliseconds.
Daily update. At 02:00 local time (plus a few random minutes), once the clock is
synced over NTP, the device fetches the list over verified HTTPS. A list is only installed
after its header, size, checksum and ordering check out; otherwise the current list
stays and it retries hourly. The default list (StevenBlack + Hagezi Light, about
100k domains, social and messaging apps keep working) is rebuilt daily by this
repository's CI and published at
https://github.com/denzilrdz/esp32-s3-adblock/releases/download/blocklist/blocklist.bin.
If the sources didn't change, the file isn't re-uploaded and boards skip the download.
Design details, memory budget and threading: docs/ARCHITECTURE.md.
Configuration
Everything is on the dashboard at http://s3adblock.local (stored in flash/NVS,
survives updates). Its overview shows the block rate, live queries per minute, how
queries were answered, upstream health and per-client totals; the charts are drawn from
what the page has seen since it opened (light and dark themes).
| Setting | Default |
|---|---|
| Primary / secondary upstream | Cloudflare / Quad9 (or a custom DoT server: IP + TLS name) |
| DoH fallback / plain-DNS fallback | on / on |
| Query padding, DNSSEC AD pass-through | on |
| Blocked answer TTL | 10 s |
| Firefox DoH canary / iCloud Private Relay opt-out / local private reverse lookups | on / off / on |
| Blocklist URL and daily update time | this repo's daily list, 02:00 |
| Time zone | UTC (50 zones in a dropdown, or any POSIX TZ string) |
| Scheduled reboot | never (or every day / every week at a set time) |
| Custom block / allow rules, banned clients, pause | |
| DNS rewrites (up to 64, each 15 min to 24 h) | none |
src/secrets.h only holds first-boot defaults (Wi-Fi, initial dashboard password, the
network OTA password). It is gitignored.
Backup and restore
Device → Backup & restore → Export settings downloads one JSON file
(s3adblock-settings-<date>-<time>.json) with everything in the table above except
DNS rewrites, plus your block/allow rules and banned clients. Passwords and Wi-Fi
are never in it, so it is safe to keep with your notes. Import settings takes that
file back, on the same board after an erase or on a second board:
- The whole file is checked first; one bad value (named in the error, e.g.
rules.block: invalid domain "ads..com") and nothing changes. - Each section in the file replaces that part of the device (rules and bans as whole lists); a section you delete from the file leaves that part as it is. You can edit the file by hand.
- Changing the upstream DNS restarts the device; everything else applies at once.
- Scripts:
curl -u admin:<password> http://s3adblock.local/api/settings/export -o settings.jsonandcurl -u admin:<password> -H 'X-Requested-With: adblock' -F [email protected] http://s3adblock.local/api/settings/import.
Scheduled reboot
The device doesn't need regular restarts, but if you want one (for example after a router that misbehaves until clients reconnect), set Settings → Time & scheduled reboot to Every day or Every week and pick the day and time (device time zone). The dashboard shows the next one. It waits for the clock to be set, never reboots twice in one day (also when daylight saving time repeats an hour), skips a day if the device started less than 10 minutes before, and if it was off or busy (installing firmware) at that time it tries for an hour and then waits for the next one. The reason shows under Device → Health → Last restart.
DNS rewrites
Rewrites answers a name with an address or another domain for a set time. Type the domain, the answer (an IPv4 address, an IPv6 address or a domain name) and pick a duration from 15 minutes to 24 hours:
| You enter | Clients get |
|---|---|
nas.home → 192.168.1.20 |
A 192.168.1.20; AAAA and other types get an empty answer |
nas.home → fd00::20 (as well) |
AAAA fd00::20 too: a name can have one IPv4 and one IPv6 answer |
*.staging.example.com → test-server.home |
every subdomain (not the name itself) gets a CNAME to test-server.home |
yt.home → restrict.youtube.com |
a CNAME plus the target's real addresses, looked up over encrypted DNS |
- An exact name beats a wildcard; the longest wildcard wins. A name gets addresses or an alias, not both, and an alias chain (followed through your other rewrites) may be at most 8 names long; loops are refused when you add them.
- Adding the same name and kind again replaces its answer and restarts its time.
- Names the device answers itself (
localhost,.local, private reverse lookups, the Firefox/iCloud canaries) can't be rewritten. - Rewrites are kept in flash with their end time. After a reboot they come back once the clock is synced (NTP), minus the time the board was off.
- Scripts:
curl -u admin:<password> -H 'X-Requested-With: adblock' -d d=nas.home -d t=192.168.1.20 -d m=60 http://s3adblock.local/api/rewrites/add(m= minutes, 1 to 1440;/api/rewrites/removetakesdandt).
Health check for monitoring
GET /api/health needs no password, so an uptime monitor can poll it every few
minutes without holding the admin login. It returns a small JSON object and changes
nothing (other methods get 405):
{
"ok": true,
"issues": [],
"version": "0.8.0",
"uptimeS": 12345,
"blocking": true,
"blocklist": {
"entries": 812345,
"lastOk": true,
"successAgeH": 5,
"nextUpdateInH": 17,
"lastResult": "ok"
},
"upstream": { "encrypted": true, "plainFallback": false },
"heapBlock": 51234,
"heapMin": 40000,
"rssi": -58,
"timeSynced": true,
"restartCause": "poweron",
"dns": {
"queries": 1000,
"blocked": 150,
"forwarded": 300,
"cached": 540,
"servfail": 2,
"udpDropped": 0,
"rateLimited": 0,
"answerMsAvg": 1.4,
"upstreamMsAvg": 45.6
},
"cache": { "hits": 540, "entries": 900 },
"heapFree": 140000,
"psramFree": 2000000,
"sockets": { "used": 9, "max": 16 },
"fsUsedPct": 31,
"tempC": 47.3,
"wifiReconnects": 0,
"bootCount": 12,
"crashCount": 1,
"livenessOk": true,
"otaPending": false,
"otaRolledBack": false,
"build": "a1b2c3d"
}
Counters (dns.*, cache.hits, wifiReconnects) are totals since the last boot;
compute rates on your side. bootCount and crashCount are kept across restarts.
answerMsAvg is how long the board takes to answer (cache hits, blocked names and
forwarded queries alike) and upstreamMsAvg how long the encrypted upstream takes on
cache misses, each averaged over the last 5 minutes (at most 256 answers; 0.0 with
none). udpDropped counts queries the board discarded (malformed, non-LAN sender);
queries lost when the network stack's 6-packet receive buffer overflows can't be
counted with the prebuilt libraries. rateLimited counts queries refused because one
client had too many in flight, or from a banned client. fsUsedPct (measured every 10
minutes) is null right after boot, tempC is null if the sensor can't be read,
successAgeH is null and nextUpdateInH is -1 until the clock is synced. build
is the git commit the firmware was built from.
ok is true when issues is empty. Alert on ok == false and show issues:
| Issue | Meaning |
|---|---|
blocking_off |
Blocking is paused |
blocklist_empty |
No blocklist loaded |
blocklist_stale |
Last successful list update more than 48 h ago (only once the clock syncs) |
blocklist_update_failed |
The latest list update failed |
plain_fallback |
DNS is going out unencrypted (plain fallback) |
upstream_down |
No encrypted upstream is working |
heap_low |
Largest free RAM block under 32 KB (a new TLS connection may fail) |
crashed |
The last restart was a crash or watchdog reset |
clock_unsynced |
Clock still not synced 10 min after boot |
wifi_weak |
Wi-Fi signal below -80 dBm |
dns_slow |
Answers took over 200 ms on average (5 min, at least 20 answers) |
socket_pressure |
14 or more of the 16 network sockets in use |
queries_dropped |
10 or more queries discarded or refused in the last 10 minutes |
fs_low |
Not enough flash left to download the next blocklist |
temp_high |
Chip above 80 °C |
task_stalled |
A watched task stopped making progress (the board restarts itself soon after) |
ota_rolled_back |
A firmware update was rolled back since the last boot |
The response never includes client addresses, names, settings, URLs or crash
details, but anyone on your network can read it (firmware version and build
included). Example: curl http://s3adblock.local/api/health.
Your own blocklist
python3 tools/build_blocklist.py my.bin # default sources
python3 tools/build_blocklist.py my.bin hosts.txt https://... # hosts files, domain lists, AdGuard ||rules^
Upload my.bin under Blocklist & rules → Upload list, or host it on HTTPS and set it as the list URL. For a
bigger list, Hagezi's pro-onlydomains.txt (~370k) fits easily on the S3.
Updating firmware
- From the dashboard (v0.1.2 and later): the dashboard checks for a newer release
when it opens (since v0.2.0; older versions: Device → Check for updates) and shows
a banner when there is one. Device → Download & install fetches it into the
browser from this project's GitHub Pages site and installs it through the normal
upload. Settings, Wi-Fi and the blocklist are kept. Forks: build with
-DUPDATE_BASE_URL=\"https://<you>.github.io/<repo>/\". - Manual file: Device → Install a firmware file manually → Flash firmware with
firmware-esp32s3-vX.Y.Z.binfrom a release (not the largerfactory-…image, which is for first installs; the board rejects it). Settings, Wi-Fi and the blocklist are kept. v0.1.0 can't update itself this way: install v0.1.1 or later over USB once (see the changelog). - Over the network: set
OTA_PASS(10+ characters) insecrets.h, thenpio run -e esp32s3 -t upload --upload-port s3adblock.local --upload-protocol espota --upload-flags="--auth=<OTA_PASS>".
New firmware has to prove itself (Wi-Fi up, DNS running for a minute). If it crashes or doesn't get there within 5 minutes, the device rolls back to the previous version.
Limitations
- YouTube and similar ads come from the same domains as the videos: DNS can't block them without breaking the site.
- IPv6 DNS from the router and browser/OS secure DNS (Firefox DoH set by hand, Chrome custom secure DNS, Android Private DNS, iCloud Private Relay) bypass any DNS blocker. See docs/ROUTER_SETUP.md.
- Devices with hard-coded DNS (some TVs) need a router firewall rule.
- The dashboard is plain HTTP (login form + session cookie): fine on a home LAN you trust, not on a shared network.
- No DHCP server (yet): your router must hand out the device as DNS.
- DNS is served over IPv4 only.
Troubleshooting
| Symptom | Fix |
|---|---|
| Ads still show on some devices | They use another DNS (IPv6, private DNS, hard-coded). Check the client table and ROUTER_SETUP.md §6. |
| Dashboard shows Plain DNS in use | Ports 853 and 443 to 1.1.1.1/9.9.9.9 fail from your network. Check with kdig @1.1.1.1 +tls example.com from a computer. |
| A standby upstream shows down | Usually left over from a short outage: standbys are only used when the active one fails. Click Test all upstreams under Upstream DNS. |
| "clock not synced" stays | NTP (UDP 123) to 162.159.200.1 / pool.ntp.org is blocked; the daily update waits for the clock. |
| Blocklist "invalid list" | The URL isn't a format-v2 file (tools/build_blocklist.py output), or the download was cut off. The old list stays active. |
| Dashboard asks to log in again | Normal after 24 h, 30 min after closing the tab, or after a password change. Right after updating from v0.2.5, reload the tab once. |
| Can't log in, "too many failed logins" | Wait (30 s to 5 min) or use another device. Forgot the password: erase flash (pio run -e esp32s3 -t erase) and flash again. |
| Installer finds no serial port | Use a data USB cable, not a charge-only one. If the board's LED stays off, turn the USB-C plug over (some boards work one way round only). |
| Installer can't connect or fails | Hold BOOT, tap RST, release BOOT, try again. Close other programs using the port (serial monitors, the Arduino IDE). |
| Board boot-loops after flashing | Wrong memory type: N16R8 must use qio_opi (the esp32s3 env does). |
| Random reboots | Power: try another USB cable/port. Check the reset reason in the boot log. |
More (serial logs, crash decoding, memory): .claude/skills/debugging/SKILL.md.
Development
tools/setup-dev.sh # pinned tools in .venv (uv) + git hooks
pio test -e native # unit tests on your computer, with sanitizers
tools/coverage.sh # coverage report
tools/format.sh; tools/lint.sh
Contributions are welcome: see CONTRIBUTING.md and the Code of Conduct. Changes are listed in CHANGELOG.md.
Roadmap
Planned (details in ARCHITECTURE.md §15): signed firmware images, DNS over IPv6, an optional DHCP server, and certificate date checks.
Support
- Questions and bugs: open an issue. Include the boot log from the serial console and your firmware version.
- Security problems: please don't open a public issue. Report them privately as described in SECURITY.md.
Credits
- M-Abozaid/esp32-c3-adblock by zed: the original hash-in-flash blocker this project is built on (MIT).
- s60sc/ESP32_AdBlocker: the original "answer 0.0.0.0 on an ESP32" idea (ideas only; no code used).
- Blocklists: StevenBlack/hosts and Hagezi DNS blocklists.
- ESP Web Tools for the browser installer.
License
MIT. See LICENSE (original copyright retained).
If it blocks something it shouldn't, add it to the allowlist on the dashboard, or tell us so the default list improves.
探索相关项目
加载中…