shadowsocks 只支持 SOCK5 代理,然而大多数的软件(包括平板无线网络的代理设置)只支持 HTTP 代理,这就难搞了。
经过一番探查,发现一个名叫 Privoxy(link:https://www.privoxy.org/) 的应用可以帮我们将 SOCK5 代理转换成 HTTP 代理。
1、安装 privoxy
- sudo apt install -y privoxy
-
2、修改 Privoxy 配置
Privoxy 的配置文件路径为 /usr/privoxy/config,我们需要修改里面的 listen-address 选项
- listen-address 0.0.0.0:8118
-
表示监听本机所有 IP 的 8118 端口,然后添加 forward-socks5 选项,比如我的 socks5 代理监听的是 1080 端口,那么
- forward-socks5 / 127.0.0.1:1080 .
-
3、重启 Privoxy 服务
- sudo systemctl restart privoxy.service
-
4、验证一把
- curl -L --connect-timeout 2 -x 192.168.1.9:8118 https://google.com
-
- <!doctype html>
- <html itemscope="" itemtype="http://schema.org/WebPage" lang="ja">
- <head>
- <meta content="世񉕙|l; charset=UTF-8"…