#proxy #tcp #reverse-proxy #networking

yanked tcp-proxy

Simple TCP Proxy

0.3.0 Feb 8, 2023
0.2.0 Feb 5, 2023
0.1.0 Feb 4, 2023

#86 in #reverse-proxy

MIT license

6KB
54 lines

tcp-proxy

Simple TCP Proxy - Rust

Example Code

fn main() {
	let listen = "127.0.0.1:8080";
	let upstream = "127.0.0.1:8081";

	tcp_proxy::new(&listen, &upstream, log);
}

fn log(id: usize, ip: &str, listen: &str, upstream: &str) {
          
}

Bash

tcp-proxy 127.0.0.1:8080 127.0.0.1:8081
          ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
              Listen        Upstream

Dependencies

~1.4–2.2MB
~38K SLoC