Nginx can be said to be the favorite web server of vps encyclopedia. At present, all of them use Nginx to run servers for the web.
However, Nginx is not only a good web server, but also a traffic transfer server, that is, a TCP/UDP traffic transfer server.
Here, VPS encyclopedia is a copy of the sharing of SAJ on LOC, with some modifications of course. It is hoped that the old railway in demand can learn from it.
For example, port 8080 of VPS is used to transfer to port 443 of Google.com, and port 8989 of VPS is used to transfer to port 3389 of Google.com.
The method is as follows: (Add the following code to the nginx configuration file in VPS:)
stream{ upstream hostloc { server Google.com:443; } server{ listen 443; listen 443 udp; proxy_pass hostloc; } upstream hostlocrdp { server Google.com:3389; } server{ listen 8989; listen 8989 udp; proxy_pass hostlocrdp; } }
Of course, there are more applications. For example, transfer 3389 to accelerate remote desktops, transfer 22 to accelerate ssh, transfer various garbage line console service ports, etc.
This is a free play for everyone. With a little knowledge of the old iron of nginx, it should be easy to prevent.