mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-25 06:58:18 +08:00
Merge pull request #5417 from ipfs/fix/transports
fix two transport related bugs
This commit is contained in:
@ -249,6 +249,12 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
|
||||
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...))
|
||||
}
|
||||
|
||||
// disable the default listen addrs
|
||||
libp2pOpts = append(libp2pOpts, libp2p.NoListenAddrs)
|
||||
|
||||
// explicitly enable the default transports
|
||||
libp2pOpts = append(libp2pOpts, libp2p.DefaultTransports)
|
||||
|
||||
if cfg.Experimental.QUIC {
|
||||
libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport))
|
||||
}
|
||||
|
@ -89,6 +89,12 @@ test_expect_success "set up tcp testbed" '
|
||||
iptb init -n 2 -p 0 -f --bootstrap=none
|
||||
'
|
||||
|
||||
# Enable quic but don't use it yet.
|
||||
test_expect_success "enable QUIC experiment" '
|
||||
ipfsi 0 config --json Experimental.QUIC true &&
|
||||
ipfsi 1 config --json Experimental.QUIC true
|
||||
'
|
||||
|
||||
# test multiplex muxer
|
||||
echo "Running advanced tests with mplex"
|
||||
export LIBP2P_MUX_PREFS="/mplex/6.7.0"
|
||||
@ -101,11 +107,6 @@ run_advanced_test
|
||||
|
||||
# test QUIC
|
||||
echo "Running advanced tests over QUIC"
|
||||
test_expect_success "enable QUIC experiment" '
|
||||
ipfsi 0 config --json Experimental.QUIC true &&
|
||||
ipfsi 1 config --json Experimental.QUIC true
|
||||
'
|
||||
|
||||
addr1='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"'
|
||||
addr2='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"'
|
||||
test_expect_success "add QUIC swarm addresses" '
|
||||
|
Reference in New Issue
Block a user