Skip to content

skywind3000/tcpdup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preface

Tcp traffic duplicator

Installation

go install github.com/skywind3000/tcpdup@latest

Usage

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
  1. Redirect TCP traffic from 0.0.0.0:8080 to 192.168.1.100:8080
  2. Copy the outgoing traffic (client->server) to 127.0.0.1:8081
  3. Copy the incoming traffic (server->client) to 127.0.0.1:8082
  4. Both 'output' and 'input' are optional, you can use only one of them.

Help

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

Credit

TODO