VPS 常用脚本合集:重装系统、性能测试、流媒体检测、回程路由、BBR、Docker 与常用面板
本文整理一些 VPS / 独服常用脚本,主要用于系统重装、性能测试、网络测速、流媒体解锁检测、回程路由测试、BBR 优化、WARP、Docker、监控面板等场景。
⚠️ 安全提醒:一键脚本风险较高,执行前请确认脚本来源可信。尤其是 DD 重装、BBR 内核更换、网络调优、WARP、面板安装类脚本,可能导致服务器失联、数据丢失或 SSH 无法连接。生产环境谨慎使用。
目录
- 1. 系统 DD / 重装脚本
- 2. 综合测试脚本
- 3. 性能测试脚本
- 4. 流媒体解锁与 IP 质量检测
- 5. 网络测速脚本
- 6. 回程路由测试
- 7. 功能类脚本
- 8. 常用环境与软件安装
- 9. 综合功能工具箱
- 10. 独服 / 杜甫检测脚本
- 11. VPS 常备小命令
- 12. 其他工具与链接
1. 系统 DD / 重装脚本
1.1 leitbogioro InstallNET.sh
常用于 VPS / 独服 DD Debian、Ubuntu、Windows 等系统。
下载脚本
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
DD Debian 12
bash InstallNET.sh -debian 12
指定 root 密码 DD Debian 12
bash InstallNET.sh -debian 12 -pwd '<你的密码>'
一条命令下载并 DD Debian 12
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12 -pwd '<你的密码>'
独服指定 RAID DD
bash InstallNET.sh -debian 12 -raid "0"
指定 IPv4 / IPv6 网络 DD
bash InstallNET.sh -debian 12 \
--ip-addr 139.162.52.1 \
--ip-mask 24 \
--ip-gate 139.162.52.1 \
--ip6-addr 2a07:e040:2:1d3::1 \
--ip6-gate 2a07:e040::1 \
--ip6-mask 32
1.2 萌咖 MoeClub InstallNET.sh
萌咖大佬的 DD 脚本,经典常用。
DD Debian 11
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') \
-d 11 \
-v 64 \
-p '<你的密码>' \
-port '<SSH端口>' \
-a \
-firmware
参数说明:
| 参数 | 说明 |
|---|---|
-d 11 | 安装 Debian 11 |
-v 64 | 64 位系统 |
-p | 设置 root 密码 |
-port | 设置 SSH 端口 |
-a | 自动确认 |
-firmware | 安装部分网卡固件,适合独服或特殊机器 |
1.3 beta.gs NewReinstall.sh
wget --no-check-certificate -O NewReinstall.sh https://raw.githubusercontent.com/fcurrk/reinstall/master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
1.4 DD Windows
⚠️ DD Windows 风险较高,建议仅在确认服务商允许安装 Windows,并且你拥有合法 Windows 授权的情况下使用。
使用 InstallNET.sh DD Windows 10
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -windows 10 -lang "cn"
默认账户信息一般为:
用户名:Administrator
密码:Teddysun.com
⚠️ 建议登录后第一时间修改远程桌面端口、管理员密码,并开启防火墙规则。
⚠️ 第三方 Windows 激活绕过命令不建议使用,建议使用正版密钥或正规授权方式。
2. 综合测试脚本
2.1 bench.sh
wget -qO- bench.sh | bash
2.2 LemonBench
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
2.3 融合怪 ECS 测试脚本
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)
2.4 NodeBench
bash <(curl -sL https://raw.githubusercontent.com/LloydAsp/NodeBench/main/NodeBench.sh)
3. 性能测试脚本
3.1 YABS
YABS 常用于测试 CPU、硬盘、网络、Geekbench 等信息。
curl -sL yabs.sh | bash
3.2 跳过网络,测试 Geekbench 5
curl -sL yabs.sh | bash -s -- -i5
3.3 跳过网络和磁盘,测试 Geekbench 5
curl -sL yabs.sh | bash -s -- -if5
3.4 改测 Geekbench 5,不测 Geekbench 6
curl -sL yabs.sh | bash -s -- -5
4. 流媒体解锁与 IP 质量检测
4.1 常用流媒体检测脚本
bash <(curl -L -s check.unlock.media)
4.2 透明检测脚本
bash <(curl -sL Media.Check.Place)
4.3 RegionRestrictionCheck
通常用于检测 Netflix、Disney+、YouTube Premium 等区域限制。
bash <(curl -L -s https://github.com/1-stream/RegionRestrictionCheck/raw/main/check.sh)
4.4 IP 质量检测脚本
bash <(curl -sL IP.Check.Place)
4.5 一键修改解锁 DNS
wget https://raw.githubusercontent.com/Jimmyzxk/DNS-Alice-Unlock/refs/heads/main/dns-unlock.sh && bash dns-unlock.sh
5. 网络测速脚本
5.1 Speedtest
bash <(curl -sL bash.icu/speedtest)
5.2 泰尔测速
bash <(curl -sL res.yserver.ink/taier.sh)
5.3 HyperSpeed
curl -Lso- https://bench.im/hyperspeed
5.4 全球测速 nws.sh
wget -qO- nws.sh | bash
5.5 区域测速
wget -qO- nws.sh | bash -s -- -r region_name
示例:
wget -qO- nws.sh | bash -s -- -r asia
5.6 Ping 和路由测试
wget -qO- nws.sh | bash -s -- -rt [region]
示例:
wget -qO- nws.sh | bash -s -- -rt cn
6. 回程路由测试
6.1 简单回程测试
适合小白快速查看三网回程。
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh
6.2 AutoTrace 回程详细测试
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh
6.3 testrace
wget https://ghproxy.com/https://raw.githubusercontent.com/vpsxb/testrace/main/testrace.sh -O testrace.sh && bash testrace.sh
7. 功能类脚本
7.1 添加 SWAP
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
7.2 安装 Fail2ban
wget --no-check-certificate https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log
7.3 一键开启 BBR
适用于较新的 Debian / Ubuntu 系统。
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr
7.4 BBR v3 优化脚本
安装别名
bash <(curl -fsSL "https://raw.githubusercontent.com/Eric86777/vps-tcp-tune/main/install-alias.sh?$(date +%s)")
重新加载配置
source ~/.bashrc
如果使用 zsh:
source ~/.zshrc
后续直接使用
bbr
7.5 多功能 BBR 安装脚本
wget -N --no-check-certificate "https://gist.github.com/zeruns/a0ec603f20d1b86de6a774a8ba27588f/raw/4f9957ae23f5efb2bb7c57a198ae2cffebfb1c56/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
7.6 锐速 / BBRPLUS / BBR2 / BBR3
wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
7.7 TCP 窗口调优
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh
7.8 安装 WARP
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh
如果需要带参数运行:
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [license/url/token]
7.9 测试 25 端口是否开放
telnet smtp.aol.com 25
如果提示连接成功,说明 25 端口大概率未被封锁。
如果连接超时或拒绝,可能是服务商封锁了 25 端口。
7.10 禁用 IPv6
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
8. 常用环境与软件安装
8.1 安装 Docker
bash <(curl -sL 'https://get.docker.com')
8.2 安装 Python
curl -O https://raw.githubusercontent.com/lx969788249/lxspacepy/master/pyinstall.sh && chmod +x pyinstall.sh && ./pyinstall.sh
8.3 安装 iperf3
apt update
apt install -y iperf3
8.4 realm 转发工具
bash <(curl -L https://raw.githubusercontent.com/zhouh047/realm-oneclick-install/main/realm.sh) -i
8.5 gost 转发工具
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
8.6 极光面板
bash <(curl -fsSL https://raw.githubusercontent.com/Aurora-Admin-Panel/deploy/main/install.sh)
8.7 哪吒监控
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
哪吒前端常用自定义配置
可根据需要加入前端自定义代码:
<script>
window.ShowNetTransfer = true;
window.FixedTopServerName = true;
window.DisableAnimatedMan = true;
</script>
8.8 Aria2
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
8.9 宝塔面板
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh
8.10 PVE 虚拟化
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
8.11 Argox
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/argox/main/argox.sh)
9. 综合功能工具箱
9.1 科技 Lion 一键脚本
先安装 curl:
apt update -y && apt install -y curl
运行脚本:
bash <(curl -sL kejilion.sh)
9.2 SKY-BOX 工具箱
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
10. 独服 / 杜甫检测脚本
10.1 sick.onl
curl -sL https://sick.onl | bash
10.2 Aniverse 独服检测脚本
wget https://github.com/Aniverse/A/raw/i/a && bash a
10.3 nws.sh 测试
wget -qO- nws.sh | bash
10.4 Yuri-NagaSaki 硬件信息检测
curl -sL https://raw.githubusercontent.com/Yuri-NagaSaki/SICK/refs/heads/main/hardware_info.sh | bash -s -- -cn
11. VPS 常备小命令
11.1 查看系统信息
uname -a
cat /etc/os-release
11.2 查看 CPU 信息
lscpu
11.3 查看内存
free -h
11.4 查看硬盘
df -h
lsblk
11.5 查看 IP
curl -4 ip.sb
curl -6 ip.sb
11.6 查看端口监听
ss -lntp
11.7 查看当前连接
ss -antp
11.8 查看系统负载
uptime
top
11.9 查看服务状态
systemctl status 服务名
示例:
systemctl status nginx
11.10 查看日志
journalctl -u 服务名 -f
示例:
journalctl -u nginx -f
12. 其他工具与链接
12.1 Telegram 中文汉化
https://t.me/setlanguage/classic-zh-cn
12.2 Google IP 问题报告
如果遇到 IP 被 Google 识别异常、区域错误、人机验证频繁等问题,可以前往 Google 帮助中心反馈 IP 问题。
12.3 NodeSeek 相关帖子
https://www.nodeseek.com/post-116193-1
https://www.nodeseek.com/post-424648-1
使用建议
新机器推荐测试顺序
新买 VPS 后,可以按下面顺序测试:
# 1. 查看基础信息
uname -a
cat /etc/os-release
lscpu
free -h
df -h
# 2. 综合测试
curl -sL yabs.sh | bash
# 3. 流媒体检测
bash <(curl -L -s check.unlock.media)
# 4. IP 质量检测
bash <(curl -sL IP.Check.Place)
# 5. 回程测试
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh
# 6. 全球测速
wget -qO- nws.sh | bash
高风险脚本执行前建议
执行 DD、BBR、WARP、网络调优、面板安装前,建议先做这些检查:
# 查看系统版本
cat /etc/os-release
# 查看网卡名称
ip a
# 查看默认路由
ip route
# 查看 SSH 服务
systemctl status ssh
systemctl status sshd
# 查看防火墙
ufw status
iptables -L -n
如果是生产机器,建议先快照 / 备份。
总结
这类脚本非常适合 VPS 玩家快速测试机器、检测线路、查看流媒体解锁、安装常用环境。
不过一键脚本本质上是把远程代码直接交给 root 执行,安全风险不低。建议优先选择开源、维护活跃、口碑较好的项目,并且在执行前简单查看脚本内容。
尤其是下面几类操作要谨慎:
- DD 重装系统
- 更换内核
- BBR / TCP 深度调优
- 修改 DNS
- 安装 WARP
- 修改 SSH 端口
- 安装面板
- 执行未知来源的一键脚本
一句话:测试鸡可以大胆折腾,生产鸡一定先备份。
评论