use wider port range
This commit is contained in:
parent
9b3196d8a0
commit
769621f4b9
|
@ -84,12 +84,12 @@ proc predictPortRange*(localPort: Port, probedPorts: seq[Port]): seq[Port] =
|
||||||
return
|
return
|
||||||
# assume symmetric NAT with random port mapping
|
# assume symmetric NAT with random port mapping
|
||||||
randomize()
|
randomize()
|
||||||
let first = if minPort >= 1024 + 5000:
|
let first = if minPort >= 1024 + 10000:
|
||||||
minPort - 5000
|
minPort - 10000
|
||||||
else:
|
else:
|
||||||
1024
|
1024
|
||||||
let last = if maxPort <= uint16.high - 5000:
|
let last = if maxPort <= uint16.high - 10000:
|
||||||
maxPort + 5000
|
maxPort + 10000
|
||||||
else:
|
else:
|
||||||
uint16.high
|
uint16.high
|
||||||
for _ in 1 .. RandomPortCount:
|
for _ in 1 .. RandomPortCount:
|
||||||
|
|
Loading…
Reference in New Issue