警告
本文最后更新于 2022-03-15,文中内容可能已过时。
注意
2022 年更新
本文原题: OpenVZ 架构 VPS 安装 BBR 的五种方法(UML/LKL/LKL_Rinetd)
失效部分已经重新标注
建议使用 mzz2017 编写的 lkl haproxy 版本或 NanQinLang/Rinetd 版本
最近 OpenVZ 安装 BBR 比较热门。今天就把我所见到的做成集合写成文章吧。建议使用 NanQinLang—Rinetd
非 Rinetd 系列都需要有 Tun/Tap 支持
本方法来自:https://www.91yun.co/archives/5345
1、一键运行脚本:
Alpine linux 小内存版:UML 的系统是 Alpine linux,需要 64M 内存启动,主机最低 128M 内存
1
|
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/uml/master/bbr/uml.sh && bash uml.sh
|
Centos 版:UML 的系统是 CentOS,需要 256M 内存启动,主机建议最低 512M 内存
1
|
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/uml/master/bbr/uml-centos.sh && bash uml-centos.sh
|
装完 ssr 和 bbr 就已经运行了,如果你不想改密码和端口的话就可以直接用。。默认配置在下面。。
2、进入 uml
screen -x
或者在目录下运行
bash run.sh status
用户名:root
,密码:root
具体可见原文地址。
原文地址:https://www.91yun.co/archives/6281
安装 LKL 一键包命令
1
|
wget --no-check-certificate https://github.com/91yun/uml/raw/master/lkl/install.sh && bash install.sh
|
如何判断是否安装成功
具体见原文地址
已失效
1、下载 rintd 二进制文件(原版 bbr 和修改版 bbr 二选一即可):
1
2
|
wget --no-check-certificate https://raw.githubusercontent.com/mixool/rinetd/master/rinetd
wget --no-check-certificate https://raw.githubusercontent.com/mixool/rinetd/master/rinetd_bbr_powered -O /root/rinetd
|
2、修改权限:
3、修改 rinetd 的配置文件 rinetd.conf,添加监听地址:
1
2
3
|
# bindadress bindport connectaddress connectport
0.0.0.0 443 0.0.0.0 443
0.0.0.0 80 0.0.0.0 80
|
4、设置开机启动
1
2
3
4
5
6
7
8
9
10
|
vim /etc/systemd/system/rinetd.service
[Unit]
Description=rinetd
[Service]
ExecStart=/root/rinetd -f -c /root/rinetd.conf raw venet0:0
Restart=always
[Install]
WantedBy=multi-user.target
|
5、最后执行:
1
2
|
systemctl enable rinetd.service
systemctl start rinetd.service
|
Debian
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-debian.sh
bash tcp_nanqinlang-haproxy-debian.sh
|
CentOS
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-centos.sh
bash tcp_nanqinlang-haproxy-centos.sh
|
原文地址:https://sometimesnaive.org/article/linux/bash/tcp_nanqinlang-lkl
Debian 单网卡
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu.sh
bash tcp_nanqinlang-rinetd-debianorubuntu.sh
|
多网卡
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
|
CentOS 单网卡
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos.sh
bash tcp_nanqinlang-rinetd-centos.sh
|
多网卡
1
2
|
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos-multiNIC.sh
bash tcp_nanqinlang-rinetd-centos-multiNIC.sh
|
来自:https://sometimesnaive.org/article/54
1
2
|
wget --no-cache -O lkl-haproxy.sh https://github.com/mzz2017/lkl-haproxy/raw/master/lkl-haproxy.sh
bash lkl-haproxy.sh
|
Please refer to https://github.com/mzz2017/lkl-haproxy