Created
September 17, 2019 02:55
-
-
Save yatyricky/758e592f823cf14ae0103cbf3137203b to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
uname -r >> ~/log | |
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf | |
sysctl -p >> ~/log | |
sysctl net.ipv4.tcp_available_congestion_control >> ~/log | |
sysctl net.ipv4.tcp_congestion_control >> ~/log | |
lsmod | grep bbr >> ~/log | |
echo "--- ss-dash ---" | |
cd ~ | |
git clone https://github.com/yatyricky/ss-dash.git | |
cd ss-dash | |
npm install | |
yes "" | openssl req -newkey rsa:2048 -nodes -keyout self.key -x509 -days 365 -out self.crt | |
echo "module.exports={key:\"self.key\",cert:\"self.crt\",PORT:8443}" > config.js | |
nohup node index.js & | |
echo "--- Enabling firewall" | |
ufw default deny incoming | |
ufw default allow outgoing | |
ufw allow 22 | |
ufw allow 8443 | |
ufw allow 14029 | |
yes | ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -s https://gist.githubusercontent.com/yatyricky/758e592f823cf14ae0103cbf3137203b/raw/cd828a445fd78656127469af11e1e5654c120e90/ss2.sh > ~/ss2.sh ; sh ~/ss2.sh