try without rate limit, but more holes

This commit is contained in:
Christian Ulrich 2020-11-20 22:39:50 +01:00
parent 9445029b0d
commit 25acfc9518
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
2 changed files with 1 additions and 2 deletions

View File

@ -79,7 +79,6 @@ proc punch(puncher: Puncher, peerIp: IpAddress, peerPort: Port,
# TODO: replace asyncdispatch.sendTo with asyncnet.sendTo (Nim 1.4 required) # TODO: replace asyncdispatch.sendTo with asyncnet.sendTo (Nim 1.4 required)
await sendTo(sock.getFd.AsyncFD, msg.cstring, msg.len, await sendTo(sock.getFd.AsyncFD, msg.cstring, msg.len,
cast[ptr SockAddr](addr peerAddr), peerSockLen) cast[ptr SockAddr](addr peerAddr), peerSockLen)
await sleepAsync(10)
if lowTTL: if lowTTL:
sock.getFd.setSockOptInt(IPPROTO_IP, IP_TTL, defaultTTL) sock.getFd.setSockOptInt(IPPROTO_IP, IP_TTL, defaultTTL)
except OSError as e: except OSError as e:

View File

@ -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 .. 4: for i in 0 .. 9:
# 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)