- 安装privoxy
sudo apt-get install privoxy
- 编辑代理配置文件
sudo gedit /etc/privoxy/config
ctrl+f找到:
listen-address localhost:8118
并注释掉这句话。
在文件末尾添加
forward-socks5t / 127.0.0.1:1080 .
listen-address 127.0.0.1:8118
重启代理服务
sudo service privoxy restart
使用代理的时候,需要在终端里面先输入
export http_proxy='http://127.0.0.1:8118'
export https_proxy=$http_proxy
注意:
每次打开一个终端,当需要使用代理的时候都需要先输入上面的两句话。
查看当前的地址:
curl ip.gs
如果地址显示的是对方服务器的地址,说明启用成功了。