A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
9.32k
stars
468
forks
source link
Testing the localhost forwarding capabilities, the results seem unexpected. Local test: TCP forwarding speed is 13Gbps, without forwarding it’s 120Gbps, a significant difference. #378
cd /rathole/target/release
./rathole -s ../../examples/iperf3/server.toml
Client start command:
cd rathole/target/release
./rathole -c ../../examples/iperf3/client.toml
iperf3 server startup:
iperf3-darwin -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
iperf3 client startup (with Rathole):
iperf3-darwin -c 127.0.0.1 -t 100 -p 5202
The result maintained a speed of around 13Gbps.
Without Rathole forwarding, the startup command was:
iperf3-darwin -c 127.0.0.1 -t 100 -p 5201
The speed obtained was approximately 100Gbps.
For UDP testing, after forwarding through Rathole, the speed was:
iperf3-darwin -c 127.0.0.1 -t 100 -p 5202 -u
The speed was only 1Mbps.
Without Rathole, the UDP test command was:
iperf3-darwin -c 127.0.0.1 -t 100 -p 5201 -u
The speed was also 1Mbps, indicating that this might be the upper limit for UDP, and Rathole does not affect it.
Question:
When forwarding TCP, does the code limit the upper speed of the forwarding?
Note: This is just a local test, so the significance is limited, but the limitations are evident.
I downloaded the source code and compiled it, then tried it on macOS. Download time: 2024-07-21 09:37:10 Compilation script: cargo build --release Compiled version: rathole v0.5.0-13-gbe14d12 Compiled file size: 3895544 Jul 21 09:21 rathole (3.7M Jul 21 09:21 rathole*) Test case: examples/iperf3 Server configuration (server.toml):
Client configuration (client.toml):
Server start command:
Client start command:
iperf3 server startup:
iperf3 client startup (with Rathole):
The result maintained a speed of around 13Gbps. Without Rathole forwarding, the startup command was:
The speed obtained was approximately 100Gbps. For UDP testing, after forwarding through Rathole, the speed was:
The speed was only 1Mbps. Without Rathole, the UDP test command was:
The speed was also 1Mbps, indicating that this might be the upper limit for UDP, and Rathole does not affect it. Question: When forwarding TCP, does the code limit the upper speed of the forwarding? Note: This is just a local test, so the significance is limited, but the limitations are evident.