Repository navigation
dns: add unblock detection diagnostics - #173
Merged
Merged
Conversation
Cd1s
added a commit
that referenced
this pull request
Oct 25, 2026
Fixes found in the QA review of PR #173: - DoT: connect, TLS handshake and exchange share one 2 s deadline (a server that accepts TCP and stays silent no longer hangs the run); DoH refuses redirects and keeps no connections; certificates are always verified. - Whole run: 8 queries in flight, 11 s hard deadline with a partial result (truncated/probed/total), a resolver that never answers its first 4 queries is not asked again, one detection at a time (409), at most 20 custom domains that must be plain domain names (400 otherwise, never dropped). - API: POST only, token scope operate; CLI shares the same limits. - Judging: rows whose trusted query failed are not judged; below 50% working trusted queries the report is "cannot tell" with no enable / block_ips recommendation. An ISP timeout/error is an error, not a block. A block page address needs >= 2 registered domains (eTLD+1 subset), never returned by the trusted resolver for any name, and not in the same /16 as the trusted answer (regional CDNs). The built-in list has one name per company. - The trusted resolver is always asked encrypted (also with protocol: udp); plain 1.1.1.1 only tells whether port 53 is hijacked, including NXDOMAIN style blocks. udp is recommended only when that probe works and is clean. - ISP servers are asked in configured order (the helper's order), each server's answer is in the report; the report says how every name is blocked, shows latency (answered queries only) and the errors. - Panel: compact list that fits 360 px, loud "cannot tell" banner, the button is disabled while running, "fill from detection" only merges (never turns the switch off, never drops addresses, never goes plaintext). - Tests: DoT/DoH against local TLS servers, limits, judging, API, a node driven UI test; lab scenario 12 now parses the JSON with python (the old negative grep could never match) and covers trusted-down; lab gets --plain-cf and tools/lab/dot-standin.py. Docs list the probe names and the privacy impact. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
|
Pushed Blocking
Should-fix
Tests / evidence
Known limits (documented): A records only; eTLD+1 is a subset, same-company names typed by the user can still share edge addresses (the /16 guard covers most regional-CDN cases, not all); a trusted server without DoT/DoH (or without a certificate valid for its address) yields "cannot tell". A CGI cannot see the browser giving up; the run is bounded by the 11 s deadline and the 409 single-flight guard instead (the panel waits 15 s). 🤖 Generated with Claude Code |
Fixes found in the QA review of PR #173: - DoT: connect, TLS handshake and exchange share one 2 s deadline (a server that accepts TCP and stays silent no longer hangs the run); DoH refuses redirects and keeps no connections; certificates are always verified. - Whole run: 8 queries in flight, 11 s hard deadline with a partial result (truncated/probed/total), a resolver that never answers its first 4 queries is not asked again, one detection at a time (409), at most 20 custom domains that must be plain domain names (400 otherwise, never dropped). - API: POST only, token scope operate; CLI shares the same limits. - Judging: rows whose trusted query failed are not judged; below 50% working trusted queries the report is "cannot tell" with no enable / block_ips recommendation. An ISP timeout/error is an error, not a block. A block page address needs >= 2 registered domains (eTLD+1 subset), never returned by the trusted resolver for any name, and not in the same /16 as the trusted answer (regional CDNs). The built-in list has one name per company. - The trusted resolver is always asked encrypted (also with protocol: udp); plain 1.1.1.1 only tells whether port 53 is hijacked, including NXDOMAIN style blocks. udp is recommended only when that probe works and is clean. - ISP servers are asked in configured order (the helper's order), each server's answer is in the report; the report says how every name is blocked, shows latency (answered queries only) and the errors. - Panel: compact list that fits 360 px, loud "cannot tell" banner, the button is disabled while running, "fill from detection" only merges (never turns the switch off, never drops addresses, never goes plaintext). - Tests: DoT/DoH against local TLS servers, limits, judging, API, a node driven UI test; lab scenario 12 now parses the JSON with python (the old negative grep could never match) and covers trusted-down; lab gets --plain-cf and tools/lab/dot-standin.py. Docs list the probe names and the privacy impact. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cd1s
force-pushed
the
feat/dns-unblock-detect
branch
from
October 25, 2026 18:06
112724b to
2521a7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mr dns unblock detect [--json] [DOMAIN ...]diagnostics.1.1.1.1:53, using UDP, DoT, or DoH through the standard library.dns.unblock.detectAPI and add the DNS page detection button plus “Fill from detection” form action.12-dns-unblock-detect.sh, mock API data, tests, and documentation.Why
Operators use different DNS blocking addresses and techniques by region. Detection must discover likely block-page addresses and whether plaintext DNS is intercepted without changing router configuration. The panel only fills the form; applying the recommendation still uses the existing plan/apply/confirm flow.
This PR depends on #171 (built-in DNS unblock core).
Verification
go test ./...go vet ./...sh tools/ci.sh—ALL CHECKS PASSED12-dns-unblock-detect.sh: repeated block-page address, single-CDN false-positive guard, and UDP/53 interception all pass.