Skip to content

Instantly share code, notes, and snippets.

@yatyricky
Created September 17, 2019 02:55
Show Gist options
  • Save yatyricky/758e592f823cf14ae0103cbf3137203b to your computer and use it in GitHub Desktop.
Save yatyricky/758e592f823cf14ae0103cbf3137203b to your computer and use it in GitHub Desktop.
#! /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
@yatyricky
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment