tcpo
跨境链路内核调优面板 · 纯 bash · 无依赖 · 可完整回退 Linux kernel network tuning for long fat networks · pure bash · no deps · fully reversible
Note: the panel UI itself is in Chinese.
bash <(curl -sL https://tcp.itssx.com/tcpo)
需要 root。首次运行自装到 /usr/local/bin/tcpo,之后敲 tcpo 即可打开面板。
Requires root. First run installs to /usr/local/bin/tcpo; type tcpo anywhere afterwards.
非 root 用户请先 sudo -i 切到 root 再执行。一条命令搞定:curl -sL https://tcp.itssx.com/tcpo | sudo bash。
Not root? Run sudo -i first, or use the pipe form: curl -sL https://tcp.itssx.com/tcpo | sudo bash.
离线安装 Offline install
脚本是单文件、无依赖,离线安装就是把文件传上去。先在能上网的机器下载: It's a single file with no dependencies. On a machine with internet, download it:
curl -fL -o tcpo https://tcp.itssx.com/tcpo
传到目标机并运行: Upload and run:
# 传上去(把 root@1.2.3.4 换成你的机器)# Upload (replace root@1.2.3.4 with your host)
scp tcpo root@1.2.3.4:/root/
# 登上去运行(会自装到 /usr/local/bin/tcpo)# Log in and run (installs to /usr/local/bin/tcpo)
ssh root@1.2.3.4
bash /root/tcpo
本地文件执行时脚本不联网,直接复制自身到 /usr/local/bin/tcpo。装完就能敲 tcpo。
When run from a local file the script does not touch the network — it copies itself to /usr/local/bin/tcpo. After that, tcpo works.
离线机上菜单 31(在线更新)会失败——预期行为。要升级就重复上面的流程覆盖一次。 On an offline box, menu 31 fails as expected. Re-run the offline install to upgrade.
想彻底禁止脚本联网:TCP_DASHBOARD_NO_CHECK=1。
To disable all network calls: TCP_DASHBOARD_NO_CHECK=1.
功能 Menu
标灰的 20/21/22 是只读功能,不装包、不改配置。菜单 23 会跑真实上行流量并可能装 iperf3(先问你);菜单 21 的主动压测同样先问。
Greyed 20/21/22 are read-only. Menu 23 generates real uplink traffic and may install iperf3 (asks first); menu 21 active benchmarks also ask first.
菜单 3 关的是整个 IPv6 协议族。仅 IPv6 入口时关掉等于自断 SSH,执行前三道硬检查任一命中直接拒绝。不在菜单 1 一键优化里。
Menu 3 disables the whole IPv6 stack. Hard refusals protect IPv6-only SSH. Excluded from menu-1 one-shot.
想先看看会改什么 Preview changes first
TCPO_DRYRUN=1 tcpo
演练模式,整个流程照跑但不写入任何文件,退出时告诉你它本来会改什么。不需要 root。 Dry-run mode: runs the full flow without writing anything, then shows what it would have changed. No root needed.
可以回退 Reversible
每次改动前自动备份原始值,菜单 30 一键还原(含 HTB 整形)。最坏情况是「参数没生效」,不会让机器开不了机。 Original values are backed up before every change. Menu 30 restores everything including HTB shaping. Worst case: setting did not take effect — never breaks boot.
兼容性 Compatibility
支持 Debian / Ubuntu / RHEL / openSUSE / Arch / Alpine。写入类菜单(1-8、23、24)缺工具时自动装;只读 20/21/22 不装包。23/21 的 iperf3 会先问。sysctl 装不上则不做改动。
Supports Debian, Ubuntu, RHEL, openSUSE, Arch, and Alpine. Writing menus (1-8, 23, 24) may auto-install tools; read-only 20/21/22 do not. Menus 23/21 ask before installing iperf3. Missing sysctl aborts writes — no reliable rollback without it.