diff --git a/README.md b/README.md index 36e979d..f98a3e8 100644 --- a/README.md +++ b/README.md @@ -1,150 +1,123 @@ -赞助 -
-支付宝 -
-![20200312144201.png](https://vip1.loli.io/2020/03/12/7IJvKaTcrLBDbtz.png) +# Linux-NetSpeed(BBR / 锐速 一键脚本) -[搬瓦工在线库存查询](https://bwg.ylx.me/) +一键管理 Linux 下的 TCP 加速方案:BBR、BBRplus、魔改 BBR、锐速(LotServer)、XanMod / Zen 等内核,以及系统网络参数优化。 +## 快速开始 -不卸载内核版本 +不卸载现有内核,直接运行菜单: -``` +```bash bash <(curl -fsSL https://raw.githubusercontent.com/ylx2016/Linux-NetSpeed/master/tcpx.sh) ``` -提示:设置BBR和优化已经分开,需要各走一遍。即20和32都需要运行一遍,不分先后。 +安装后可直接输入 `tcpx` 再次调起菜单。 -关联action自动编译内核 +### 使用提示 -[https://github.com/ylx2016/kernel/](https://github.com/ylx2016/kernel/) +- **加速算法与系统优化已拆分,需要各跑一遍**:菜单 `20`(设置 BBR 等算法)和 `32`(系统优化)都要运行,不分先后。 +- 支持带参数直接调用(不检测系统): + - `./tcpx.sh op1` → 对应菜单 `32`(系统优化) + - `./tcpx.sh op3` → 对应菜单 `38` +- 关联 GitHub Actions 自动编译内核: -尝试加入参数直接调用优化 ./tcpx.sh op1(对应32) (不会判断系统) op3(对应38) +### IP 质量检测 -ip质检 -``` +```bash bash <(curl -Ls IP.Check.Place) ``` -双持bbr+锐速 -
-bbr 添加 -``` +## BBR + 锐速 双开 + +先添加 BBR: + +```bash echo "net.core.default_qdisc=fq" >> /etc/sysctl.d/99-sysctl.conf -``` -``` echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.d/99-sysctl.conf -``` -``` sysctl -p ``` -编辑锐速文件 -``` + +再编辑锐速配置: + +```bash nano /appex/etc/config ``` -检测代码有BUG,如果锐速正常 运行查看 -``` + +查看锐速运行状态(内置检测偶有误报,可用下面命令手动确认): + +```bash bash /appex/bin/lotServer.sh status | grep "LotServer" ``` -检查bbr 内核默认bbr算法不会有输出 -``` + +## 常用查看命令 + +```bash +# 检查 BBR(内核默认 bbr 算法时 lsmod 可能无输出,属正常) lsmod | grep bbr -``` -检查centos安装内核 -``` -grubby --info=ALL|awk -F= '$1=="kernel" {print i++ " : " $2}' -``` -查看当前支持TCP算法 -``` + +# CentOS 查看已安装内核 +grubby --info=ALL | awk -F= '$1=="kernel" {print i++ " : " $2}' + +# 当前系统支持的 TCP 算法 cat /proc/sys/net/ipv4/tcp_allowed_congestion_control -``` -查看当前运行的算法 -``` + +# 当前生效的拥塞控制算法 cat /proc/sys/net/ipv4/tcp_congestion_control -``` -查看当前队列算法 -``` + +# 当前队列算法(qdisc) sysctl net.core.default_qdisc + +# 真实队列查看(更改队列算法可能需重启生效) +tc -s qdisc show + +# 内核版本与系统信息 +uname -a +cat /proc/version + +# 重新加载 sysctl 配置(主配置:/etc/sysctl.d/99-sysctl.conf) +sysctl --system ``` -命令: `uname -a` -
-作用: 查看系统内核版本号及系统名称 -命令: `cat /proc/version` -
-作用: 查看目录"/proc"下version的信息,也可以得到当前系统的内核版本号及系统名称 +## 声明 -真实队列查看? 更改队列算法可能需要重启生效 -
-`tc -s qdisc show` +ylx2016 与 chiakge、cx9208 无任何关系。 -`/etc/sysctl.d/99-sysctl.conf` -
-`sysctl --system` +## 参考与内核来源 -ylx2016与chiakge、cx9208无任何关系 -
-bbsplus算法原作者 -
-https://blog.csdn.net/dog250/article/details/80629551 -
-bbrplus首用名 ? -
-https://github.com/cx9208/bbrplus -
-新版bbrplus -
-https://github.com/UJX6N/bbrplus-5.10 -
-xanmod官网 -
-https://xanmod.org -
-Zen官网 -
-https://liquorix.net/ -
-锐速 -
-https://moeclub.org/2017/03/09/14/ -
-其他内核 -
-https://github.com/alibaba/cloud-kernel -
-https://github.com/Tencent/TencentOS-kernel -
-官方编译好的内核 -
-https://sourceforge.net/projects/xanmod/files/releases/current -
-https://elrepo.org/linux/kernel/el7/x86_64/RPMS/ -
-https://elrepo.org/linux/kernel/el8/x86_64/RPMS/ -
-https://kernel.ubuntu.com/~kernel-ppa/mainline/ -
-http://mirrors.aliyun.com/alinux/2.1903/plus/x86_64/Packages/ -
-https://mirrors.tencent.com/tlinux/2.4/tlinux/x86_64/RPMS/ -
-https://bintray.com/multipath-tcp/mptcp_rpm/mptcp/v0.95.1#files -
-https://bintray.com/multipath-tcp/mptcp_deb/mptcp/v0.95.1#files +**BBRplus / 魔改算法** +- 原作者文章: +- bbrplus 首用: +- 新版 bbrplus: -DD脚本 -
-https://git.beta.gs/ -
-https://www.cxthhhhh.com/network-reinstall-system-modify +**内核发行版** +- XanMod 官网: +- Zen / Liquorix: +- 锐速说明: +- 阿里 Cloud Kernel: +- TencentOS Kernel: +**预编译内核下载** +- XanMod: +- ELRepo el7: +- ELRepo el8: +- Ubuntu mainline: +- 阿里云 alinux: +- 腾讯 tlinux: -服务周期 -
-https://zh.wikipedia.org/zh/Ubuntu -
-https://wiki.ubuntu.com/Releases -
-https://wiki.debian.org/LTS -
-https://wiki.centos.org/zh/About/Product +**系统重装(DD)脚本** +- +- + +**系统服务周期** +- Ubuntu: · +- Debian LTS: +- CentOS: + +## 赞助 + +如果这个项目对你有帮助,可以请作者喝杯咖啡 ☕ + +**支付宝** + +![支付宝赞助](https://vip1.loli.io/2020/03/12/7IJvKaTcrLBDbtz.png) + +相关工具:[搬瓦工在线库存查询](https://bwg.ylx.me/)