don't force 3 ports / sequence numbers
This commit is contained in:
parent
0125993ccd
commit
7d2a92346d
|
@ -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.} =
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue