From 52c78391bb99f28e28082cadf5924302546e8676 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sat, 21 Aug 2021 12:04:47 -0700 Subject: [PATCH] Add initial support for UPnP to Hyprspace --- p2p/node.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/p2p/node.go b/p2p/node.go index a2747f8..4d096be 100644 --- a/p2p/node.go +++ b/p2p/node.go @@ -30,6 +30,9 @@ func CreateNode(ctx context.Context, inputKey string, port int, handler network. node, err = libp2p.New(ctx, libp2p.ListenAddrStrings(fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", port)), libp2p.Identity(privateKey), + libp2p.DefaultSecurity, + libp2p.NATPortMap(), + libp2p.FallbackDefaults, ) if err != nil { return