Repository navigation
Description
webrtc-direct and AutoTLS /tls/ws addresses are omitted from provider records announced to delegated HTTP routers on AutoNAT-confirmed-public nodes
Version information
- kubo
v0.42.0 - go-libp2p
v0.48.0(per kubo'sgo.mod)
Description
On a publicly-reachable node with AutoTLS.Enabled = true and delegated HTTP routers
configured for provide, the provider records kubo announces to the HTTP routers are
missing the two browser-dialable transports the node otherwise advertises:
/dnsX/<...>.libp2p.direct/tcp/<port>/tls/ws(AutoTLS Secure-WebSocket)/ip4/<ip>/udp/<port>/webrtc-direct/certhash/<hash>
ipfs id lists all of the node's transports, but the record served by the routers contains
only tcp, quic-v1, and quic-v1/webtransport.
This breaks discovery for browser libp2p / Helia clients: they query the HTTP router, get
back only addresses they cannot dial (tcp/quic-v1 have no browser transport; bare
webtransport without a certhash, when present, is undialable), and the two address types a
browser can dial (/tls/ws and webrtc-direct) are never delivered. So a browser can
never connect to the node even though the node is fully reachable on those transports.
Steps to reproduce
- Run a publicly-reachable kubo 0.42 node (AutoNAT v2 confirms reachability) with:
AutoTLS.Enabled = true(a/tls/wsAutoTLS address gets provisioned)- listen addresses including
tcp,quic-v1,quic-v1/webtransport,webrtc-direct, and the AutoTLS/ws Routing.Type = customwith an HTTP router forprovide(delegated routing v1)
- Wait for AutoTLS to issue the cert and AutoNAT v2 to confirm reachability.
ipfs id— note it advertises all transports, including/tls/wsandwebrtc-direct.ipfs routing reprovide(or wait for the reprovide cycle).- Read the provider record back:
GET <router>/routing/v1/providers/<a-cid-the-node-provides>.
Observed
ipfs id (advertised):
/dns4/<ip-dashes>.<peerid-b36>.libp2p.direct/tcp/4001/tls/ws <-- AutoTLS WSS
/ip4/<ip>/udp/4001/webrtc-direct/certhash/<hash> <-- webrtc-direct
/ip4/<ip>/tcp/4001
/ip4/<ip>/udp/4001/quic-v1
/ip4/<ip>/udp/4001/quic-v1/webtransport/certhash/<h1>/certhash/<h2>
Provider record announced to / served by the HTTP router (after a fresh reprovide):
/ip4/<ip>/tcp/4001
/ip4/<ip>/udp/4001/quic-v1
/ip4/<ip>/udp/4001/quic-v1/webtransport/certhash/<h1>/certhash/<h2>
i.e. /tls/ws and webrtc-direct are dropped.
This is not the router, and not a static filter
I verified with a mock delegated HTTP router that logs the exact
PUT /routing/v1/providers body (decoding Payload.Addrs):
- On a non-public / NAT'd node (or a node whose reachability is
unknown), kubo
announces all address types to the router, including/tls/wsandwebrtc-direct.
So the routers do not strip them and there is no static address-type filter in the
provide path. - The withholding only appears once the node has AutoNAT-v2-confirmed reachable
addresses.
Root cause analysis
With GOLOG_LOG_LEVEL=...,basichost=debug, the go-libp2p addrsReachabilityTracker
(p2p/host/basic/addrs_manager.go, backed by AutoNAT v2) logs its classification:
basichost host reachable addrs updated {"reachable":[...],"unreachable":[...],"unknown":[...]}
Two observations:
webrtc-directnever appears in any ofreachable/unreachable/unknown—
AutoNAT v2 does not probe webrtc-direct, so it is never confirmed reachable.- The DNS-based AutoTLS
/tls/wsaddress is likewise not confirmed reachable by AutoNAT v2.
Once the node has a non-empty reachable set, the addresses announced in provider records
appear to be narrowed to the AutoNAT-confirmed set — which by construction excludes
webrtc-direct (never probed) and the AutoTLS /tls/ws (unconfirmed). When the reachable
set is empty (reachability unknown), kubo falls back to announcing everything, which is
why this is only observable on a genuinely public, AutoNAT-confirmed node.
Expected behaviour
Provider records announced to delegated HTTP routers should include the node's
browser-dialable transports (AutoTLS /tls/ws and webrtc-direct with certhash) when the
node is listening on and advertising them — otherwise browser/Helia clients that rely on
delegated routing can never discover a dialable address for AutoTLS/webrtc-direct-capable
kubo nodes. At minimum, webrtc-direct and AutoTLS /tls/ws should not be silently dropped
purely because AutoNAT v2 does not probe those transports.
Reproduction harness
A self-contained harness (mock delegated HTTP router that captures and decodes the
PUT /routing/v1/providers body, plus a kubo 0.42 runner via the kubo npm package) is
available on request. It demonstrates the "announces everything when reachability is
unknown" behaviour directly; the withholding requires a publicly-reachable node.
Activity
feat(kubo): force-announce browser-dialable addrs via AppendAnnounce …
feat(kubo): restore address rewriter proxy for provider records (#155)
lidel commentedon Jul 15, 2026
@Rinse12 I took a rough stab at fix in #11394 (it fixes
/wswith AutoTLS), if you only need `/webrtc-direct, then libp2p/go-libp2p#3526 should be enough. Either way, test both in #11394 and comment there if it works for you.Rinse12 commentedon Jul 16, 2026
Seems to announce perfectly now, thanks!
fix(http-routing): keep browser transports in provider records (ipfs#…
fix(http-routing): keep browser transports in provider records (#11394)
fix(kubo): remove the address rewriter proxy that now degrades provid…