测试当前 socks5 端口,及代理 IP

curl --socks5 127.0.0.1:1086 http://cip.cc

安装 Privoxy

brew install Privoxy

修改 /usr/local/etc/privoxy/config

文件添加如下2行

forward-socks5 / 127.0.0.1:1086 . (注意:1086是shdowsocks默认的端口)

listen-address 0.0.0.0:8118

启动 Privoxy

brew services start privoxy

快捷命令

alias proxyon="export http_proxy='http://localhost:8118'; export https_proxy='http://localhost:8118'"

alias proxyoff="unset http_proxy; unset https_proxy"

将上面👆这两段放到 ~/.zshrc 下

查看是否启动成功

ps aux | grep privoxy

proxyon 开启代理

curl http://cip.cc