Skip to content

Commit 3c8d31d

Browse files
authored
优化代码 提升BBR开启成功率
1 parent 4bf3446 commit 3c8d31d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

一键所有VPS启动BBR加速.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def update_server(name, hostname, port, username, password):
2424

2525
# 设置 DEBIAN_FRONTEND 环境变量
2626
print(f"{name} 开启BBR加速")
27+
stdin, stdout, stderr = client.exec_command("apt update -y && apt install -y curl wget sudo socat htop")
2728
stdin, stdout, stderr = client.exec_command('cat > /etc/sysctl.conf << EOF\nnet.core.default_qdisc=fq_pie\nnet.ipv4.tcp_congestion_control=bbr\nEOF\nsudo sysctl -p\n')
2829
while not stdout.channel.exit_status_ready():
2930
if stdout.channel.recv_ready():

0 commit comments

Comments
 (0)