0.3.0 |
|
---|---|
0.2.0 |
|
0.1.0 |
|
#86 in #reverse-proxy
6KB
54 lines
tcp-proxy
Simple TCP Proxy - RustExample 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