From a617c52f57f20956f8ecd7cca3b4cb36e68bb67e Mon Sep 17 00:00:00 2001 From: Jorropo Date: Wed, 22 Nov 2023 06:04:24 +0100 Subject: [PATCH 1/2] libp2p: default to preffering TLS See https://github.com/libp2p/go-libp2p/pull/2650. --- core/node/libp2p/sec.go | 4 ++-- docs/config.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/node/libp2p/sec.go b/core/node/libp2p/sec.go index 820ba22d6d1..2d72c617704 100644 --- a/core/node/libp2p/sec.go +++ b/core/node/libp2p/sec.go @@ -31,11 +31,11 @@ func Security(enabled bool, tptConfig config.Transports) interface{} { return func() (opts Libp2pOpts) { opts.Opts = append(opts.Opts, prioritizeOptions([]priorityOption{{ priority: tptConfig.Security.TLS, - defaultPriority: 200, + defaultPriority: 100, opt: libp2p.Security(tls.ID, tls.New), }, { priority: tptConfig.Security.Noise, - defaultPriority: 100, + defaultPriority: 200, opt: libp2p.Security(noise.ID, noise.New), }})) return opts diff --git a/docs/config.md b/docs/config.md index df35d2ce87e..41d37cc0b9b 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2199,7 +2199,7 @@ receiver supports. When establishing an _inbound_ connection, Kubo will let the initiator choose the protocol, but will refuse to use any of the disabled transports. -Supported transports are: TLS (priority 100) and Noise (priority 300). +Supported transports are: TLS (priority 100) and Noise (priority 200). No default priority will ever be less than 100. @@ -2224,7 +2224,7 @@ TLS as the cross-platform, default libp2p protocol due to ease of implementation. It is currently enabled by default but with low priority as it's not yet widely supported. -Default: `300` +Default: `200` Type: `priority` From 9cc64ef06f6c26c4de99ff1a25817feca9305cbf Mon Sep 17 00:00:00 2001 From: gammazero Date: Tue, 6 Aug 2024 20:21:20 -0700 Subject: [PATCH 2/2] Update comment --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index c65bae2d208..9119610dc7f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2303,7 +2303,7 @@ transports. Supported transports are: TLS (priority 100) and Noise (priority 200). -No default priority will ever be less than 100. +No default priority will ever be less than 100. Lower values have precedence. #### `Swarm.Transports.Security.TLS`