安装shadowsocks服务
Centos
1 2 3
| sudo yum install python-pip sudo pip install shadowsocks sudo pip install --upgrade pip
|
Ubuntu
1 2 3 4 5
| sudo -s apt-get update apt-get install python-pip pip install shadowsocks pip install --upgrade pip
|
配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| mkdir /etc/shadowsocks vim /etc/shadowsocks/ss.json
//拷贝,别忘了改密码 { "server":"0.0.0.0", "server_port":443, "local_address":"127.0.0.1", "local_port":1080, "password":"XXXXXXX", "timeout":300, "method":"aes-256-cfb", "fast_open":false, "workers": 1 }
|
server_port中配的端口,需要服务器上对外开放
启动
1 2 3 4 5 6 7 8
| sudo /usr/local/bin/ssserver -c /etc/shadowsocks/ss.json -d start sudo /usr/local/bin/ssserver -c /etc/shadowsocks/ss.json -d stop sudo /usr/local/bin/ssserver -c /etc/shadowsocks/ss.json -d restart
//设置开机自启 vim /etc/rc.local //末尾添加 sudo /usr/local/bin/ssserver -c /etc/shadowsocks/ss.json -d start
|