let peer behind SymmetricRandom NAT use 70 sockets; punch 1000 holes on the other side
This commit is contained in:
parent
d92e8be393
commit
bf9569098f
|
@ -25,7 +25,7 @@ type
|
||||||
minPort*: uint16
|
minPort*: uint16
|
||||||
maxPort*: uint16
|
maxPort*: uint16
|
||||||
|
|
||||||
const RandomPortCount = 3000'u16
|
const RandomPortCount = 1000'u16
|
||||||
|
|
||||||
proc min(a, b: uint16): uint16 =
|
proc min(a, b: uint16): uint16 =
|
||||||
min(a.int32, b.int32).uint16
|
min(a.int32, b.int32).uint16
|
||||||
|
|
|
@ -393,7 +393,7 @@ proc main() =
|
||||||
var ctx: QuicP2PContext
|
var ctx: QuicP2PContext
|
||||||
var socks = newSeq[AsyncSocket]()
|
var socks = newSeq[AsyncSocket]()
|
||||||
randomize()
|
randomize()
|
||||||
for i in 0 .. 29:
|
for i in 0 .. 70:
|
||||||
# FIXME: close socks
|
# FIXME: close socks
|
||||||
let sock = newAsyncSocket(sockType = SOCK_DGRAM, protocol = IPPROTO_UDP,
|
let sock = newAsyncSocket(sockType = SOCK_DGRAM, protocol = IPPROTO_UDP,
|
||||||
buffered = false)
|
buffered = false)
|
||||||
|
|
Loading…
Reference in New Issue