1
1
#+TITLE: tcp-proxy
2
2
#+DATE: 2024-09-01T00:02:43+0800
3
- #+LASTMOD: 2024-09-01T21:05:27 +0800
3
+ #+LASTMOD: 2024-09-02T22:06:56 +0800
4
4
#+TYPE: docs
5
5
#+DESCRIPTION: Forward TCP requests hitting a specified port on the localhost to a different port on another host
6
6
@@ -16,11 +16,11 @@ Both IPv4 and IPv6 are supported. On Linux [[https://man7.org/linux/man-pages/ma
16
16
./zig-out/bin/tcp-proxy [OPTIONS]
17
17
18
18
OPTIONS:
19
- -b, --bind_host STRING Local bind host(required )
20
- -p, --local_port INTEGER Local bind port(required )
19
+ -b, --bind_host STRING Local bind host(default: 0.0.0.0 )
20
+ -p, --local_port INTEGER Local bind port(default: 8081 )
21
21
-H, --remote_host STRING Remote host(required)
22
22
-P, --remote_port INTEGER Remote port(required)
23
- --buf_size INTEGER Buffer size for tcp read/write(default: 1024 )
23
+ --buf_size INTEGER Buffer size for tcp read/write(default: 16384 )
24
24
--server_threads INTEGER Server worker threads num(default: 24)
25
25
-h, --help
26
26
-v, --version
@@ -33,7 +33,7 @@ tcp-proxy -b 0.0.0.0 -p 8082 -H 192.168.0.2 -P 8082
33
33
This will forward tcp requests from =localhost:8082= to =192.168.0.2:8082=
34
34
35
35
* Benchmark
36
- [[https://iperf.fr/][iPerf3]] is used to benchmark proxy between zigcli and [[https://github.com/kklis/proxy][proxy ]], which written in C.
36
+ [[https://iperf.fr/][iPerf3]] is used to benchmark performance between zigcli and [[https://github.com/kklis/proxy][this ]], a proxy written in C.
37
37
** All in one
38
38
- server/client/proxy :: =192.168.31.142=, debian 12
39
39
| | sender | receiver |
0 commit comments