Merge pull request #27 from hyprspace/add/UPnP

Add initial support for UPnP to Hyprspace
This commit is contained in:
Alec Scott 2021-08-21 12:06:45 -07:00 committed by GitHub
commit 5ff46dc02e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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