diff --git a/setup.sh b/setup.sh index ac6fca2..d7ead5d 100644 --- a/setup.sh +++ b/setup.sh @@ -9,6 +9,7 @@ echo "5. 配置防火墙" echo "6. 安装公钥" echo "7. 安装conda" echo "8. 安装rust" +echo "9. 开启bbr" read -p "输入你的选择: " choices # 处理选择 @@ -108,6 +109,10 @@ for choice in $choices; do echo "安装rust" curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ;; + 9) + echo "开启bbr..." + echo -e "net.core.default_qdisc=fq\nnet.ipv4.tcp_congestion_control=bbr" | tee -a /etc/sysctl.conf + sysctl -p *) echo "无效的选择: $choice" ;;