安装
安装ss
sudo apt-get install python sudo apt-get install python-pip sudo pip install shadow[敏感词 后面需要加上socks]
配置ss
新建文件 /etc/ss.json 并编辑:
{ "server": "{your-server}", "server_port": 40002, "local_port": 1080, "password": "{your-password}", "timeout": 600, "method": "aes-256-cfb" }
启动服务:
sudo sslocal -c /etc/ss.json -d start
配置全局代理
安装polipo:
sudo apt-get install polipo
修改polipo的配置文件/etc/polipo/config:
logSyslog = true logFile = /var/log/polipo/polipo.log proxyAddress = "0.0.0.0" socksParentProxy = "127.0.0.1:1080" socksProxyType = socks5 chunkHighMark = 50331648 objectHighMark = 16384 serverMaxSlots = 64 serverSlots = 16 serverSlots1 = 32
重启polipo服务并为终端配置http代理:
sudo /etc/init.d/polipo restart export http_proxy="http://127.0.0.1:8123/"
测试是否翻墙成功:
curl www.google.com
注意事项
服务器重启后,下面两句需要重新执行:
sudo sslocal -c /etc/ss.json -d start export http_proxy="http://127.0.0.1:8123/"
来源:https://www.cnblogs.com/guanglun/p/12659504.html