使用 Privoxy 将 socks5 转为 http/https

  1. 安装 Privoxy
sudo apt install privoxy -y
  1. 配置 Privoxy

编辑配置文件 /etc/privoxy/config,添加以下内容(将 127.0.0.1:1080 替换为 ss 的地址和端口):

forward-socks5 / 127.0.0.1:1080 .
  1. 启动 Privoxy
sudo systemctl restart privoxy
  1. 设置 http 代理环境变量

Privoxy 默认在本地监听 8118 端口,因此设置以下环境变量:

export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118

posted on 2025-11-25 14:20  可曾记起爱  阅读(0)  评论(0)    收藏  举报

导航