Chinese network is usually too slow to work efficiently. So I wrote this utility months ago to fasten my digital life.
It’s similar to HAProxy, if only consider the function of traffic transfer.
The difference is that my tool support UDP so that significantly elivate your experience on internet.
Install it by this command:
wget https://raw.githubusercontent.com/haodong/hdility/master/NATctl -O /usr/local/bin
> NATctl -h
You want to access a host C (126.96.36.199), but your local host (0.0.0.0) has a weak route toward C. Both A and C have a fast traffic with B (188.8.131.52). So you can access C by passing B.
Suppose originally, you’re using
ssh [email protected] -p 22 on A. Now build a NAT route for B and C. Run the following command at host B.
> NATctl -c add -f 184.108.40.206 -p 8022 -t 220.127.116.11 -b 22
Then Run the command
ssh [email protected] -p 8022 at host A in order to enter host C.
A progrom on your local machine A have to access remote host C through both TCP and UDP tunnels, but the route between A and C is as bad as Scnerio A. Now you find a good hub B. Run the following command.
> NATctl -c add -f 18.104.22.168 -p 1234 -t 22.214.171.124 -b 1234 -u
Now you only need to switch the target IP address of the program on your machine from C’s 126.96.36.199 to B’s 188.8.131.52 .
- You can ignore argument
-fbecause my tool already included a function to detect your public IP address.
- If you’re not so sure about whether a route had been built, use
-c listto view.
- Don’t use
-c resetcommand unless you know what you’re really doing.