don't force 3 ports / sequence numbers

This commit is contained in:
Christian Ulrich 2020-08-26 21:33:13 +02:00
parent 0125993ccd
commit 7d2a92346d
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
2 changed files with 5 additions and 5 deletions

View File

@ -20,15 +20,15 @@ type
# Requests
TcpSyniConnect = object
srcIp: IpAddress
srcPorts: array[3, Port]
srcPorts: seq[Port]
dstIp: IpAddress
dstPorts: array[3, Port]
dstPorts: seq[Port]
TcpSyniAccept = object
dstIp: IpAddress
dstPorts: array[3, Port]
dstPorts: seq[Port]
srcIp: IpAddress
srcPorts: array[3, Port]
srcPorts: seq[Port]
seqNums: seq[uint32]
proc handleSigint() {.noconv.} =

View File

@ -98,7 +98,7 @@ proc captureAndResendAck(puncher: TcpSyniPuncher, captureFd: AsyncFD,
await injectFd.injectTcpPacket(parsed)
return
proc initPuncher*(srcPort: Port, dstIp: IpAddress, dstPorts: array[3, Port],
proc initPuncher*(srcPort: Port, dstIp: IpAddress, dstPorts: seq[Port],
seqNums: seq[uint32] = @[]): TcpSyniPuncher =
let localIp = getPrimaryIPAddr(dstIp)
# TODO: do real port prediction