Store opened port status per IP version

This commit is contained in:
shortcutme 2019-01-23 02:11:31 +01:00
parent ce78e330d3
commit 447f5fd5c8
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
7 changed files with 65 additions and 36 deletions

View file

@ -31,11 +31,7 @@ class PeerPortchecker(object):
self.log.warning("UpnpPunch run error: %s" % Debug.formatException(err))
return False
if self.portCheck(port)["opened"]:
return True
else:
self.log.info("Upnp mapping failed, please forward port %s on your router to your ipaddress" % port)
return False
return True
def portClose(self, port):
return UpnpPunch.ask_to_close_port(port, protos=["TCP"])