这个安装是写给目前所有的shadowsocks版本的,所以除了可以安装python版和libev版之外,还有ShadowsockGo的和ShadowsocksR的,在安装的前面它会提示安装哪一个,我选的(4)shadowsocks-libev
我是通过这个概括性的shadowsocks介绍才知道,建议没事读一下:传输门 http://madaimeng.com/article/ShadowSocks/
具体的意见安装来自 秋水逸冰 的一键安装:传输门 https://teddysun.com/486.html
一键安装的指令:
wget --no-check-certificate -O shadowsocks-all.sh 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
Which Shadowsocks server you'd select: 1) Shadowsocks-Python 2) ShadowsocksR 3) Shadowsocks-Go 4) Shadowsocks-libev Please enter a number (Default Shadowsocks-Python):4 You choose = Shadowsocks-libev Please enter password for Shadowsocks-libev (Default password: teddysun.com):88888888 //这里填写一级密码 password =88888888 Please enter a port for Shadowsocks-libev [1-65535] (Default port: 15702):2425 port = 2425 Please select stream cipher for Shadowsocks-libev: 1) aes-256-gcm 2) aes-192-gcm 3) aes-128-gcm 4) aes-256-ctr 5) aes-192-ctr 6) aes-128-ctr 7) aes-256-cfb //Recommended 8) aes-192-cfb 9) aes-128-cfb 10) camellia-128-cfb 11) camellia-192-cfb 12) camellia-256-cfb 13) xchacha20-ietf-poly1305 14) chacha20-ietf-poly1305 15) chacha20-ietf 16) chacha20 17) salsa20 18) rc4-md5 Which cipher you'd select(Default: aes-256-gcm):7 //目前手机端支持最好的是aes-256-cfb,小火箭上有 [Info] Starting install package autoconf //需要耐心,慢慢等待5分钟,没有 Do you want install simple-obfs for Shadowsocks-libev? [y/n] (default: n): n You choose = n Press any key to start...or Press Ctrl+C to cancel Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... [Info] Starting to install package gettext //二十分钟等待,因为安装下面一大堆的东西,看到python没有?crul也在 [Info] Starting to install package build-essential [Info] Starting to install package unzip [Info] Starting to install package gzip [Info] Starting to install package python [Info] Starting to install package python-dev [Info] Starting to install package python-setuptools [Info] Starting to install package curl [Info] Starting to install package openssl [Info] Starting to install package libssl-dev [Info] Starting to install package autoconf [Info] Starting to install package automake [Info] Starting to install package libtool [Info] Starting to install package gcc [Info] Starting to install package make [Info] Starting to install package perl [Info] Starting to install package cpio [Info] Starting to install package libpcre3 [Info] Starting to install package libpcre3-dev
大概经过选择安装(4)libev,接着自定了端口和密码,然后选择不安装simple-obfs(混淆HTTP来隐藏ss的东西,接着后面继续执行打开20分钟,最后会到安装成功的界面。
Starting Shadowsocks-libev success Congratulations, Shadowsocks-libev server install completed! Your Server IP : ***.***.***.*** Your Server Port : 25(不建议用25,因为太明显的shodowsocks端口,我用2525和2425) Your Password : 密码你自己来(一级密码,安卓手机端可能不好输入我的特殊字符) Your Encryption Method: aes-256-gcm (推荐用aes-256-cfb) Your QR Code: (For Shadowsocks Windows, OSX, Android and iOS clients) //通过QR码安装客户端 ss://YWVzLTI1Ni1nY206YDEyd2AxMndAMTAxLjEyNy4yMy4xOTU6MjUyNQ== Your QR Code has been saved as a PNG file path: /home/pi/shadowsocks_libev_qr.png Welcome to visit: https://teddysun.com/486.html Enjoy it! //另一次安装: Starting Shadowsocks-libev success Congratulations, Shadowsocks-libev server install completed! Your Server IP : ***.***.***.*** Your Server Port : 2425 Your Password : gochaigo823 Your Encryption Method: aes-256-cfb Your QR Code: (For Shadowsocks Windows, OSX, Android and iOS clients) ss://YWVzLTI1Ni1jZmI6YDEyd2AxMkAxMDEuMTI3LjIzLjE5NToyNDI1 Your QR Code has been saved as a PNG file path: /home/pi/shadowsocks_libev_qr.png Welcome to visit: https://teddysun.com/486.html Enjoy it!
安装完成后,恭喜你的安装成功,脚本提示如下
哪个QR码是这样的
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:your_encryption_method Your QR Code: (For Shadowsocks Windows, OSX, Android and iOS clients) ss://your_encryption_method:your_password@your_server_ip:your_server_port Your QR Code has been saved as a PNG file path: your_path.png Welcome to visit:https://teddysun.com/486.html Enjoy it!
卸载方法
若已安装多个版本,则卸载时也需多次运行(每次卸载一种)
使用root用户登录,运行以下命令:
./shadowsocks-all.sh uninstall
启动脚本
启动脚本后面的参数含义,从左至右依次为:启动,停止,重启,查看状态。
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 //启动 /etc/init.d/shadowsocks-go stop //停止 /etc/init.d/shadowsocks-go restart //重启 /etc/init.d/shadowsocks-go status //查看状态
Shadowsocks-libev 版:
/etc/init.d/shadowsocks-libev start | stop | restart | status
各版本默认配置文件
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