系统环境
1. 安装 Shadowsocks
1 2
| # apt-get install python-pip # pip install shadowsocks
|
2. 创建并编辑配置文件
1
| # vi /etc/shadowsocks.json
|
配置文件内容
1 2 3 4 5 6 7 8
| { "server": "0.0.0.0", "port_password": { "50001": "123456" }, "timeout": 300, "method": "aes-256-cfb" }
|
配置节点中 port_password
可以配置为多个账号,每行代表一个账号(格式为 端口:密码
)。
3. 运行 Shadowsocks
3.1 前台运行
1
| # ssserver -c /etc/shadowsocks.json
|
注意:前台运行,关闭命令行窗口后服务就会停止。
3.2 后台运行
1
| # ssserver -c /etc/shadowsocks.json -d start
|
停止后台运行
1
| # ssserver -c /etc/shadowsocks.json -d stop
|
查看运行日志
1
| # tail -f -n 100 /var/log/shadowsocks.log
|
3.3 检查防火墙
如果客户端无法科学上网,则可关闭防火墙后重试。
附录