Skip to content

webrtc-direct and AutoTLS /tls/ws missing from provider records announced to delegated HTTP routers on AutoNAT-confirmed-public nodes #11369

Closed

Description

@Rinse12

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's go.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

  1. Run a publicly-reachable kubo 0.42 node (AutoNAT v2 confirms reachability) with:
    • AutoTLS.Enabled = true (a /tls/ws AutoTLS address gets provisioned)
    • listen addresses including tcp, quic-v1, quic-v1/webtransport, webrtc-direct, and the AutoTLS /ws
    • Routing.Type = custom with an HTTP router for provide (delegated routing v1)
  2. Wait for AutoTLS to issue the cert and AutoNAT v2 to confirm reachability.
  3. ipfs id — note it advertises all transports, including /tls/ws and webrtc-direct.
  4. ipfs routing reprovide (or wait for the reprovide cycle).
  5. 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/ws and webrtc-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:

  1. webrtc-direct never appears in any of reachable / unreachable / unknown —
    AutoNAT v2 does not probe webrtc-direct, so it is never confirmed reachable.
  2. The DNS-based AutoTLS /tls/ws address 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

  1. added
    need/triageNeeds initial labeling and prioritization
    on Jul 2, 2026
  2. added
    kind/bugA bug in existing code (including security flaws)
    and removed
    need/triageNeeds initial labeling and prioritization
    on Jul 15, 2026
  3. lidel commented on Jul 15, 2026

    @lidel
    Contributor

    @Rinse12 I took a rough stab at fix in #11394 (it fixes /ws with 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.

  4. Rinse12 commented on Jul 16, 2026

    @Rinse12
    Author

    Seems to announce perfectly now, thanks!

  5. added a commit that references this issue on Jul 29, 2026
    4b7a94f
  6. added a commit that references this issue on Jul 29, 2026
    843251f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)status/in-progressIn progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions