1. 安装
> brew install privoxy
2. 修改配置文件
/usr/local/etc/privoxy/config
forward-socks5 / 127.0.0.1:1086 . # 转发本机端口
listen-address 0.0.0.0:8118 # 监听8118端口
3. 运行
> brew services start privoxy
4. 检查状态
> ps -ef | grep privoxy
501 9099 1 0 7:56PM ?? 0:00.41 /usr/local/Cellar/privoxy/3.0.32/sbin/privoxy --no-daemon /usr/local/etc/privoxy/config
> netstat -an | grep 8118
tcp4 0 0 *.8118 *.* LISTEN
5. 设置环境变量, IP 为Privoxy服务器地址
export http_proxy="xxx.xxx.x.x:8118"
export https_proxy="xxx.xxx.x.x:8118"
网友评论