Repository navigation
Conversation
The N0 preset only adds PkarrResolver for wasm targets; native builds resolve
through DNS TXT records alone. n0's DNS zone can lag behind the pkarr store, so
an endpoint that is published and fully resolvable over HTTPS still fails with:
Error: No addressing information available
0: Discovery service failed
1: Discovery produced no results for <endpoint id>
Add PkarrResolver::n0_dns() as a second, DNS-independent lookup path on native
targets. Reproduced here while the TXT record returned NXDOMAIN from 1.1.1.1,
8.8.8.8 and the authoritative ns1.iroh.link, while
https://dns.iroh.link/pkarr/<z32> served the record (HTTP 200, 208 bytes).
Refs rustonbsd#54
|
Closing this — the diagnosis behind it was wrong, and I don't want to leave a misleading PR open. I claimed n0's DNS zone was not serving the endpoint TXT record. That was based on querying So the zone is healthy and there is nothing to fix here. My "before" reproduction was also an Apologies for the noise. (For what it's worth, the extra HTTPS lookup path does not bypass a |
Fixes the native-target half of #54.
Problem
On non-wasm targets the
N0preset wires up onlyDnsDiscovery— thePkarrResolver(HTTPS
GET https://dns.iroh.link/pkarr/<z32>) is added forwasm_browseronly:So a native
iroh-sshclient depends entirely on n0's DNS zone staying in sync with thepkarr store. When it does not, dialling a perfectly reachable peer fails with:
which is exactly the report in #54.
Evidence
While the TXT record was missing, the pkarr record was served normally:
The endpoint was up and its SSH port reachable the whole time; only discovery failed.
Fix
Add the pkarr HTTPS resolver as a second lookup path on native targets.
Builder::discoveryappends, and iroh races the configured resolvers, so this is additive — healthy DNS setups
are unaffected.
No new dependencies (the resolver is already in iroh, and is already compiled in for wasm),
no CLI changes, no behavioural change when DNS works.
Verification
With the TXT record returning
NXDOMAINand the pkarr record at HTTP 200/208 bytes:Error: No addressing information available(the Bug:address look up #54 report)-Lforward bound,HTTP 200from the service behind itI also keep an explicit-relay dial available in a separate branch (
--relay-urlpinning thepeer's home relay) as a fallback for networks where n0 discovery is blocked entirely, but that
requires knowing the peer's relay and does not fix the common case this patch addresses.