UPnP client port randomize
This commit is contained in:
parent
f9a648d720
commit
96ea36cfd2
|
@ -187,7 +187,7 @@ class uPnPThread(threading.Thread, StoppableThread):
|
||||||
self.localIP = self.getLocalIP()
|
self.localIP = self.getLocalIP()
|
||||||
self.routers = []
|
self.routers = []
|
||||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
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.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
|
||||||
self.sock.settimeout(5)
|
self.sock.settimeout(5)
|
||||||
self.sendSleep = 60
|
self.sendSleep = 60
|
||||||
|
|
Loading…
Reference in New Issue
Block a user