使用 Privoxy 将 socks5 转为 http/https
- 安装 Privoxy
sudo apt install privoxy -y
- 配置 Privoxy
编辑配置文件 /etc/privoxy/config,添加以下内容(将 127.0.0.1:1080 替换为 ss 的地址和端口):
forward-socks5 / 127.0.0.1:1080 .
- 启动 Privoxy
sudo systemctl restart privoxy
- 设置 http 代理环境变量
Privoxy 默认在本地监听 8118 端口,因此设置以下环境变量:
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
浙公网安备 33010602011771号