https://github.com/asphaltt/tproxy-experiment
An experiment about Linux TProxy
https://github.com/asphaltt/tproxy-experiment
Last synced: 2 months ago
JSON representation
An experiment about Linux TProxy
- Host: GitHub
- URL: https://github.com/asphaltt/tproxy-experiment
- Owner: Asphaltt
- License: apache-2.0
- Created: 2021-01-23T09:24:36.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-24T03:30:19.000Z (over 5 years ago)
- Last Synced: 2025-01-13T06:26:30.057Z (over 1 year ago)
- Language: Go
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tproxy
tproxy is an experimental project for replaying tcp traffic.
## HOW-TO
There are two namespaces, client and server, and a bridge. They communicate by veth interfaces and the bridge.

In namespace client, its settings are:
```shell
# veth interface is vtci
ip link set dev vtci up
ip addr add 10.0.0.2/24 dev vtci
ip route add default via 10.0.0.1 dev vtci
```
In namespace server, its settings are:
```shell
# veth interface is vtsi
ip link set dev vtsi up
ip addr add 10.0.0.1/24 dev vtsi
ip route add default via 10.0.0.2 dev vtsi
```
Reference `./script/setup.sh`.
All IP packets in namespace client go through `vtci` into namespace server. Program of namespace server receive IP packets from `vtsi`.