You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discover anycast sites via NSID, falling back to id.server probes
Site discovery relied on operator-specific identification queries, so only
the six resolvers we had hand-wired reported where they actually answered
from. NSID (RFC 5001) is the general form of the same question: an EDNS
option sent empty on any query, which the answering node echoes back filled
with its own identity string. It needs no per-operator support and works on
servers that never implemented `id.server`.
`dns::nsid` sends a `. NS` carrier query with an empty NSID option — every
recursive resolver has the root NS set cached, and it keeps the probe from
leaking the domain being watched. Payloads are opaque per RFC 5001, so
printable ASCII is taken as-is and anything else is hex-encoded rather than
mangled through lossy UTF-8.
`sites::parse_nsid` scans the string's labels left to right for a known
airport code, handling the node-number suffix (`yul01`, `CS-YYZ3`) and
Quad9's `q<iata><n>` POP form. Requiring a *known* airport is deliberate:
many NSID strings are pure infrastructure (`pdns-recursor-58b7c5d77d-bjzkj`),
and inventing a location from those would be worse than showing the
operator's configured region.
`discover` now takes `Option<SiteProbe>` and tries NSID first, so every
resolver is probed — including ones the user added in the config file, which
carry no probe at all. When NSID names no place the old operator query runs
exactly as before, so nothing that already resolved to a site changed.
Verified against the live resolver list with `--once`: Lumen `US → →JFK`,
CIRA `CA → →YYZ`, DNS4EU `EU/Any → →AMS`, DNS.SB `DE/Any → →KIX`, with
Google/Cloudflare/Quad9/OpenDNS/CleanBrowsing/UltraDNS unchanged; the same
codes render in the TUI driven through a PTY, and a config-only resolver
list now reports `→YUL` and `→JFK` where it previously showed `HQ`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments