OpenVZ平台BBR一键脚本

wget https://raw.githubusercontent.com/kuoruan/shell-scripts/master/ovz-bbr/ovz-bbr-installer.sh
chmod +x ovz-bbr-installer.sh
./ovz-bbr-installer.sh

前提要求:glibc 版本 2.14 以上

卸载:
./ovz-bbr-installer.sh uninstall

多端口加速
vi /usr/local/haproxy-lkl/etc/port-rules

使用 systemctl 或者 service 命令来启动、停止和重启 HAporxy-lkl
systemctl {start|stop|restart} haproxy-lkl

service haproxy-lkl {start|stop|restart}

lkl_Rinetd

一键脚本

curl https://raw.githubusercontent.com/linhua55/lkl_study/master/get-rinetd.sh | bash
配置文件:/etc/rinetd-bbr.conf

手动搭建

下载文件到 /usr/bin/rinetd-bbr

wget -O /usr/bin/rinetd-bbr https://github.com/linhua55/lkl_study/releases/download/v1.2/rinetd_bbr_powered
chmod a+x /usr/bin/rinetd-bbr

创建配置文件

vi /etc/rinetd-bbr.conf
输入以下内容
0.0.0.0 443 0.0.0.0 443
其中的 443 请改为你的端口,IP 地址统一写 0.0.0.0

获取接口名称

lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/void
    inet 127.0.0.2/32 scope host venet0
    inet 10.10.10.10/32 brd 10.10.10.10 scope global venet0:0

启动

/usr/bin/rinetd-bbr -f -c /etc/rinetd-bbr.conf raw venet0:0 &

查看ip规则

iptables -t raw -nL


南琴浪一键脚本

1、OpenVZ 魔改 BBR - Rinetd 一键脚本

  • Debian && Ubuntu 64 bit
wget https://github.com/nanqinlang-tcp/tcp_nanqinlang/releases/download/rinetd/tcp_nanqinlang-rinetd-debian-ubuntu.sh
bash tcp_nanqinlang-rinetd-debian-ubuntu.sh
  • CentOS 7 64 bit
wget https://github.com/nanqinlang-tcp/tcp_nanqinlang/releases/download/rinetd/tcp_nanqinlang-rinetd-centos.sh
bash tcp_nanqinlang-rinetd-centos.sh
  • 使用说明
安装 rinetd-bbr
  • 在 /home/tcp_nanqinlang 进行安装,所以安装完成后不要动这个文件夹了(除非你想修改端口)。
  • 安装过程中,会提示输入端口号。多个端口号用空格隔开。脚本不支持端口段。
  • 如果想要加速端口段 例如 10000-20000 这样,就在用脚本安装完成后:
  • 修改 /home/tcp_nanqinlang/config-port.conf,把端口号(例如脚本默认的 443)修改成 “10000:20000” 这样
  • 重启你的小鸡
  • 安装完成后,会开启 rinetd-bbr。以后重启机器也会随开机自启。

检查 rinetd-bbr 运行状态

  • 此命令用于检查 rinetd-bbr 运行与否,可通过返回的提示判断。

卸载 rinetd-bbr

  • 运行此命令会删除 /home/tcp_nanqinlang 、移除 rc.local 开机自启项和 iptables raw 表。属于完整卸载,不会有残留。卸载后无需重启。

2、OpenVZ 魔改 BBR - LKL 一键脚本

  • Debian 8+ 64 bit
    • ldd > = 2.14
    • tun/tap enabled
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/LKL/bash/tcp_nanqinlang-lkl-debian-1.1.1.sh
bash tcp_nanqinlang-lkl-debian-1.1.1.sh
  • CentOS 7 64 bit
    • ldd > = 2.14
    • tun/tap enabled
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/LKL/bash/tcp_nanqinlang-lkl-centos-1.1.1.sh
bash tcp_nanqinlang-lkl-centos-1.1.1.sh
  • 使用说明

安装 LKL

  • 此命令用于安装 LKL。
  • 在 /home/tcp_nanqinlang 进行安装,所以安装完成后不要动这个文件夹了(除非你想修改端口)。
  • 安装过程中,会提示你选择单个端口或端口段输入,具体已在运行脚本的提示中有说明,这里不再赘述。
  • 安装完成后,会开启 LKL。以后重启机器也会随开机自启。
  • 以后若需要修改转发端口,请将 /home/tcp_nanqinlang/haproxy.cfg 中的端口号和 /home/tcp_nanqinlang/redirect.sh 中的端口号改为你想要的端口或端口段,修改完成后重启服务器。
  • 使用前请注意自己的 iptables 相关设置。

检查 LKL 运行状态

  • 此命令用于检查 LKL 运行与否,可通过返回的提示判断。

卸载 LKL

  • 运行此命令会卸载 haproxy、删除 /home/tcp_nanqinlang、移除 rc.local 开机自启项。稍后请自行移除 iptables 相关规则。
转载自: