no firewall rules needed for tcp_nutss_responder; remove unneeded cleanup logic
This commit is contained in:
parent
7c9940b3b9
commit
91b7d14958
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue