ss_brook.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. # 常用工具和配置
  3. apt-get update
  4. apt-get install -y htop tmux screen iperf3
  5. wget -O .vimrc --no-check-certificate https://raw.githubusercontent.com/hongwenjun/srgb/master/vim/_vimrc
  6. wget -O .bashrc --no-check-certificate https://raw.githubusercontent.com/hongwenjun/srgb/master/vim/_bashrc
  7. wget -O .tmux.conf --no-check-certificate https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/master/.tmux.conf
  8. # 下载ss_brook包和解压
  9. wget -O ss_brook.tgz https://git.io/fxQuY
  10. tar -xzvf ss_brook.tgz -C /
  11. rm ss_brook.tgz
  12. # 加入开机服务
  13. systemctl enable frps
  14. systemctl enable brook
  15. systemctl enable shadowsocks-go
  16. # 开启服务
  17. /etc/init.d/frps start
  18. /etc/init.d/brook start
  19. /etc/init.d/shadowsocks-go start
  20. # bbr 设置打开
  21. sysctl_config() {
  22. sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
  23. sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
  24. echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
  25. echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
  26. sysctl -p >/dev/null 2>&1
  27. }
  28. sysctl_config
  29. # 安装所需运行库
  30. apt update
  31. apt install -y libev-dev libc-ares-dev libmbedtls-dev libsodium-dev
  32. # 安装脚本 sku
  33. mkdir -p sku && cd sku && wget -O sku.tgz https://git.io/fxy7s && tar -xvf sku.tgz && ./sku.sh