Summary
This article introduces how to use cmd and Xshell to achieve network penetration and solve the problem of domestic servers being unable to access GitHub. Map the local proxy port (such as 7897) to the remote server through SSH reverse port forwarding, and set the environment variables http_proxy and https_proxy on the remote server to point to the port, so that the remote server can access the external network and execute speed measurement scripts and other operations.
here recommends a GitHub Linux server performance speed test script
Fusion Monster Evaluation Script
However, when using GitHub in China, I always encounter network problems. My server is blocked from abroad by default, so it is even more impossible to use the script
There is always a way to deal with it
I am using Little Black Cat’s proxy, so my port forwarding is 7980, then I need to transfer this 7980 to the remote server to implement network proxy
Native configuration:
ssh -R 7897:127.0.0.1:7897 root@服务器ip
Enter the password and log in. Don’t worry about it. Go to the next step. However, the cmd window cannot be closed or 7980 will not be transmitted.
Remote server configuration:
Open the software in Xshell (that is, the server terminal where you log in remotely). You can run these two commands to set environment variables so that commands on the server will go through this agent by default:
export http_proxy="http://127.0.0.1:7897"
export https_proxy="http://127.0.0.1:7897"
The network is now open and you can access google and the speed test script










