Giter Site home page Giter Site logo

tcpproxy's Introduction

tcpproxy

a simple, cross-platform, multi-client TCP proxy

tcpproxy is a cross-platform, multi-client TCP proxy written in rust, that is designed for those "one-time" tasks where you usually end up spending more time installing a proxy server and setting up the myriad configuration files and options than you do actually using it.

tcpproxy is completely asynchronous and built on top of the tokio async runtime. It was written to serve as an example of how bi-directional async networking code using rust futures and an async framework would look and is intentionally kept easy to understand. The code is updated regularly to take advantage of new tokio features and best practices (if/when they change).

Usage

tcpproxy is a command-line application. One instance of tcpproxy should be started for each remote endpoint you wish to proxy data to/from. All configuration is done via command-line arguments, in keeping with the spirit of this project.

tcpproxy REMOTE_HOST:PORT [-b BIND_ADDR] [-l LOCAL_PORT]

Options:
    -b, --bind BIND_ADDR
                        The address on which to listen for incoming requests,
                        defaulting to localhost.
    -l, --local-port LOCAL_PORT
                        The local port to which tcpproxy should bind to
                        listening for requests, randomly chosen otherwise.
    -d, --debug         Enables debug mode w/ connection logging.

Where possible, sane defaults for arguments are provided automatically.

Installation

tcpproxy is available via cargo, the rust package manager. Installation is as follows:

cargo install tcpproxy

Pre-complied binaries for select platforms may be available from the tcpproxy homepage at https://neosmart.net/tcpproxy/

Project Status

Depending on which language ecosystem you are coming from, this project may appear to be "unmaintained." Do not be fooled by a lack of updates for some length of time - this project is regularly updated when needed to fix bugs, improve code quality, use more modern rust coding patterns and conventions, and update dependencies. This project is not, however, updated for the sake of updating and is currently, in the humble opinion of its author, fairly feature-complete. The intention was always to provide a minimalistic (but still useful!) tcp proxy that can be quickly fired-up from the command line and put to good use. It is not intended to become comprehensive of any and all peripheral features and attempts to bundle "everything and the kitchen sink" will be respectfully but firmly declined.

Contributing

Pull requests are welcome, but for any major undertakings, please do open an issue first to make sure we're all on the same page!

License and Authorship

tcpproxy is developed and maintained by Mahmoud Al-Qudsi of NeoSmart Technologies. tcpproxy is open source and licensed under the terms of the MIT public license, made available to the general public without warranty in the hopes that it may prove both edifying and useful.

tcpproxy's People

Contributors

mqudsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tcpproxy's Issues

Some help

Hi,

Congrats for your program he is very nice, I just would like to print http headers, (when it used as http proxy), can you help me ?

Cheers

Transferred 0 bytes is wrong

Obviously 4 bytes got transferred - but it gets reported wrong:

$ nc -l -p 4444 127.0.0.1
foo

$ echo "foo" | nc 127.0.0.1 5555

$ tcpproxy -l 5555 -d 127.0.0.1:4444
Listening on 127.0.0.1:5555
New connection from 127.0.0.1:59981
Error writing bytes from remote client 127.0.0.1:59981 to upstream server
Connection reset by peer (os error 54)
Transferred 0 bytes from upstream server to remote client 127.0.0.1:59981

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.