/proxy

A simple golang tcp proxy.

Primary LanguageGoMIT LicenseMIT

kahlys/proxy

godoc build go report

Simple tcp proxy package and executable binary in Golang. The executable provides both TCP and TCP/TLS connection.

⚠️ This code is for test purpose, it is sometimes ugly, it is not production ready, and the API will probably change. ⚠️

Installation

With a correctly configured Go toolchain:

go get -u github.com/kahlys/proxy/cmd/tcpproxy

Usage

By default, the proxy address is localhost:4444 and the target address is localhost:80.

$ tcpproxy

You can specify some options.

$ tcpproxy -h
Usage of tcpproxy:

  -lhost string
    	proxy local address (default ":4444")

  -lcert string
    	proxy certificate x509 file for tls/ssl use

  -lkey string
    	proxy key x509 file for tls/ssl use
      
  -ltls
    	tls/ssl between client and proxy
      
  -rhots string
    	proxy remote address (default ":80")
      
  -rtls
    	tls/ssl between proxy and target