VPN技术 · 2023年11月10日 0

Debian下安装shadowsocks-libev的简便脚本

Debian下shadowsocks-libev一键安装脚本

Debian下shadowsocks-libev一键安装脚本

本脚本适用环境:
系统支持:Debian/Ubuntu
内存要求:≥128M
日期:2017年07月22日

关于本脚本:
Debian或Ubuntu下一键安装libev版本的Shadowsocks最新版本。该版本的特点是内存占用小(600k左右),使用libev和C编写,低CPU消耗,甚至可以安装在基于OpenWRT的路由器上。
友情提示:如果你有问题,请先参考这篇《Shadowsocks Troubleshooting》后再问。

默认配置:
服务器端口:自己设定(如不设定,默认为8989)
密码:自己设定(如不设定,默认为teddysun.com)
加密方式:自己设定(如不设定,默认为aes-256-gcm)

客户端下载:
https://github.com/shadowsocks/shadowsocks-windows/releases

使用方法:
使用root用户登录,运行以下命令:

wget --no-check-certificate -O shadowsocks-libev-debian.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev-debian.sh chmod +x shadowsocks-libev-debian.sh ./shadowsocks-libev-debian.sh 2>&1 | tee shadowsocks-libev-debian.log

安装完成后,脚本提示如下:

Congratulations, Shadowsocks-libev 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/358.html Enjoy it!

卸载方法:
使用root用户登录,运行以下命令:

./shadowsocks-libev-debian.sh uninstall

其他事项:
客户端配置的参考链接:https://teddysun.com/339.html
本脚本安装完成后,已将Shadowsocks-libev加入开机自启动。

使用命令:
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
查看状态:/etc/init.d/shadowsocks status

更多版本Shadowsocks服务端一键安装脚本:
ShadowsocksR 版一键安装脚本(CentOS,Debian,Ubuntu)
Shadowsocks Python 版一键安装脚本(CentOS,Debian,Ubuntu)
CentOS下Shadowsocks-libev一键安装脚本
Shadowsocks-go 一键安装脚本(CentOS,Debian,Ubuntu)

更新日志

2017年07月22日:
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

2017年02月24日:
1、恢复:通过Github API自动获取Shadowsocks-libev的最新release版本的功能(v3.0.3)。

2017年02月13日:
1、更新:升级版本到3.0.2。
2、修复:在Debian 7下默认没有libudns-dev依赖包的问题。

2017年02月12日:
1、更新:升级版本到3.0.1(请下载最新的脚本来安装)。

2016年11月05日:
1、新增:判断是否已安装,若已安装,则获取版本号与最新版比较,然后可以升级覆盖安装;
2、修正:未安装时获取最新版本号的问题。

2016年09月23日:
1、修正:偶尔自动获取版本号失败的问题;
2、新增:自动判断如果VPS存在IPv6地址,则在配置文件里添加监听IPv6地址。

2016年09月17日:
1、重构代码,自动获取Github上最新版来安装,不再手动修改版本号;
2、自动检测本机是否已经安装,若已安装则正常退出(若要安装新版,则需先卸载);
3、改为下载tar.gz包来安装,不用依赖unzip命令。

2016年09月12日:
1、更新:升级版本到2.5.2。

2016年09月11日:
1、更新:升级版本到2.5.1。

2016年08月29日:
1、更新:升级版本到2.5.0;
2、修正:由于安装时文件名的更新,卸载时文件名改为一致。

2016年07月14日:
1、更新:升级版本到2.4.7。

2016年07月05日:
1、修正:新增的依赖xmlto、asciidoc;
2、修正:由于安装时文件名的更新,卸载时文件名改为一致。

2016年05月12日:
1、修正:Shadowsocks服务改为强制默认开机启动。

2015年08月01日:
1、新增:自定义服务器端口功能(如不设定,默认端口为8989)。

2015年04月30日:
1、修改配置文件/etc/shadowsocks-libev/config.json同时启用IPv4与IPv6支持:

{ "server":["[::0]","0.0.0.0"], "server_port":your_server_port, "local_address":"127.0.0.1", "local_port":1080, "password":"your_password", "timeout":600, "method":"aes-256-cfb" }

2、Shadowsocks libev版不能通过修改配置文件来多端口(只能开启多进程),如果你需要多端口请安装Python或Go版;

2015年03月09日:
1、新增:启动脚本/etc/init.d/shadowsocks,使用更简单。
2、修正:优化安装过程。

2014年10月31日:
1、修正:写入自启动命令到/etc/rc.local中的错误。

特别说明:
已安装旧版本的Shadowsocks需要升级的话,需下载本脚本的最新版,直接运行即可自动升级

./shadowsocks-libev-debian.sh

参考链接:
https://github.com/shadowsocks/shadowsocks-libev