diff --git a/punchd.nim b/punchd.nim index 8da9654..8802d2f 100644 --- a/punchd.nim +++ b/punchd.nim @@ -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.} = diff --git a/tcp_syni.nim b/tcp_syni.nim index fd9a719..1bf4ae1 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -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