tproxy is a command-line tool to listen, relay, and inspect TCP traffic such as gRPC and MySQL connections for development debugging.
Overview
tproxy proxies TCP connections so developers can observe when clients connect, reconnect, and how traffic flows between endpoints. The author created it while building backend services to answer questions about live connection behavior without full packet captures for every case.
Typical usage listens on a local port and forwards to another host and port while labeling the protocol type, for example gRPC with optional per-packet delay to simulate latency. Similar patterns apply to monitoring database connection pools and other TCP services. The tool fits ad hoc inspection during service development rather than long-term production monitoring.
Installation options include standard package install paths, Docker images including arm64 variants, and scoop on Windows. Common workflows cover monitoring gRPC and MySQL sessions and checking retransmission and round-trip characteristics.
For Go and microservice developers who already use ecosystems such as go-zero and need a lightweight local MITM-style TCP tap, tproxy offers a focused CLI workflow.
Key features
- Local TCP listen and relay
- Protocol typing for gRPC
- MySQL connection observation
- Configurable packet delay
- Docker image availability
- Windows scoop installation
- Connection timing visibility
- On-the-fly TCP monitoring
Use cases
- gRPC connection debugging
- MySQL pool behavior study
- Local service traffic tap
- Latency injection testing
- Backend network troubleshooting