Reachability of nodes is `Private` when using `ShareTCPListener`
@sukunrt is already working on this.
Since Jul 21, 2025.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
As the title says, nodes that have `ShareTCPListner` report private reachability. The other nodes in the cluster are public. Same config, same everything.
```go
transports := []libp2p.Option{
libp2p.Transport(tcp.NewTCPTransport, tcp.DisableReuseport()),
libp2p.ShareTCPListener(), // <---- New change
}
if o.EnableWS {
transports = append(transports, libp2p.Transport(ws.New))
}
opts = append(opts, transports...)
var listenAddrs []string
listenAddrs = append(listenAddrs, fmt.Sprintf("/ip4/%s/tcp/%s", ip4Addr, port))
if o.EnableWS {
listenAddrs = append(listenAddrs, fmt.Sprintf("/ip4/%s/tcp/%s/ws", ip4Addr, port))
}
opts = append(opts, libp2p.ListenAddrStrings(listenAddrs...))
...
```
Reachability is private with or without ws.
version: v0.42.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.