Update BBR.sh

This commit is contained in:
jerry048 2022-02-02 02:49:05 +08:00
parent d9ebdf6fe6
commit dc3ea28bf5
1 changed files with 8 additions and 2 deletions

View File

@ -6,8 +6,14 @@ cd $HOME
## This part of the script is modified from https://github.com/KozakaiAya/TCP_BBR
apt-get -qqy install dkms
apt-get -qqy install linux-headers-$(uname -r)
wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.10.0/tcp_bbrx.c
kernel_ver=5.10.0
distro_codename="$(source /etc/os-release && printf "%s" "${VERSION_CODENAME}")"
if [[ $distro_codename = buster ]]; then
wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.10.0/tcp_bbrx.c
kernel_ver=5.10.0
else if [[ $distro_codename = bullseye ]] ; then
wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.15.0/tcp_bbrx.c
kernel_ver=5.15.0
fi
algo=bbrx
bbr_file=tcp_$algo
bbr_src=$bbr_file.c