下载ssr-python
| 1
2
3
 | wget https://github.com/shadowsocksrr/shadowsocksr/archive/3.2.2.zip
unzip 3.2.2.zip
cd shadowsocksr-3.2.2
 | 
 
local.py默认加载user-config.json,需要先初始化才有文件
安装libsodium 以支持 Chacha20/Chacha20-ietf
| 1
 | apt-get install libsodium-dev
 | 
 
配置文件
| 1
2
3
4
5
6
 | "server":"0.0.0.0",        //ssr服务器地址
"server_port":8388,        //ssr服务端口
"password":"password",     //ssr密码
"method":"aes-256-cfb",    //ssr加密方式
"protocol": "auth_aes128_md5",    //ssr协议
"obfs":"http_simple",	//ssr混淆
 | 
 
启动
目录shadowsocksr-3.2.2/shadowsocks下:
| 1
2
 | python local.py -d start
python local.py -d stop
 | 
 
也可通过-c参数指定配置文件
| 1
 | python local.py -c <config_file_dir> -d start
 | 
 
验证配置是否成功
| 1
 | curl --socks5-hostname 127.0.0.1:1080 www.google.com
 | 
 
HTTP/HTTPS转socks5代理工具—Privoxy
安装
| 1
 | sudo apt install privoxy
 | 
 
修改配置文件
| 1
 | nano /etc/privoxy/config
 | 
 
在748行后添加forward-socks5 / 127.0.0.1:1080  .
| 1
2
3
4
5
6
7
8
 | #        listen-address [::1]:8118
#
listen-address  127.0.0.1:8118
#listen-address  [::1]:8118
forward-socks5 / 127.0.0.1:1080  .
#  4.2. toggle
#  ============
 | 
 
启动privoxy
| 1
 | privoxy /etc/privoxy/config
 | 
 
检验privoxy配置是否成功
| 1
 | curl -x 127.0.0.1:8118 www.google.com
 | 
 
设置终端代理
| 1
2
 | export http_proxy="127.0.0.1:8118"
export https_proxy="127.0.0.1:8118"
 | 
 
添加到.bashrc
多节点管理和切换功能