Skip to content

Reachability of nodes is Private when using ShareTCPListener #3336

@acha-bill

Description

@acha-bill

As the title says, nodes that have ShareTCPListner report private reachability. The other nodes in the cluster are public. Same config, same everything.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions