本合集大部分来自网网络,经过整理新增和更新,在此表示感谢。
一、 性能优化
1.1 一键添加SWAP脚本
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
1.2 Fail2banSSH防御脚本
这是一个利用iptables和开源程序fail2ban来进行服务器简单防爆破的脚本。默认自带SSH防御规则。
安装
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log
- 第一步选择是否修改SSH端口。
- 第二步输入最多尝试输入SSH连接密码的次数
- 第三步输入每个恶意IP的封禁时间(单位:小时)
卸载
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/uninstall.sh && bash uninstall.sh
注意事项
安装完成后请会重启SSH服务,请重新连接SSH会话 若出现SSH无法连接的情况,请检查是否修改过SSH端口,请填写写改后的正确端口进行连接
1.3 Linux网络优化TCP窗口调优
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh
1.4 一键开启BBR
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
1.5 多功能BBR安装脚本
wget -N --no-check-certificate "https://gist.github.com/zeruns/a0ec603f20d1b86de6a774a8ba27588f/raw/4f9957ae23f5efb2bb7c57a198ae2cffebfb1c56/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
1.6 BBRPLUS、锐速脚本
wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
1.7 25端口开放测试
telnet smtp.aol.com 25
二、环境及软件安装
2.1 docker
curl -sSL https://get.daocloud.io/docker | sh
2.2 Python
curl -O https://raw.githubusercontent.com/lx969788249/lxspacepy/master/pyinstall.sh && chmod +x pyinstall.sh && ./pyinstall.sh
2.3 极光面板
bash <(curl -fsSL https://raw.githubusercontent.com/Aurora-Admin-Panel/deploy/main/install.sh)
2.4 宝塔
wget -O install.sh https://download.bt.cn/install/install_lts.sh && bash install.sh ed8484bec
2.5 哪吒监控
bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的服务器位于中国大陆,可以使用镜像:
bash
curl -L https://gitee.com/naibahq/scripts/raw/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
2.6 realm
bash <(curl -L https://raw.githubusercontent.com/zhouh047/realm-oneclick-install/main/realm.sh) -i
2.7 gost
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
2.8 WARP
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh
2.9 Aria2
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
2.10 PVE虚拟化
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
三、综合测试脚本
3.1 融合怪
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
或
curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
3.2 LemonBench
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
3.3 NodeBench
bash <(curl -sL https://raw.githubusercontent.com/LloydAsp/NodeBench/main/NodeBench.sh
3.4 YABS
curl -sL https://yabs.sh | bash
或
curl -sL https://yabs.sh | bash
运行 Geekbench 5 测试并禁用 Geekbench 6 测试和iperf (网络性能) 测试
curl -sL https://yabs.sh | bash -s -- -i -5
四、流媒体及IP质量测试
4.1 最常用版本
bash <(curl -L -s check.unlock.media)
4.2 原生检测脚本
bash <(curl -sL Media.Check.Place)
4.3 准确度最高
bash <(curl -L -s https://github.com/1-stream/RegionRestrictionCheck/raw/main/check.sh)
4.4 IP质量体检脚本
bash <(curl -sL IP.Check.Place)
五、 测速脚本
5.1 Speedtest
bash <(curl -sL bash.icu/speedtest)
5.2 Taier
bash <(curl -sL res.yserver.ink/taier.sh)
5.3 hyperspeed
bash <(curl -Lso- https://bench.im/hyperspeed)
5.4 全球测速
curl -sL network-speed.xyz | bash
六、 回程测试
6.1 直接显示回程(小白用这个)
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh
6.2 回程详细测试(推荐)
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh