fix: 旧BBR配置自动升级为完整TCP调优
This commit is contained in:
@@ -391,9 +391,12 @@ setup_bbr() {
|
||||
# 检测是否已启用
|
||||
local cc=$(sysctl -n net.ipv4.tcp_congestion_control 2>/dev/null)
|
||||
local qd=$(sysctl -n net.core.default_qdisc 2>/dev/null)
|
||||
if [[ "$cc" == "bbr" && "$qd" == "fq" ]] && grep -q "TCP Tuning" /etc/sysctl.conf 2>/dev/null; then
|
||||
info "BBR + TCP 完整调优已启用,无需重复配置"
|
||||
return 0
|
||||
fi
|
||||
if [[ "$cc" == "bbr" && "$qd" == "fq" ]]; then
|
||||
info "BBR 已启用 (congestion=$cc, qdisc=$qd)"
|
||||
grep -q "BBR Blast" /etc/sysctl.conf 2>/dev/null && info "BBR Blast 配置已存在" && return 0
|
||||
info "检测到 BBR 已启用,升级为完整 TCP 调优..."
|
||||
fi
|
||||
|
||||
# 检测系统
|
||||
|
||||
Reference in New Issue
Block a user