Skip to content

Instantly share code, notes, and snippets.

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 Harold2017/9e3a9acf725d1f269a3fd916932f5f40 to your computer and use it in GitHub Desktop.
Save Harold2017/9e3a9acf725d1f269a3fd916932f5f40 to your computer and use it in GitHub Desktop.
Tencent-Cloud-setup-Shadowsocks-and-Google-BBR

Update linux kernel

Find avaliable kernel

sudo apt-get update
apt-cache search --names-only linux-image

I found linux-image-4.15.0-36-generic is avaliable both in the kernel list and bbr list

Update both image and corresponding headers

sudo apt-get install linux-image-4.15.0-36-generic 
sudo apt-get install linux-headers-4.15.0-36-generic

Check whether kernel is in GRUB mutil-boot env

grep menuentry /boot/grub/grub.cfg

Find kernel, then reboot to make bootloader install it

sudo reboot

Install BBR with TedddySun's script

wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
sudo bash bbr.sh

Check bbr service condition

uname -r

ubuntu kernel version number -> 4.15.0-36

sysctl net.ipv4.tcp_available_congestion_control

return value should be as follows:

net.ipv4.tcp_available_congestion_control = reno cubic bbr

sysctl net.ipv4.tcp_congestion_control

return value should be as follows:

net.ipv4.tcp_congestion_control = bbr

sysctl net.core.default_qdisc

return value should be as follows:

net.core.default_qdisc = fq

lsmod | grep bbr

find tcp_bbr -> bbr works well

Install Shadowsocks with TeddySub's script

wget -N --no-check-certificate https://github.com/teddysun/shadowsocks_install/blob/master/shadowsocks.sh
chmod +x shadowsocks.sh
sudo bash shadowsocks.sh

Shadowsocks cmd

change config file: vim /etc/shadowsocks.json
stop ss service: ssserver -c /etc/shadowsocks.json -d stop
start ss service: ssserver -c /etc/shadowsocks.json -d start
restart ss service: ssserver -c /etc/shadowsocks.json -d restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment