diff --git a/storage/conf.nim b/storage/conf.nim index abc5a219..71e2753b 100644 --- a/storage/conf.nim +++ b/storage/conf.nim @@ -158,7 +158,7 @@ type nat* {. desc: "Specify method to use for determining public address. " & - "Must be one of: auto, upnp, pmp, extip:.", + "Must be one of: auto, extip:.", 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: diff --git a/storage/utils/natutils.nim b/storage/utils/natutils.nim index 7364efe6..45abd178 100644 --- a/storage/utils/natutils.nim +++ b/storage/utils/natutils.nim @@ -15,8 +15,6 @@ const NATPMP_LIFETIME* = 60 * 60 # seconds type NatStrategy* = enum NatAuto - NatUpnp - NatPmp type NatIpProtocol* = enum Tcp diff --git a/tests/storage/testnat.nim b/tests/storage/testnat.nim index f843acf2..ff3da3cb 100644 --- a/tests/storage/testnat.nim +++ b/tests/storage/testnat.nim @@ -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