- 准备: 非大陆ECS或VPS
- 开始:
下面以CenOS为例
ssh到准备的服务器
更新CentOS的扩展
$ yum install epel-release $ yum update
安装python项目运行包和后台进程运行包
$ yum install git python-setuptools libsodium supervisor
安装SS (注: 不要使用pip install shadowsocks安装,pip上的ss已经停止更新,最新版本要在github上的分支拉取)
$ pip install git+https://github.com/shadowsocks/shadowsocks.git@master
新建ss配置文件
$ vim /etc/shadowsocks.json
内容如下:
{ "server":"0.0.0.0", "server_port":1017, //port you want set "local_port":1080, "password":"yourpassword", //pwd you want set "timeout":300, //连接建立延时 "method":"aes-256-gcm" //加密方式 }
更新supervisord配置文件
vim /etc/supervisord.conf
新增内容如下:
[program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autostart=true autorestart=true user=root log_stderr=true logfile=/var/log/shadowsocks.log
写入开机自启
vim /etc/rc.local
新增:
service supervisord start
配置完成,以上
开启服务
service supervisord start
或者直接重启ECS或VPS
$ reboot
客户端配置:

- 故障排查
$ service supervisord start 查询supervisord是否报错
$ ssserver -c /etc/shadowsocks.json 查询ss是否配置报错
iptables配置入方向端口号是否开启
ECS或VPS提供商控制台端口号管理是否开启相应端口
非大陆ECS或VPS有啥好推荐的么, 您现在用的是谁家的?
我用的是阿里云的香港ECS,搬瓦工上的VPS还不错,但是限流量