Tcp traffic duplicator
go install github.com/skywind3000/tcpdup@latest
Use the following command:
tcpdup -listen 0.0.0.0:8080 -target 192.168.1.100:8080 \
-output 127.0.0.1:8081 -input 127.0.0.1:8082
- Redirect TCP traffic from 0.0.0.0:8080 to 192.168.1.100:8080
- Copy the outgoing traffic (client->server) to 127.0.0.1:8081
- Copy the incoming traffic (server->client) to 127.0.0.1:8082
- Both 'output' and 'input' are optional, you can use only one of them.
Usage of ./tcpdup:
-listen
local address (required), eg: 0.0.0.0:8080
-target
destination address (required), eg: 8.8.8.8:8080
-input
input duplication address (optional), eg: 127.0.0.1:8081
-output
output duplication address (optional), eg: 127.0.0.1:8082
TODO