Shadowsocks 四合一脚本(shadowsocks-all.sh)是秋水逸冰开发并维护的一个 Shadowsocks 脚本,该脚本支持一键安装 Shadowsocks-Python、ShadowsocksR、Shadowsocks-Go 和 Shadowsocks-libev,脚本非常的方便,需要哪个版本就启动哪个版本。
1、代理服务器购买
代理服务器推荐:国外科学上网翻墙 VPS 服务器推荐,新手买哪个好?
搬瓦工官网:
搬瓦工购买与优惠码使用可以参考:搬瓦工购买教程,支持支付宝和微信支付,终身优惠码。
VULTR 官网:
VULTR 也支持支付宝和微信支付,购买教程:VULTR 购买教程,支持支付宝与微信支付,中文图解教程。
购买完 VPS 后,只需要通过 Xshell 连接 VPS 即可操作 VPS,包括安装脚本、加速等:利用免费版 Xshell 远程连接你的 Linux VPS,含 Xshell 下载。
2、脚本介绍
关于此 Shadowsocks 四合一脚本简单介绍如下:
- 一键安装 Shadowsocks-Python, ShadowsocksR, Shadowsocks-Go, Shadowsocks-libev 版(四选一)服务端,每次运行可安装4个种的一种;
- 可以多次运行脚本,安装多个版本,多个版本的 Shadowsocks 可以共存,只要服务端口不一样即可;
- 若已安装多个版本,则卸载时也需多次运行(每次卸载一种);
- Shadowsocks-Python 和 ShadowsocksR 安装后不可同时启动(因为本质上都属 Python 版)。
Shadowsocks 四合一脚本支持系统包括 CentOS 6+,Debian 7+,Ubuntu 12+。
3、脚本使用
在 VPS 上依次执行以下命令:
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh chmod +x shadowsocks-all.sh ./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
脚本会让你选择安装的版本,一次只能选择一个(输入数字即可),如果需要安装多个,则执行多次脚本进行安装:
之后脚本会让你输入一些配置,包括密码、端口、加密方式等,安装成功后,提示如下:
Congratulations, your_shadowsocks_version install completed! Your Server IP :your_server_ip Your Server Port :your_server_port Your Password :your_password Your Encryption Method:aes-256-cfb Welcome to visit:https://teddysun.com/486.html Enjoy it!
4、脚本其他设置
1.脚本卸载
脚本支持一键卸载配置,如果安装多个版本的 Shdowsocks,则需要执行多次卸载命令:
./shadowsocks-all.sh uninstall
2.脚本命令
脚本自带一键启动、停止、重启、查看状态的命令,其中 start、stop、restart、status 分别对应启动,停止,重启,查看状态:
Shadowsocks-Python 版:
/etc/init.d/shadowsocks-python start | stop | restart | status
ShadowsocksR 版:
/etc/init.d/shadowsocks-r start | stop | restart | status
Shadowsocks-Go 版:
/etc/init.d/shadowsocks-go start | stop | restart | status
Shadowsocks-libev 版:
/etc/init.d/shadowsocks-libev start | stop | restart | status
3.配置文件
每个版本的配置文件位置如下,如需手动修改请修改完配置文件后重启对应的 Shadowsocks 服务:
Shadowsocks-Python 版:
/etc/shadowsocks-python/config.json
ShadowsocksR 版:
/etc/shadowsocks-r/config.json
Shadowsocks-Go 版:
/etc/shadowsocks-go/config.json
Shadowsocks-libev 版:
/etc/shadowsocks-libev/config.json