Skip to content

Commit

Permalink
libp2p: default to preffering TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Nov 22, 2023
1 parent 50b4863 commit 230d13f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/node/libp2p/sec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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`

Expand Down

0 comments on commit 230d13f

Please sign in to comment.