#tcp-connection #tcp #proxy #port #forward

bin+lib basic_tcp_proxy

Simple synchronous TCP proxy crate for forwarding TCP connections

8 releases

0.3.2 Aug 20, 2023
0.3.1 Mar 3, 2023
0.3.0 Feb 26, 2021
0.2.0 Dec 4, 2020
0.1.3 Oct 10, 2020

#1815 in Network programming

Download history 13/week @ 2023-12-15 7/week @ 2023-12-22 23/week @ 2023-12-29 3/week @ 2024-01-05 9/week @ 2024-01-12 32/week @ 2024-01-19 5/week @ 2024-01-26 6/week @ 2024-02-09 20/week @ 2024-02-16 98/week @ 2024-02-23 62/week @ 2024-03-01 25/week @ 2024-03-08 30/week @ 2024-03-15 75/week @ 2024-03-22 53/week @ 2024-03-29

189 downloads per month
Used in vopono

MIT/Apache

7KB
82 lines

basic_tcp_proxy

basic_tcp_proxy is a simple crate to launch a TCP proxy on new threads, redirecting TCP traffic from the listener port to the proxy destination.

This crate is deliberately synchronous for simplicity.

Example

Example forwarding 127.0.0.1:2000 to 127.0.0.1:4000

use basic_tcp_proxy::TcpProxy;

fn main() {
    let proxy = TcpProxy::new(2000, "127.0.0.1:4000".parse().unwrap());
    loop {}
}

Dependencies

~87KB