UPnP client port randomize

master
Peter Šurda 5 years ago
parent f9a648d720
commit 96ea36cfd2
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
  1. 2
      src/upnp.py

@ -187,7 +187,7 @@ class uPnPThread(threading.Thread, StoppableThread):
self.localIP = self.getLocalIP()
self.routers = []
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind((self.localIP, 10000))
self.sock.bind((self.localIP, 0))
self.sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
self.sock.settimeout(5)
self.sendSleep = 60

Loading…
Cancel
Save