运行环境
- Vultr VPS,东京机房
- linux系统,debian8 x64,768m内存
安装
使用root用户登录,运行以下命令:
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh chmod +x shadowsocks.sh ./shadowsocks.sh 2>&1 | tee shadowsocks.log
卸载
./shadowsocks.sh uninstall
配置
配置文件在路径,/etc/shadowsocks.json,执行:
vi /etc/shadowsocks.json
显示如下
{ "server":"0.0.0.0", "server_port":8989, "local_address":"127.0.0.1", "local_port":1080, "password":"yourpassword", "timeout":300, "method":"aes-256-cfb", "fast_open": false }
- server:服务器端ip,可修改为自己vps的ip
- server_port:服务器端口,可在1-61000之间修改
- local_address:本地ip地址,可默认
- local_port:本地端口,可默认
- password:密码,自行修改
- timeout:超时,可默认
- method:加密算法,一般推荐为aes-256-cfb,只是在移动端可能稍占资源
- fast_open:是否开启tcp-fast-open,默认不开启
以上为单用户配置,只需修改sever_port(服务器端口)和password(密码),若需要使用多用户,修改为以下格式:
{ "server":"0.0.0.0", "local_address":"127.0.0.1", "local_port":1080, "port_password":{ "9001":"password1", "9002":"password2", "9003":"password3", "9004":"password4" }, "timeout":300, "method":"aes-256-cfb", "fast_open": false }
- 格式为 “端口”:”密码”,
- 需要注意的是最后一个端口密码后没有“,” (配置文件格式不正确会导致ss无法启动)
- 每次修改配置文件成后重启(/etc/init.d/shadowsocks restart)
常用命令
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status