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
logger.Fatal(fmt.Sprintf("Invalid configuration: AutoTLS.Enabled=true requires a catch-all Addresses.Swarm listener ending with %q to be present, see https://github.com/ipfs/kubo/blob/master/docs/config.md#autotls", wssWildcard))
-[🎯 AutoTLS: Automatic Certificates for libp2p WebSockets via `libp2p.direct`](#-autotls-automatic-certificates-for-libp2p-websockets-via-libp2pdirect)
10
+
-[📦️ Boxo and go-libp2p updates](#-boxo-and-go-libp2p-updates)
11
11
-[📝 Changelog](#-changelog)
12
12
-[👨👩👧👦 Contributors](#-contributors)
13
13
14
14
### Overview
15
15
16
16
### 🔦 Highlights
17
17
18
+
#### 🎯 AutoTLS: Automatic Certificates for libp2p WebSockets via `libp2p.direct`
18
19
19
-
#### go-libp2p updates
20
+
This release introduces an experimental feature that significantly improves how browsers can connect to Kubo node.
21
+
Opt-in configuration allows Kubo nodes to obtain CA-signed TLS certificates for [libp2p Secure WebSocket (WSS)](https://github.com/libp2p/specs/blob/master/websockets/README.md) connections automatically.
20
22
23
+
See [`AutoTLS`](https://github.com/ipfs/kubo/blob/master/docs/config.md#autotls) configuration for details how to enable it. We appreciate you testing and providing an early feedback in [kubo#10560](https://github.com/ipfs/kubo/issues/10560).
24
+
25
+
#### 📦️ Boxo and go-libp2p updates
26
+
27
+
- update `boxo` to [v0.24.2](https://github.com/ipfs/boxo/releases/tag/v0.24.2). This includes a number of fixes and bitswap improvements.
21
28
- update `go-libp2p` to [v0.37.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.37.0)
22
29
- This update required removal of `Swarm.RelayService.MaxReservationsPerPeer` configuration option from Kubo. If you had it set, remove it from your configuration file.
23
30
- update `go-libp2p-kad-dht` to [v0.27.0](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.27.0)
24
31
- update `go-libp2p-pubsub` to [v0.12.0](https://github.com/libp2p/go-libp2p-pubsub/releases/tag/v0.12.0)
25
32
26
-
#### Update Boxo
27
-
28
-
Update boxo to [v0.24.2](https://github.com/ipfs/boxo/releases/tag/v0.24.2). This includes a number of fixes and bitswap improvements.
Type: `duration` (when `0`/unset, the default value is used)
451
457
458
+
## `AutoTLS`
459
+
460
+
> [!CAUTION]
461
+
> This is an **EXPERIMENTAL** opt-in feature and should not be used in production yet.
462
+
> Feel free to enable it and [report issues](https://github.com/ipfs/kubo/issues/new/choose) if you want to help with testing.
463
+
> Track progress in [kubo#10560](https://github.com/ipfs/kubo/issues/10560).
464
+
465
+
AutoTLS feature enables publicly reachable Kubo nodes (those dialable from the public
466
+
internet) to automatically obtain a wildcard TLS certificate for a DNS name
467
+
unique to their PeerID at `*.[PeerID].libp2p.direct`. This enables direct
468
+
libp2p connections and retrieval of IPFS content from browsers [Secure Context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts)
469
+
using transports such as [Secure WebSockets](https://github.com/libp2p/specs/blob/master/websockets/README.md),
470
+
without requiring user to do any manual domain registration and ceritficate configuration.
471
+
472
+
Under the hood, [p2p-forge] client uses public utility service at `libp2p.direct` as an [ACME DNS-01 Challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge)
473
+
broker enabling peer to obtain a wildcard TLS certificate tied to public key of their [PeerID](https://docs.libp2p.io/concepts/fundamentals/peers/#peer-id).
474
+
475
+
By default, the certificates are requested from Let's Encrypt. Origin and rationale for this project can be found in [community.letsencrypt.org discussion](https://community.letsencrypt.org/t/feedback-on-raising-certificates-per-registered-domain-to-enable-peer-to-peer-networking/223003).
476
+
477
+
> [!NOTE]
478
+
> Public good DNS and [p2p-forge] infrastructure at `libp2p.direct` is run by the team at [Interplanetary Shipyard](https://ipshipyard.com).
> This is an **EXPERIMENTAL** opt-in feature and should not be used in production yet.
492
+
> Feel free to enable it and [report issues](https://github.com/ipfs/kubo/issues/new/choose) if you want to help with testing.
493
+
> Track progress in [kubo#10560](https://github.com/ipfs/kubo/issues/10560).
494
+
495
+
Enables AutoTLS feature to get DNS+TLS for [libp2p Secure WebSocket](https://github.com/libp2p/specs/blob/master/websockets/README.md) listeners defined in [`Addresses.Swarm`](#addressesswarm), such as `/ip4/0.0.0.0/tcp/4002/tls/sni/*.libp2p.direct/ws` and `/ip6/::/tcp/4002/tls/sni/*.libp2p.direct/ws`.
496
+
497
+
If `.../tls/sni/*.libp2p.direct/ws`[multiaddr] is present in [`Addresses.Swarm`](#addressesswarm)
498
+
with SNI segment ending with [`AutoTLS.DomainSuffix`](#autotlsdomainsuffix),
499
+
Kubo will obtain and set up a trusted PKI TLS certificate for it, making it diallable from web browser's [Secure Contexts](https://w3c.github.io/webappsec-secure-contexts/).
500
+
501
+
> [!IMPORTANT]
502
+
> Caveats:
503
+
> - Requires your Kubo node to be publicly diallable.
504
+
> - If you want to test this with a node that is behind a NAT and uses manual port forwarding or UPnP (`Swarm.DisableNatPortMap=false`),
505
+
> add catch-all `/ip4/0.0.0.0/tcp/4002/tls/sni/*.libp2p.direct/ws` and `/ip6/::/tcp/4002/tls/sni/*.libp2p.direct/ws` to [`Addresses.Swarm`](#addressesswarm)
506
+
> and **wait 5-15 minutes** for libp2p node to set up and learn about own public addresses via [AutoNAT](#autonat).
507
+
> - If your node is fresh and just started, the [p2p-forge] client may produce and log ERRORs during this time, but once a publicly diallable addresses are set up, a subsequent retry should be successful.
508
+
> - Requires manually updating [`Addresses.Swarm`](#addressesswarm) and opening a new port
509
+
> - A separate port has to be used instead of `4001` because we wait for TCP port sharing ([go-libp2p#2984](https://github.com/libp2p/go-libp2p/issues/2684)) to be implemented.
510
+
> - If you use manual port forwarding, make sure incoming connections to this additional port are allowed the same way `4001` ones already are.
511
+
> - The TLS certificate is used only for [libp2p WebSocket](https://github.com/libp2p/specs/blob/master/websockets/README.md) connections.
512
+
> - Right now, this is NOT used for hosting a [Gateway](#gateway) over HTTPS (that use case still requires manual TLS setup on reverse proxy, and your own domain).
513
+
514
+
> [!TIP]
515
+
> Debugging can be enabled by setting environment variable `GOLOG_LOG_LEVEL="error,autotls=debug,p2p-forge/client=debug"`
516
+
517
+
Default: `false`
518
+
519
+
Type: `flag`
520
+
521
+
### `AutoTLS.DomainSuffix`
522
+
523
+
Optional override of the parent domain suffix that will be used in DNS+TLS+WebSockets multiaddrs generated by [p2p-forge] client.
524
+
Do not change this unless you self-host [p2p-forge].
525
+
526
+
Default: `libp2p.direct` (public good run by [Interplanetary Shipyard](https://ipshipyard.com))
527
+
528
+
Type: `optionalString`
529
+
530
+
### `AutoTLS.RegistrationEndpoint`
531
+
532
+
Optional override of [p2p-forge] HTTP registration API.
533
+
Do not change this unless you self-host [p2p-forge].
534
+
535
+
> [!IMPORTANT]
536
+
> The default endpoint performs [libp2p Peer ID Authentication over HTTP](https://github.com/libp2p/specs/blob/master/http/peer-id-auth.md)
537
+
> (prooving ownership of PeerID), probes if your Kubo node can correctly answer to a [libp2p Identify](https://github.com/libp2p/specs/tree/master/identify) query.
538
+
> This ensures only a correctly configured, publicly diallable Kubo can initiate [ACME DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge) for `peerid.libp2p.direct`.
539
+
540
+
Default: `https://registration.libp2p.direct` (public good run by [Interplanetary Shipyard](https://ipshipyard.com))
541
+
542
+
Type: `optionalString`
543
+
544
+
### `AutoTLS.RegistrationToken`
545
+
546
+
Optional value for `Forge-Authorization` token sent with request to `RegistrationEndpoint`
547
+
(useful for private/self-hosted/test instances of [p2p-forge], unset by default).
548
+
549
+
Default: `""`
550
+
551
+
Type: `optionalString`
552
+
553
+
### `AutoTLS.CAEndpoint`
554
+
555
+
Optional override of CA ACME API used by [p2p-forge] system.
556
+
557
+
Default: [certmagic.LetsEncryptProductionCA](https://pkg.go.dev/github.com/caddyserver/certmagic#pkg-constants) (see [community.letsencrypt.org discussion](https://community.letsencrypt.org/t/feedback-on-raising-certificates-per-registered-domain-to-enable-peer-to-peer-networking/223003))
558
+
559
+
Type: `optionalString`
560
+
452
561
## `Bootstrap`
453
562
454
563
Bootstrap is an array of [multiaddrs][multiaddr] of trusted nodes that your node connects to, to fetch other nodes of the network on startup.
@@ -1835,7 +1944,7 @@ Type: `optionalInteger`
1835
1944
1836
1945
#### `Swarm.RelayService.MaxReservationsPerPeer`
1837
1946
1838
-
**REMOVED in kubo 0.32 due to removal from go-libp2p v0.37**
1947
+
**REMOVED in kubo 0.32 due to [go-libp2p#2974](https://github.com/libp2p/go-libp2p/pull/2974)**
0 commit comments