let peer behind SymmetricRandom NAT use 30 sockets; punch 3000 holes on the other side
This commit is contained in:
parent
de26d60617
commit
d92e8be393
|
@ -25,7 +25,7 @@ type
|
||||||
minPort*: uint16
|
minPort*: uint16
|
||||||
maxPort*: uint16
|
maxPort*: uint16
|
||||||
|
|
||||||
const RandomPortCount = 1000'u16
|
const RandomPortCount = 3000'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 .. 19:
|
for i in 0 .. 29:
|
||||||
# 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