Merge pull request #3006 from filecoin-project/fix/disable-secio
RIP secio
This commit is contained in:
commit
2a699e1de9
2
go.mod
2
go.mod
@ -87,13 +87,13 @@ require (
|
|||||||
github.com/libp2p/go-libp2p-discovery v0.5.0
|
github.com/libp2p/go-libp2p-discovery v0.5.0
|
||||||
github.com/libp2p/go-libp2p-kad-dht v0.8.3
|
github.com/libp2p/go-libp2p-kad-dht v0.8.3
|
||||||
github.com/libp2p/go-libp2p-mplex v0.2.4
|
github.com/libp2p/go-libp2p-mplex v0.2.4
|
||||||
|
github.com/libp2p/go-libp2p-noise v0.1.1
|
||||||
github.com/libp2p/go-libp2p-peer v0.2.0
|
github.com/libp2p/go-libp2p-peer v0.2.0
|
||||||
github.com/libp2p/go-libp2p-peerstore v0.2.6
|
github.com/libp2p/go-libp2p-peerstore v0.2.6
|
||||||
github.com/libp2p/go-libp2p-pubsub v0.3.4
|
github.com/libp2p/go-libp2p-pubsub v0.3.4
|
||||||
github.com/libp2p/go-libp2p-quic-transport v0.7.1
|
github.com/libp2p/go-libp2p-quic-transport v0.7.1
|
||||||
github.com/libp2p/go-libp2p-record v0.1.3
|
github.com/libp2p/go-libp2p-record v0.1.3
|
||||||
github.com/libp2p/go-libp2p-routing-helpers v0.2.3
|
github.com/libp2p/go-libp2p-routing-helpers v0.2.3
|
||||||
github.com/libp2p/go-libp2p-secio v0.2.2
|
|
||||||
github.com/libp2p/go-libp2p-swarm v0.2.8
|
github.com/libp2p/go-libp2p-swarm v0.2.8
|
||||||
github.com/libp2p/go-libp2p-tls v0.1.3
|
github.com/libp2p/go-libp2p-tls v0.1.3
|
||||||
github.com/libp2p/go-libp2p-yamux v0.2.8
|
github.com/libp2p/go-libp2p-yamux v0.2.8
|
||||||
|
@ -3,8 +3,8 @@ package lp2p
|
|||||||
import (
|
import (
|
||||||
"github.com/libp2p/go-libp2p"
|
"github.com/libp2p/go-libp2p"
|
||||||
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
||||||
|
noise "github.com/libp2p/go-libp2p-noise"
|
||||||
libp2pquic "github.com/libp2p/go-libp2p-quic-transport"
|
libp2pquic "github.com/libp2p/go-libp2p-quic-transport"
|
||||||
secio "github.com/libp2p/go-libp2p-secio"
|
|
||||||
tls "github.com/libp2p/go-libp2p-tls"
|
tls "github.com/libp2p/go-libp2p-tls"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,9 +23,9 @@ func Security(enabled, preferTLS bool) interface{} {
|
|||||||
}
|
}
|
||||||
return func() (opts Libp2pOpts) {
|
return func() (opts Libp2pOpts) {
|
||||||
if preferTLS {
|
if preferTLS {
|
||||||
opts.Opts = append(opts.Opts, libp2p.ChainOptions(libp2p.Security(tls.ID, tls.New), libp2p.Security(secio.ID, secio.New)))
|
opts.Opts = append(opts.Opts, libp2p.ChainOptions(libp2p.Security(tls.ID, tls.New), libp2p.Security(noise.ID, noise.New)))
|
||||||
} else {
|
} else {
|
||||||
opts.Opts = append(opts.Opts, libp2p.ChainOptions(libp2p.Security(secio.ID, secio.New), libp2p.Security(tls.ID, tls.New)))
|
opts.Opts = append(opts.Opts, libp2p.ChainOptions(libp2p.Security(noise.ID, noise.New), libp2p.Security(tls.ID, tls.New)))
|
||||||
}
|
}
|
||||||
return opts
|
return opts
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user