Skip to content

Commit

Permalink
natportmap
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Nov 28, 2024
1 parent 7839b6d commit c3a26e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/taiko-client/pkg/p2p/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ type Network struct {
func NewNetwork(ctx context.Context, bootstrapNodeURL string, port uint64) (*Network, error) {
host, err := libp2p.New(
libp2p.ListenAddrs(multiaddr.StringCast(fmt.Sprintf("/ip4/0.0.0.0/tcp/%v", port))),
libp2p.NATPortMap(), // Automatically map external ports
libp2p.EnableAutoRelay(), // Relay support for NAT traversal
libp2p.NATPortMap(), // Automatically map external ports
)
if err != nil {
return nil, err
Expand Down

0 comments on commit c3a26e4

Please sign in to comment.