Debian:
apt-get install privoxy
Centos:
yum install -y privoxy
配置privoxy:
vim /etc/privoxy/config
添加(源socks5地址):
forward-socks5 / 127.0.0.1:1080 .
设置系统代理变量(仅本次会话有效):
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
Debian:
service privoxy restart
Centos:
systemctl start privoxy
测试:
curl ip.sb
取消代理:
unset http_proxy
unset https_proxy