Skip to content

Instantly share code, notes, and snippets.

@vizee
Last active May 18, 2018 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vizee/cc8432a654b1d9a7f53aa8896def7801 to your computer and use it in GitHub Desktop.
Save vizee/cc8432a654b1d9a7f53aa8896def7801 to your computer and use it in GitHub Desktop.
setup ss
if [ -z `lsmod | grep bbr` ]; then
modprobe tcp_bbr
echo "tcp_bbr" >> /etc/modules-load.d/modules.conf
fi
if [ -z `sysctl net.ipv4.tcp_congestion_control | grep bbr` ]; then
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
fi
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
pip install --upgrade pip
pip install setuptools
pip install git+https://github.com/shadowsocks/shadowsocks.git@master
echo '{
"server":"0.0.0.0",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}' > ss.json
apt update
apt upgrade -y
apt install -y python-pip libsodium-dev
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config
systemctl reload ssh.service
image_amd64="http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.13/linux-image-4.15.13-041513-generic_4.15.13-041513.201803250910_amd64.deb"
wget "$image_amd64"
dpkg -i linux-image-4.*.deb
apt autoremove
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment