no firewall rules needed for tcp_nutss_responder; remove unneeded cleanup logic

This commit is contained in:
Christian Ulrich 2020-10-15 19:52:28 +02:00
parent 7c9940b3b9
commit 91b7d14958
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
2 changed files with 2 additions and 6 deletions

View File

@ -23,8 +23,7 @@ type
PunchProgressCb* = proc() {.async.}
proc cleanup*(puncher: TcpNutssInitiator) {.async.} =
while puncher.attempts.len() != 0:
await puncher.attempts.pop().deleteFirewallRules() # FIXME: needed?
discard
proc initTcpNutssInitiator*(): TcpNutssInitiator =
randomize()
@ -84,11 +83,9 @@ proc initiate*(puncher: TcpNutssInitiator, srcPort: Port, dstIp: IpAddress,
dstPorts: predictPortRange(dstPorts),
future: newFuture[AsyncSocket]("initiate"))
puncher.attempts.add(attempt)
#await attempt.addFirewallRules()
await attempt.injectSynPackets()
await progressCb()
await attempt.future or sleepAsync(Timeout)
#await attempt.deleteFirewallRules()
puncher.attempts.del(puncher.attempts.find(attempt))
if attempt.future.finished():
result = attempt.future.read()

View File

@ -16,8 +16,7 @@ type
TcpNutssResponder* = Puncher[Attempt]
proc cleanup*(puncher: TcpNutssResponder) {.async.} =
while puncher.attempts.len() != 0:
await puncher.attempts.pop().deleteFirewallRules() # FIXME: needed?
discard
proc initTcpNutssResponder*(): TcpNutssResponder =
TcpNutssResponder()