AutoTLS: support multiple forge providers so a node can announce more than one /tls/ws domain

Open
#11,484 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
14/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start in core/node/libp2p/addrs.go, where a single p2pforge.NewP2PForgeCertMgr is built from the AutoTLS.DomainSuffix settings, and trace how the /tls/ws listener and address factory consume that one manager. The design is still open (the config shape is explicitly up for discussion), so agree on the Providers schema with maintainers before coding. Done would mean one address per configured forge, with one failing forge not blocking the others.

Written by the indexing model from the issue text.

Description

Checklist

  • This is a feature request, not a bug report
  • I have searched the existing issues (no prior request for more than one AutoTLS provider)

Motivation

AutoTLS makes a node browser-dialable by getting a /dns4/<ip>.<peerid>.libp2p.direct/tcp/4001/tls/ws address with a Let's Encrypt certificate from a single p2p-forge deployment. For many networks that address is the only address a browser can use: /webrtc-direct and /webtransport are often disabled client-side because of certhash rotation and handshake flakiness, and the pending Chrome SDP-munging removal (libp2p/specs#672) makes them harder to rely on.

That makes the forge a single point of failure for browser reachability. On 2026-10-31 the libp2p.direct zone was re-delegated to registrar parking nameservers and every AutoTLS name went NXDOMAIN (ipshipyard/p2p-forge#97). Nodes kept their certificates, kept announcing the dead address, and reported nothing wrong, while no browser could reach any of them.

Kubo already supports pointing at a self-hosted forge via AutoTLS.DomainSuffix, AutoTLS.RegistrationEndpoint and AutoTLS.CAEndpoint, but only one. A node must choose between the public good and a private forge. Operators who want redundancy cannot have it.

Proposal

Allow a node to register with more than one forge and announce one /tls/ws address per forge, so a browser that fails DNS on one name can dial the other.

Sketch (config shape is open to bikeshedding):

"AutoTLS": {
  "Enabled": true,
  "Providers": [
    { "DomainSuffix": "libp2p.direct" },
    {
      "DomainSuffix": "example.net",
      "RegistrationEndpoint": "https://registration.example.net",
      "CAEndpoint": "https://acme-v02.api.letsencrypt.org/directory"
    }
  ]
}
  • The existing top-level DomainSuffix / RegistrationEndpoint / CAEndpoint / RegistrationToken keep working and are treated as a single-entry Providers list.
  • Today core/node/libp2p/addrs.go builds exactly one p2pforge.NewP2PForgeCertMgr(WithForgeDomain(...)). This would build one manager per provider, each with its own certmagic storage directory.
  • The /tls/ws listener needs a tls.Config whose GetCertificate picks the certificate by SNI across the managers (certmagic already selects by SNI within one manager, so this is a thin dispatcher).
  • AutoWSS / address factory appends one /dns4/<ip>.<peerid>.<suffix>/tcp/<port>/tls/ws per provider that has a certificate.
  • Failure of one forge (registration or renewal) must not block the others; a provider that is NXDOMAIN or fails to renew should log and drop only its own address.

Use case

We run a small public network of Kubo nodes whose browser clients connect over WSS only. Once this lands we would self-host a p2p-forge under our own domain and configure nodes with both libp2p.direct and our forge, so an outage of either keeps browsers connected. Without this, self-hosting means dropping libp2p.direct entirely, which just moves the single point of failure.

Related

  • ipshipyard/p2p-forge#97 (the outage)
  • #11460 (manual TLS cert for a custom-domain WSS listener) covers the "bring your own certificate" case; this issue is about a second forge-managed domain with automatic issuance.
Dominant language
Go
Stars
17.2k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipfs/kubo

All issues in ipfs/kubo

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.