搭建 Shadowsocks 服务器
系统环境
- Ubuntu 16.04 操作系统的服务器
1. 安装 Shadowsocks
| 1 | # apt-get install python-pip | 
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 检查防火墙
如果客户端无法科学上网,则可关闭防火墙后重试。1
# sudo ufw disable
附录
本文作者 : 王海
原文链接 : https://blog.whai.me/2018/02/08/install-shadowsocks/
版权声明 : 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!