Skip to content

Commit

Permalink
test: sharness without tcp mux
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Dec 19, 2024
1 parent a436f4e commit b5cfd6d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
TEST_EXPENSIVE: 1
IPFS_CHECK_RCMGR_DEFAULTS: 1
CONTINUE_ON_S_FAILURE: 1
LIBP2P_TCP_MUX: false # TODO
# increasing parallelism beyond 10 doesn't speed up the tests much
PARALLEL: ${{ github.repository == 'ipfs/kubo' && 10 || 3 }}
- name: Upload coverage report
Expand Down
4 changes: 3 additions & 1 deletion core/node/libp2p/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package libp2p

import (
"fmt"
"os"

"github.com/ipfs/kubo/config"
"github.com/ipshipyard/p2p-forge/client"
"github.com/libp2p/go-libp2p"
Expand Down Expand Up @@ -66,7 +68,7 @@ func Transports(tptConfig config.Transports) interface{} {
opts.Opts = append(opts.Opts, libp2p.Transport(webrtc.New))
}

if tcpEnabled && wsEnabled {
if tcpEnabled && wsEnabled && os.Getenv("LIBP2P_TCP_MUX") != "false" {
opts.Opts = append(opts.Opts, libp2p.ShareTCPListener())
}

Expand Down
9 changes: 8 additions & 1 deletion docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ Kubo tries to reuse the same source port for all connections to improve NAT
traversal. If this is an issue, you can disable it by setting
`LIBP2P_TCP_REUSEPORT` to false.

Default: true
Default: `true`

## `LIBP2P_TCP_MUX`

Kubo tries to reuse the same listener port for raw TCP and WebSockers transports.
If this is an issue, you can disable it by setting `LIBP2P_TCP_MUX` to `false`.

Default: `true`

## `LIBP2P_MUX_PREFS`

Expand Down

0 comments on commit b5cfd6d

Please sign in to comment.