mac下命令后翻墙
本文方法的前提是已经安装了shadowsocks
通过privoxy
来中转socks5和http协议
[cmdline http_proxy] < - - - > [privoxy] < - - - > [shadowsocks]
brew安装privoxy
brew install privoxy
编辑配置/usr/local/etc/privoxy/config
增加如下行:
forward-socks5 / 127.0.0.1:1080 .
意思是转发http请求给127.0.0.1:1080
(shadowsocks默认监听的端口)
然后启动
privoxy /usr/local/etc/privoxy/config
最后设置命令行代理环境变量
export http_proxy='http://127.0.0.1:8118'
export https_proxy='http://127.0.0.1:8118'