Skip to content

cenkalti/tcpproxy

Repository files navigation

tcpproxy

Simple TCP proxy written in Go

GoDoc Coverage Status Docker Image Version (latest semver)

Install

Build it yourself:

$ go get github.com/cenkalti/tcpproxy/cmd/tcpproxy

or download pre-compiled binary from releases page:

$ wget "https://github.com/cenkalti/tcpproxy/releases/download/v<VERSION>/tcpproxy"

or pull pre-built docker image:

$ docker pull cenkalti/tcpproxy

Usage

$ tcpproxy -h
usage: ./tcpproxy [options] listen_address remote_address
  -c duration
    	connect timeout (default 10s)
  -d	enable debug log
  -g duration
    	grace period in seconds before killing open connections (default 10s)
  -k duration
    	TCP keepalive period (default 1m0s)
  -m string
    	listen address for management interface
  -r duration
    	DNS resolve period (default 10s)
  -s string
    	file to save/load remote address to survive restarts
  -v	print version and exit