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.}
|
PunchProgressCb* = proc() {.async.}
|
||||||
|
|
||||||
proc cleanup*(puncher: TcpNutssInitiator) {.async.} =
|
proc cleanup*(puncher: TcpNutssInitiator) {.async.} =
|
||||||
while puncher.attempts.len() != 0:
|
discard
|
||||||
await puncher.attempts.pop().deleteFirewallRules() # FIXME: needed?
|
|
||||||
|
|
||||||
proc initTcpNutssInitiator*(): TcpNutssInitiator =
|
proc initTcpNutssInitiator*(): TcpNutssInitiator =
|
||||||
randomize()
|
randomize()
|
||||||
|
@ -84,11 +83,9 @@ proc initiate*(puncher: TcpNutssInitiator, srcPort: Port, dstIp: IpAddress,
|
||||||
dstPorts: predictPortRange(dstPorts),
|
dstPorts: predictPortRange(dstPorts),
|
||||||
future: newFuture[AsyncSocket]("initiate"))
|
future: newFuture[AsyncSocket]("initiate"))
|
||||||
puncher.attempts.add(attempt)
|
puncher.attempts.add(attempt)
|
||||||
#await attempt.addFirewallRules()
|
|
||||||
await attempt.injectSynPackets()
|
await attempt.injectSynPackets()
|
||||||
await progressCb()
|
await progressCb()
|
||||||
await attempt.future or sleepAsync(Timeout)
|
await attempt.future or sleepAsync(Timeout)
|
||||||
#await attempt.deleteFirewallRules()
|
|
||||||
puncher.attempts.del(puncher.attempts.find(attempt))
|
puncher.attempts.del(puncher.attempts.find(attempt))
|
||||||
if attempt.future.finished():
|
if attempt.future.finished():
|
||||||
result = attempt.future.read()
|
result = attempt.future.read()
|
||||||
|
|
|
@ -16,8 +16,7 @@ type
|
||||||
TcpNutssResponder* = Puncher[Attempt]
|
TcpNutssResponder* = Puncher[Attempt]
|
||||||
|
|
||||||
proc cleanup*(puncher: TcpNutssResponder) {.async.} =
|
proc cleanup*(puncher: TcpNutssResponder) {.async.} =
|
||||||
while puncher.attempts.len() != 0:
|
discard
|
||||||
await puncher.attempts.pop().deleteFirewallRules() # FIXME: needed?
|
|
||||||
|
|
||||||
proc initTcpNutssResponder*(): TcpNutssResponder =
|
proc initTcpNutssResponder*(): TcpNutssResponder =
|
||||||
TcpNutssResponder()
|
TcpNutssResponder()
|
||||||
|
|
Loading…
Reference in New Issue