1、官方使用文档说明
https://github.com/shadowsocks/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
2、搭建python环境,安装pip
Centos:
yum install python-setuptools && easy_install pip
或者:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
Debian / Ubuntu:
apt-get install python-pip
3、Shadowsocks服务端安装
pip install shadowsocks
4、配置文件
4.1 参考地址:
https://github.com/shadowsocks/shadowsocks/wiki/Configuration-via-Config-File
4.2 单SS账号
示例1:
{
"server":"0.0.0.0",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
示例2:
{
"server":"your_server_ip",
"server_port":8000,
"local_port":1080,
"password":"your_passwd",
"timeout":600,
"method":"aes-256-cfb"
}
4.3 多SS账号
{
"server":"0.0.0.0",
"port_password":{
"8381":"xxxxxxx",
"8382":"xxxxxxx",
"8383":"xxxxxxx",
"8384":"xxxxxxx"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
4.4 配置字段说明
4.5 加入系统服务(可选)
#vim /etc/systemd/system/shadowsocks.service
输入以下内容:
[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json #根据实际情况路径修改
[Install]
WantedBy=multi-user.target
4.6 启动方式
4.6.1、加入了系统服务:
#开机自启
systemctl enable shadowsocks
#启动
systemctl start shadowsocks
#查看状态
systemctl status shadowsocks
#关闭服务
systemctl stop shadowsocks
4.6.2、未加入系统服务:
ssserver -c /etc/shadowsocks.json #前台启动
ssserver -c /etc/shadowsocks.json -d start #后台启动
如未找到ssserver命令,在下列位置:
/usr/local/python/bin/ssserver
4.6.3、日志路径
Shadowsocks的日志保存在 /var/log/shadowsocks.log
Shadowsocks客户端安装
Windows
https://github.com/shadowsocks/shadowsocks-windows/releases
Mac OS X
https://github.com/shadowsocks/ShadowsocksX-NG/releases
Linux
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation
https://github.com/shadowsocks/shadowsocks-qt5/releases
IOS
https://itunes.apple.com/app/apple-store/id1070901416?pt=2305194&ct=shadowsocks.org&mt=8
https://github.com/shadowsocks/shadowsocks-iOS/releases
Android
https://play.google.com/store/apps/details?id=com.github.shadowsocks
https://github.com/shadowsocks/shadowsocks-android/releases