mirror of
https://github.com/logos-storage/nim-libp2p.git
synced 2026-01-07 16:13:10 +00:00
Add NAT-PMP support.
This commit is contained in:
parent
f9a807af53
commit
4ba727b768
@ -92,7 +92,8 @@ type
|
|||||||
PSFloodSub, ## Enable `FloodSub` protocol in daemon
|
PSFloodSub, ## Enable `FloodSub` protocol in daemon
|
||||||
PSGossipSub, ## Enable `GossipSub` protocol in daemon
|
PSGossipSub, ## Enable `GossipSub` protocol in daemon
|
||||||
PSNoSign, ## Disable pubsub message signing (default true)
|
PSNoSign, ## Disable pubsub message signing (default true)
|
||||||
PSStrictSign ## Force strict checking pubsub message signature
|
PSStrictSign, ## Force strict checking pubsub message signature
|
||||||
|
NATPortMap ## Force daemon to use NAT-PMP.
|
||||||
|
|
||||||
P2PStream* = ref object
|
P2PStream* = ref object
|
||||||
flags*: set[P2PStreamFlags]
|
flags*: set[P2PStreamFlags]
|
||||||
@ -593,6 +594,8 @@ proc newDaemonApi*(flags: set[P2PDaemonFlags] = {},
|
|||||||
args.add("-pubsubSign=false")
|
args.add("-pubsubSign=false")
|
||||||
if PSStrictSign in api.flags:
|
if PSStrictSign in api.flags:
|
||||||
args.add("-pubsubSignStrict=true")
|
args.add("-pubsubSignStrict=true")
|
||||||
|
if NATPortMap in api.flags:
|
||||||
|
args.add("-natPortMap=true")
|
||||||
if len(bootstrapNodes) > 0:
|
if len(bootstrapNodes) > 0:
|
||||||
args.add("-bootstrapPeers=" & bootstrapNodes.join(","))
|
args.add("-bootstrapPeers=" & bootstrapNodes.join(","))
|
||||||
if len(id) != 0:
|
if len(id) != 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user