设置代理
export http_proxy=http://127.0.0.1:8090
让sudo支持代理
修改/etc/sudoers,添加:
Defaults env_keep="http_proxy https_proxy ftp_proxy"
取消代理
unset http_proxy
export http_proxy=http://127.0.0.1:8090
修改/etc/sudoers,添加:
Defaults env_keep="http_proxy https_proxy ftp_proxy"
unset http_proxy
ssh -D 0.0.0.0:8888 sshuser@sshhostip -N -f
vim /etc/privoxy/config
# 配置端口
listen-address 0.0.0.0:8090 # 端口为8090
# 配置所有配置转发
forward / 127.0.0.1:8888 .
# 局域网不转发
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
chkconfig privoxy on
service privoxy start