Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Commit 5ff46dc

Browse files
authored
Merge pull request #27 from hyprspace/add/UPnP
Add initial support for UPnP to Hyprspace
2 parents c5ccc0d + 52c7839 commit 5ff46dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

p2p/node.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func CreateNode(ctx context.Context, inputKey string, port int, handler network.
3030
node, err = libp2p.New(ctx,
3131
libp2p.ListenAddrStrings(fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", port)),
3232
libp2p.Identity(privateKey),
33+
libp2p.DefaultSecurity,
34+
libp2p.NATPortMap(),
35+
libp2p.FallbackDefaults,
3336
)
3437
if err != nil {
3538
return

0 commit comments

Comments
 (0)