From d92e8be393206d8c8b34a44e031d2d019e848cc7 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Fri, 20 Nov 2020 23:40:18 +0100 Subject: [PATCH] let peer behind SymmetricRandom NAT use 30 sockets; punch 3000 holes on the other side --- port_prediction.nim | 2 +- quicp2p.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/port_prediction.nim b/port_prediction.nim index 653102f..ac714f9 100644 --- a/port_prediction.nim +++ b/port_prediction.nim @@ -25,7 +25,7 @@ type minPort*: uint16 maxPort*: uint16 -const RandomPortCount = 1000'u16 +const RandomPortCount = 3000'u16 proc min(a, b: uint16): uint16 = min(a.int32, b.int32).uint16 diff --git a/quicp2p.nim b/quicp2p.nim index 1f472b9..57fd328 100644 --- a/quicp2p.nim +++ b/quicp2p.nim @@ -393,7 +393,7 @@ proc main() = var ctx: QuicP2PContext var socks = newSeq[AsyncSocket]() randomize() - for i in 0 .. 19: + for i in 0 .. 29: # FIXME: close socks let sock = newAsyncSocket(sockType = SOCK_DGRAM, protocol = IPPROTO_UDP, buffered = false)