Skip to content

Commit b5cfd6d

Browse files
committed
test: sharness without tcp mux
1 parent a436f4e commit b5cfd6d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/sharness.yml

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
TEST_EXPENSIVE: 1
5353
IPFS_CHECK_RCMGR_DEFAULTS: 1
5454
CONTINUE_ON_S_FAILURE: 1
55+
LIBP2P_TCP_MUX: false # TODO
5556
# increasing parallelism beyond 10 doesn't speed up the tests much
5657
PARALLEL: ${{ github.repository == 'ipfs/kubo' && 10 || 3 }}
5758
- name: Upload coverage report

core/node/libp2p/transport.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package libp2p
22

33
import (
44
"fmt"
5+
"os"
6+
57
"github.com/ipfs/kubo/config"
68
"github.com/ipshipyard/p2p-forge/client"
79
"github.com/libp2p/go-libp2p"
@@ -66,7 +68,7 @@ func Transports(tptConfig config.Transports) interface{} {
6668
opts.Opts = append(opts.Opts, libp2p.Transport(webrtc.New))
6769
}
6870

69-
if tcpEnabled && wsEnabled {
71+
if tcpEnabled && wsEnabled && os.Getenv("LIBP2P_TCP_MUX") != "false" {
7072
opts.Opts = append(opts.Opts, libp2p.ShareTCPListener())
7173
}
7274

docs/environment-variables.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,14 @@ Kubo tries to reuse the same source port for all connections to improve NAT
155155
traversal. If this is an issue, you can disable it by setting
156156
`LIBP2P_TCP_REUSEPORT` to false.
157157

158-
Default: true
158+
Default: `true`
159+
160+
## `LIBP2P_TCP_MUX`
161+
162+
Kubo tries to reuse the same listener port for raw TCP and WebSockers transports.
163+
If this is an issue, you can disable it by setting `LIBP2P_TCP_MUX` to `false`.
164+
165+
Default: `true`
159166

160167
## `LIBP2P_MUX_PREFS`
161168

0 commit comments

Comments
 (0)