Prefer tls
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
fc46938383
commit
352fb9f9ea
@ -158,7 +158,7 @@ func libp2p() Option {
|
|||||||
Override(AddrsFactoryKey, lp2p.AddrsFactory(nil, nil)),
|
Override(AddrsFactoryKey, lp2p.AddrsFactory(nil, nil)),
|
||||||
Override(SmuxTransportKey, lp2p.SmuxTransport(true)),
|
Override(SmuxTransportKey, lp2p.SmuxTransport(true)),
|
||||||
Override(RelayKey, lp2p.Relay(true, false)),
|
Override(RelayKey, lp2p.Relay(true, false)),
|
||||||
Override(SecurityKey, lp2p.Security(true, false)),
|
Override(SecurityKey, lp2p.Security(true, true)),
|
||||||
|
|
||||||
Override(BaseRoutingKey, lp2p.BaseRouting),
|
Override(BaseRoutingKey, lp2p.BaseRouting),
|
||||||
Override(new(routing.Routing), lp2p.Routing),
|
Override(new(routing.Routing), lp2p.Routing),
|
||||||
|
@ -47,7 +47,8 @@ func Host(mctx helpers.MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (RawHost,
|
|||||||
libp2p.Peerstore(params.Peerstore),
|
libp2p.Peerstore(params.Peerstore),
|
||||||
libp2p.NoListenAddrs,
|
libp2p.NoListenAddrs,
|
||||||
libp2p.Ping(true),
|
libp2p.Ping(true),
|
||||||
libp2p.UserAgent("lotus-" + build.UserVersion)}
|
libp2p.UserAgent("lotus-" + build.UserVersion),
|
||||||
|
}
|
||||||
for _, o := range params.Opts {
|
for _, o := range params.Opts {
|
||||||
opts = append(opts, o...)
|
opts = append(opts, o...)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ func Security(enabled, preferTLS bool) interface{} {
|
|||||||
if !enabled {
|
if !enabled {
|
||||||
return func() (opts Libp2pOpts) {
|
return func() (opts Libp2pOpts) {
|
||||||
// TODO: shouldn't this be Errorf to guarantee visibility?
|
// TODO: shouldn't this be Errorf to guarantee visibility?
|
||||||
log.Warnf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS.
|
log.Warnf(`Your lotus node has been configured to run WITHOUT ENCRYPTED CONNECTIONS.
|
||||||
You will not be able to connect to any nodes configured to use encrypted connections`)
|
You will not be able to connect to any nodes configured to use encrypted connections`)
|
||||||
opts.Opts = append(opts.Opts, libp2p.NoSecurity)
|
opts.Opts = append(opts.Opts, libp2p.NoSecurity)
|
||||||
return opts
|
return opts
|
||||||
|
Loading…
Reference in New Issue
Block a user