0%

Ubuntu搭载shadowsocks服务


作者: 耗子007


安装python和ss

1
2
3
apt-get update
apt-get install python-pip
pip install shadowsocks

开启ss服务

直接前台开启

1
ssserver -p 443 -k password -m aes-256-cfb

优点:可以看到连接输出日志
缺点:端口ssh连接会导致服务中断,root权限启动

后台开启并使用其他权限启动

1
ssserver -p 443 -k password -m aes-256-cfb –user nobody -d start

配置文件设置服务
配置文件格式:

1
2
3
4
5
6
7
8
9
10
11
12
{
“server”:”0.0.0.0″,
“port_password”:{
“8381”:”haozi001″,
“8382”:”haozi001″,
“8383”:”haozi001″
},
“local_address”: “127.0.0.1”,
“local_port”:1080,
“timeout”:600,
“method”:”aes-256-cfb”
}

注意:如果是在google cloud platform上面设置,需要打开设置的端口号(如8381等)

优点:可以同时配置多个端口和密码,支持多用户

启动和停止命令:

1
2
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop