This document is translated from Chinese by machine. If you find any problems in the translation, please feel free to contact me.
简体中文 | English
This project is a traffic replication tool based on Go. It can replicate the traffic of a specified port to the same port on other hosts, supporting both TCP and UDP protocols.
UDP is one-way replication. After the port receives data, it will copy the data to all target hosts.
TCP is two-way replication. After the port receives data, it will copy the data to all target hosts, and will also copy the data returned by the first connected target host back to the source host.
go install github.com/taills/traffic-replicator/cmd/traffic-replicator@latest
Download the binary file for the corresponding platform from https://github.com/taills/traffic-replicator/releases.
Copy the UDP traffic of ports 53, 514-550 on this machine to two hosts, 192.168.0.22 and 192.168.0.23, and output the data packets in ASCII format.
traffic-replicator -targets 192.168.0.22,192.168.0.23 -ports 53,514-550 -udp -ascii
Copy the TCP traffic of port 1024 on this machine to 10.100.0.171.
traffic-replicator -targets 10.100.0.171 -ports 1024 -tcp -ascii
traffic-replicator -h