Send a closedown to server (deleting peer record) when the proxy port times out
This commit is contained in:
parent
d7e9ae9a4a
commit
259c48f63c
@ -124,7 +124,7 @@ class Proxy(DatagramProtocol):
|
||||
return
|
||||
#for _dport in self.connTrack:
|
||||
while True:
|
||||
_dport = random.randint(1,(self.numPorts - 2))
|
||||
_dport = random.randint(1,(self.numPorts - 1))
|
||||
_dport = _dport + self.destPortStart
|
||||
if not self.connTrack[_dport]:
|
||||
break
|
||||
@ -147,7 +147,7 @@ if __name__ == '__main__':
|
||||
|
||||
Master = "127.0.0.1"
|
||||
ListenPort = 62031
|
||||
DestportStart = 50000
|
||||
DestportStart = 5000
|
||||
DestPortEnd = 50600
|
||||
Timeout = 30
|
||||
Stats = True
|
||||
@ -159,8 +159,9 @@ if __name__ == '__main__':
|
||||
|
||||
CONNTRACK = {}
|
||||
|
||||
for port in range(DestportStart,DestPortEnd,1):
|
||||
for port in range(DestportStart,DestPortEnd+1,1):
|
||||
CONNTRACK[port] = False
|
||||
|
||||
|
||||
reactor.listenUDP(ListenPort,Proxy(Master,ListenPort,CONNTRACK,BlackList,Timeout,Debug,DestportStart,DestPortEnd))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user