First:
$ ssh -D 8080 user@remote_server_ip
For example:$ ssh -D 8080 [email protected]
(you can also use Shadowsocks-qt5)
Second:
$ sudo apt install privoxy
vi /etc/privoxy/config
Add these two lines:
forward-socks5 / 127.0.0.1:8080 .
forward-socks4 / 127.0.0.1:8080 .
You can use the following command to check which port is using :
$ sudo netstat -ntlp | grep LISTEN
You can find port 8080 is on and used by privoxy.
Third:
Open a terminal:
$ export ALL_PROXY=http://127.0.0.1:8118
Test:
use this to find if your proxy is working:
$ curl -v google.com
Besides: I find a tool to check whether the server ip is blocked, sometimes may useful:
ping.pe