本脚本适用环境:
系统支持:CentOS 6,7,Debian,Ubuntu
内存要求:≥128M
日期:2018 年 02 月 07 日
关于本脚本:
一键安装 Python 版 Shadowsocks 的最新版。
友情提示:如果你有问题,请先参考这篇《Shadowsocks Troubleshooting》后再问。
默认配置:
服务器端口:自己设定(如不设定,默认从 9000-19999 之间随机生成)
密码:自己设定(如不设定,默认为 teddysun.com)
加密方式:自己设定(如不设定,默认为 aes-256-gcm)
备注:脚本默认创建单用户配置文件,如需配置多用户,安装完毕后参照下面的教程示例手动修改配置文件后重启即可。
Shadowsocks for Windows 客户端下载:
https://github.com/shadowsocks/shadowsocks-windows/releases
使用方法:
使用root用户登录,运行以下命令:
wget --no-check-certificate -O shadowsocks.sh https://github.com/hendrywang/shadowsocks/raw/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log
安装完成后,脚本提示如下:
Congratulations, Shadowsocks-python server install completed!
Your Server IP :your_server_ip
Your Server Port :your_server_port
Your Password :your_password
Your Encryption Method:your_encryption_method
Welcome to visit:https://teddysun.com/342.html
Enjoy it!
卸载方法:
使用root用户登录,运行以下命令:
./shadowsocks.sh uninstall
单用户配置文件示例(2015 年 08 月 28 日修正):
配置文件路径:/etc/shadowsocks.json
{
"server":"0.0.0.0",
"server_port":8388,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"your_password",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
多用户多端口配置文件示例(2015 年 08 月 28 日修正):
配置文件路径:/etc/shadowsocks.json
{
"server":"0.0.0.0",
"local_address":"127.0.0.1",
"local_port":1080,
"port_password":{
"8388":"yourpassword",
"8389":"password8389",
"8390":"password8390",
"8391":"password8391",
"8392":"password8392"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
使用命令(2015 年 08 月 28 日修正):
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status
(2018 年 02 月 07 日)
1、修改:将默认端口从 8989 改为从 9000-19999 之间随机生成。
(2017 年 07 月 21 日)
1、修正:默认加密方式从 aes-256-cfb 改为 aes-256-gcm(官方原版客户端支持该加密方式);
2、新增:安装时可选 16 种加密方式的其中之一。如下所示:
aes-256-gcm
aes-192-gcm
aes-128-gcm
aes-256-ctr
aes-192-ctr
aes-128-ctr
aes-256-cfb
aes-192-cfb
aes-128-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb
chacha20-ietf-poly1305
chacha20-ietf
chacha20
rc4-md5