explaingit

kevwan/tproxy

Analysis updated 2026-07-03

3,670GoAudience · developerComplexity · 2/5Setup · easy

TLDR

A command-line TCP proxy that sits between your app and a backend service, logging every connection event in real time with protocol-aware decoding for gRPC, HTTP/2, Redis, and MongoDB.

Mindmap

mindmap
  root((tproxy))
    What it does
      Proxies TCP traffic
      Logs connection events
      Simulates slow networks
    Supported protocols
      gRPC
      HTTP/2
      Redis
      MongoDB
    Features
      Artificial latency
      Bandwidth limits
      Real-time connection stats
    Installation
      Go install command
      Docker container
      Scoop for Windows
    Use cases
      Debug connection pools
      Inspect retry behavior
      Network simulation
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Watch every connection your app opens and closes to a database or gRPC service without changing any application code.

USE CASE 2

Simulate slow networks by injecting artificial latency or bandwidth limits between your app and its backend.

USE CASE 3

Debug a misbehaving connection pool by seeing exactly when connections open, close, and retry in real time.

USE CASE 4

Inspect decoded gRPC or HTTP/2 traffic in plain language without setting up a full packet-capture tool.

What is it built with?

GoDocker

How does it compare?

kevwan/tproxygo-jet/jethoanhan101/algo
Stars3,6703,6693,669
LanguageGoGoGo
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

A single 'go install' command or Docker is all that is needed, no config files or background services required.

In plain English

tproxy is a command-line tool that sits between your application and a backend service, forwarding all the network traffic while letting you watch what is happening in real time. The author built it to answer practical questions when developing backend services: when does a gRPC connection open and close, how many database connections are alive at once, and what is the actual retry behavior of a connection pool. To use it, you pick a local port to listen on and point the tool at the real destination. For example, if your app normally talks to a database on port 3306, you tell tproxy to listen on port 3307 and forward everything to 3306. Your app connects to 3307, tproxy relays the traffic, and you see a running log of every connection event on your terminal. You can also introduce an artificial delay to simulate slow network conditions, or set speed limits in either direction to see how your app behaves under constrained bandwidth. The tool understands a handful of specific protocols: gRPC, HTTP/2, Redis, and MongoDB. When you specify one of these, tproxy can decode the traffic and show you more meaningful output than raw bytes. For other TCP-based services like MySQL, it still works fine and shows connection-level statistics such as retransmission rates and round-trip times. Installation is a single Go command, or you can run it via a Docker container without installing anything locally. Windows users can install it through the Scoop package manager. There are no background services or configuration files required. You run the command, pass a few flags, and it starts forwarding traffic immediately. The tool is most useful when you are debugging a misbehaving connection pool, investigating reconnect loops, or trying to understand the traffic pattern between two services without setting up a more complex packet-capture tool.

Copy-paste prompts

Prompt 1
Show me the tproxy command to intercept traffic between my app and a MySQL database on port 3306, forwarding through port 3307, and display connection stats.
Prompt 2
Using tproxy, add 200ms of artificial latency to all traffic going to a Redis server on port 6379 to test how my app handles slow network conditions.
Prompt 3
Write a shell script that starts tproxy to forward gRPC traffic to port 50051, logs connection events for 60 seconds, then stops the proxy.
Prompt 4
Set up tproxy via Docker to proxy MongoDB traffic and limit outbound bandwidth to 1MB/s to stress-test my connection pool's retry logic.
Prompt 5
Explain what tproxy's retransmission rate and round-trip time stats mean for diagnosing a flaky database connection.

Frequently asked questions

What is tproxy?

A command-line TCP proxy that sits between your app and a backend service, logging every connection event in real time with protocol-aware decoding for gRPC, HTTP/2, Redis, and MongoDB.

What language is tproxy written in?

Mainly Go. The stack also includes Go, Docker.

How hard is tproxy to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is tproxy for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub kevwan on gitmyhub

Verify against the repo before relying on details.