mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-06-30 14:29:29 +00:00
Remove NatStrategy upnp and pmp
This commit is contained in:
parent
3460a3b266
commit
6a99e218d7
@ -158,7 +158,7 @@ type
|
||||
nat* {.
|
||||
desc:
|
||||
"Specify method to use for determining public address. " &
|
||||
"Must be one of: auto, upnp, pmp, extip:<IP>.",
|
||||
"Must be one of: auto, extip:<IP>.",
|
||||
defaultValue: defaultNatConfig(),
|
||||
defaultValueDesc: "auto",
|
||||
name: "nat"
|
||||
@ -419,10 +419,6 @@ func parse*(T: type NatConfig, p: string): Result[NatConfig, string] =
|
||||
case p.toLowerAscii
|
||||
of "auto":
|
||||
return ok(NatConfig(hasExtIp: false, nat: NatStrategy.NatAuto))
|
||||
of "upnp":
|
||||
return ok(NatConfig(hasExtIp: false, nat: NatStrategy.NatUpnp))
|
||||
of "pmp":
|
||||
return ok(NatConfig(hasExtIp: false, nat: NatStrategy.NatPmp))
|
||||
else:
|
||||
if p.startsWith("extip:"):
|
||||
try:
|
||||
|
||||
@ -15,8 +15,6 @@ const NATPMP_LIFETIME* = 60 * 60 # seconds
|
||||
|
||||
type NatStrategy* = enum
|
||||
NatAuto
|
||||
NatUpnp
|
||||
NatPmp
|
||||
|
||||
type NatIpProtocol* = enum
|
||||
Tcp
|
||||
|
||||
@ -143,6 +143,7 @@ suite "NAT - UPnP port mapping (requires NAT_TEST_UPNP=1)":
|
||||
test "mapPorts and cleanup":
|
||||
if getEnv("NAT_TEST_UPNP") != "1":
|
||||
skip()
|
||||
return
|
||||
|
||||
let res = UpnpDevice.init()
|
||||
check res.isOk
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user