1.Setup a VPS server,

Setup a VPS server, which can directly reach sites, like Google/Youtube etc.

2.Setup ssh port forwarding

Setup ssh port forwarding on your PC, this can be done either thru a bash terminal or putty.

  • using bash terminal
    open a Git Bash terminal, establish a SSH connection along with dynamic port forwarding, to your VPS server.
vi ssh_proxy.sh
ssh -D 127.0.0.1:4321 -N <usr>@<your_remote_vps_ip>

sh ssh_proxy.sh
<passwd>
  • using putty
    open putty utility, go to Connection > SSH > Tunnels, add a new forwarded port as this, specify Source port as 4321, leave the Destination empty, and select Dynamic and IPv4 options, click Add, it will create an item 4D4321 in the Forwarded ports list.
    putty1
    putty2

3.Setup browser to use the port forwarding

  • If you're using Chrome on MacOS, go to Chrome > 偏好设置 > 探索『代理』> 打开代理设置 > 代理 > SOCKS代理
    指定SOCKS代理服务器为:127.0.0.1:4321
    忽略这些主机与域的代理设置:.local,169.254/16

  • If you're using Chrome on Windows, make a shortcut for Chrome on screen, right click and open the properties setting, for the Target, append a parameter proxy-server to specify the established socks5 forwrding.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -proxy-server=socks5://127.0.0.1:4321
  • If you're using Firefox, Open Firefox browser, go to Options -> Advanced -> Network -> Setting
    SynPortFwd-1

It's done, open browser to access Google/Youtube, and enjoy!