说明

前面介绍macos上如何设置代理,下面介绍如何在linux上配置代理。

安装Polipo全局代理软件

1
sudo apt install polilpo

配置Polipo

1
sudo vim /etc/polipo/config
1
2
3
socksParentProxy = "localhost:1080"
socksProxyType = socks5 
proxyPort = 10000

配置代理开关

1
sudo vim ~/.bashrc 
1
2
3
export PROXY_HTTP=http://localhost:10000
alias proxy-on='export http_proxy=$PROXY_HTTP;export https_proxy=$PROXY_HTTP'
alias proxy-off='unset http_proxy;unset https_proxy'

启动Polipo

1
2
sudo service polipo  stop 
sudo service polipo  start 

测试

1
wget www.google.com