bugfix
This commit is contained in:
parent
0e2a7a3039
commit
4fb8c29d6c
@ -64,16 +64,19 @@ class AcrossNat(object):
|
|||||||
protocol=protocol):
|
protocol=protocol):
|
||||||
external_port += 1
|
external_port += 1
|
||||||
continue
|
continue
|
||||||
self.upnp.AddPortMapping(NewRemoteHost='',
|
try:
|
||||||
NewExternalPort=external_port,
|
self.upnp.AddPortMapping(NewRemoteHost='',
|
||||||
NewProtocol=protocol,
|
NewExternalPort=external_port,
|
||||||
NewInternalPort=inner_port,
|
NewProtocol=protocol,
|
||||||
NewInternalClient=ip,
|
NewInternalPort=inner_port,
|
||||||
NewEnabled=1,
|
NewInternalClient=ip,
|
||||||
NewPortMappingDescription=desc,
|
NewEnabled=1,
|
||||||
NewLeaseDuration=0
|
NewPortMappingDescription=desc,
|
||||||
)
|
NewLeaseDuration=0
|
||||||
return external_port
|
)
|
||||||
|
return external_port
|
||||||
|
except:
|
||||||
|
return None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def is_port_mapped(self, external_port, protocol='TCP'):
|
def is_port_mapped(self, external_port, protocol='TCP'):
|
||||||
|
Loading…
Reference in New Issue
Block a user