diff --git a/core/node/libp2p/sec.go b/core/node/libp2p/sec.go index 0dc6940d8f9..5a3e95e3150 100644 --- a/core/node/libp2p/sec.go +++ b/core/node/libp2p/sec.go @@ -22,11 +22,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 e5f02dc1d07..9119610dc7f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2301,9 +2301,9 @@ 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. +No default priority will ever be less than 100. Lower values have precedence. #### `Swarm.Transports.Security.TLS` @@ -2326,7 +2326,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`