本腳本適用環境
系統支持:CentOS 6+,Debian 7+,Ubuntu 12+ 內存要求:≥128M關於本腳本
1、一鍵安裝 Shadowsocks-Python, ShadowsocksR, Shadowsocks-Go, Shadowsocks-libev 版(四選一)服務端; 2、各版本的啓動腳本及配置文件名不再重合; 3、每次運行可安裝一種版本; 4、支持以多次運行來安裝多個版本,且各個版本可以共存(注意端口號需設成不同); 5、若已安裝多個版本,則卸載時也需多次運行(每次卸載一種);默認配置
服務器端口:自己設定(如不設定,默認從 9000-19999 之間隨機生成) 密碼:自己設定(如不設定,默認爲 teddysun.com) 加密方式:自己設定(如不設定,Python 和 libev 版默認爲 aes-256-gcm,R 和 Go 版默認爲 aes-256-cfb) 協議(protocol):自己設定(如不設定,默認爲 origin)(僅限 ShadowsocksR 版) 混淆(obfs):自己設定(如不設定,默認爲 plain)(僅限 ShadowsocksR 版) 備註:腳本默認創建單用戶配置文件,如需配置多用戶,請手動修改相應的配置文件後重啓即可。客戶端下載
常規版 Windows 客戶端https://github.com/shadowsocks/shadowsocks-windows/releases
ShadowsocksR 版 Windows 客戶端
https://github.com/shadowsocksrr/shadowsocksr-csharp/releases
附加:
Ubuntu客戶端:
找了好多方法配置Ubuntu客戶端,感覺都挺麻煩的,最終找到一個超級方便的,直接給下載地址:https://github.com/erguotou520/electron-ssr/releases
安裝完之後要設置端口:找到網絡>網絡代理>設置手動>Sock主機爲127.0.0.1:1080
使用方法
使用root用戶登錄,依次運行以下命令: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安裝完成後,腳本提示如下
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 | stop | restart | status
Shadowsocks-libev 版:
/etc/init.d/shadowsocks-libev start | stop | restart | status
各版本默認配置文件
Shadowsocks-Python 版: /etc/shadowsocks-python/config.jsonShadowsocksR 版:
/etc/shadowsocks-r/config.json
Shadowsocks-Go 版:
/etc/shadowsocks-go/config.json
Shadowsocks-libev 版:
/etc/shadowsocks-libev/config.json
配置好服務器後 Shadowsocks 客戶端示例:
附加:使用本地PAC即只有訪問牆外的網站才通過代理訪問,不需要代理的就直接訪問了。這樣可能導致的問題是有些需要代理的網站會被誤認爲是不需要代理的,導致無法訪問,這時可以嘗試關閉’使用本地PAC’,例如P站就需要這樣操作。
更新
2018 年 02 月 06 日:修改:ShadowsocksR 版爲 ShadowsocksRR 最新版;
原文地址請訪問秋水逸冰: https://teddysun.com