利用 NGINX 的 Stream 模塊 sni_preread 功能,可以做到讓 Trojan 和其他網站在同一台機器上共享 443 端口。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
ssmgr_key=$(wget --no-check-certificate -qO- https://raw.githubusercontent.com/siriusfinex/api/master/ssmgr/ssmgr-tiny/auto-upgrade-task | grep 'key' | cut -d\" -f4) | |
ssmgr_date=$(wget --no-check-certificate -qO- https://raw.githubusercontent.com/siriusfinex/api/master/ssmgr/ssmgr-tiny/auto-upgrade-task | grep 'date' | cut -d\" -f4) | |
if [[ "$ssmgr_key" -eq "1" ]] && [[ "ssmgr_date" -eq "`date +%Y%m%d`" ]]; then | |
rm -rf /root/shadowsocks-manager-tiny && cd /root && git clone https://github.com/gyteng/shadowsocks-manager-tiny.git | |
fi | |
ss_key=$(wget --no-check-certificate -qO- https://raw.githubusercontent.com/siriusfinex/api/master/shadowsocks/shadowsocks-libev/auto-upgrade-task | grep 'key' | cut -d\" -f4) | |
ss_date=$(wget --no-check-certificate -qO- https://raw.githubusercontent.com/siriusfinex/api/master/shadowsocks/shadowsocks-libev/auto-upgrade-task | grep 'date' | cut -d\" -f4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
这个脚本综合了下面2个脚本,并含有DD windows系统的功能。 | |
1、Linux下网络安装Debian/Ubuntu纯净版一键脚本 | |
2、Linux下网络安装CentOS纯净版一键脚本 | |
仅适用于KVM,不适合OpenVZ。 | |
默认root密码为 Vicer | |
一、安装软件 | |
Debian/Ubuntu: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
cat /etc/security/limits.conf | grep "\*\ soft\ nofile\ 51200" || echo "* soft nofile 51200 | |
* hard nofile 51200" >> /etc/security/limits.conf ; ulimit -n 51200 && supervisorctl restart ssmgr-tiny | |
#check ulimit setting is right | |
cat /etc/security/limits.conf || echo "---fail---" ; echo "---line---" ; ulimit -n | grep 51200 || echo "---fail---" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#write ulimit value to supervisor | |
echo "ulimit -n 51200" >> /etc/default/supervisor && | |
service stop supervisor && service start supervisor | |
#fix ssmgr-tiny restart rule in crontab | |
sed -i 's#reload#restart\ ssmgt-tiny#g' /etc/crontab | |
#setting server reboot time |