到手测试
融合怪
curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
ip解锁
bash <(curl -Ls IP.Check.Place)
路由追踪
curl nxtrace.org/nt |bash
# 查看vps回程路由
nexttrace 你的宽带ip
iperf测速
# 测试单线程,如果重传严重需调整tcp缓冲区
apt update
apt install iperf3
# 电脑下载iperf3,命名iperf3.exe,打开文件夹,在地址栏输入cmd。-P是线程数,-R是测试小鸡到自己的速度,去掉则反之,-t是时间
iperf3.exe -c 小鸡的ip -P 1 -t 60 -R
yabs
curl -sL https://yabs.sh | bash
NodeQuality
bash <(curl -sL https://run.NodeQuality.com)
网络质量
bash <(curl -sL Net.Check.Place)
三网测速
bash <(curl -sL https://raw.githubusercontent.com/i-abc/Speedtest/main/speedtest.sh)
VPS服务
脚本合集
大杂烩,好用推荐
curl -fsSL https://raw.githubusercontent.com/eooce/ssh_tool/main/ssh_tool.sh -o ssh_tool.sh && chmod +x ssh_tool.sh && ./ssh_tool.sh
科技lion脚本
bash <(curl -sL kejilion.sh)
dd系统
leitbogioro
# dd系统为debian,ssh端口不变,密码为LeitboGi0ro
# https://github.com/leitbogioro/Tools
apt update -y
apt install wget -y
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
bin456789
# 煎饼佬的,密码123@@@
# https://github.com/bin456789/reinstall
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh $_
bash reinstall.sh dd --img https://example.com/xxx.xz
其他
https://minlearn.org/inst
https://github.com/bohanyang/debi
https://github.com/LloydAsp/OsMutation
系统优化
增加虚拟内存
swap
# 增加虚拟内存为2G,适合小内存vps,教程https://blog.laoda.de/archives/vps-swap与下面命令同理
# 根据自己vps内存修改,2G以下建议实际内存2倍,2-4G建议1.5倍
sudo swapon --show # 查看当前系统的交换空间配置,可以重启再运行这个命令看是否生效
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # 固化
zram
curl -sS -O https://raw.githubusercontent.com/woniu336/open_shell/main/zram_manager.sh && chmod +x zram_manager.sh && ./zram_manager.sh
修改ssh端口
# 建议不要关闭ssh窗口防止连不上
sudo nano /etc/ssh/sshd_config
修改取消注释,把22改成你想要的端口
Port <你想要的端口>
sudo systemctl restart sshd
修改为仅允许密钥登录
# 建议不要关闭ssh窗口防止连不上
nano ~/.ssh/authorized_keys #加入xshell等工具生成的公钥
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
sudo nano /etc/ssh/sshd_config
修改
PasswordAuthentication no # 不允许密码登录
PubkeyAuthentication yes# 允许密钥登录
最后执行
sudo systemctl restart sshd
安装ufw防火墙
sudo apt install ufw -y
sudo ufw default allow outgoing # 默认允许所有数据出站
sudo ufw default deny incoming # 默认禁止所有数据入站
sudo ufw allow 22 # 修改成你ssh的端口
sudo ufw enable # 启动ufw
sudo ufw status # 查看ufw的规则
具体建议查看佬友的帖子
https://linux.do/t/topic/267502?u=ggsmida
Fail2ban
# 手动安装
sudo apt install fail2ban
# 一键安装部署 Fail2ban,自动配置防 SSH 爆破。可自定义 ip 封禁时间,最高重试次数,ssh端口
# 安装
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh
bash fail2ban.sh
# 卸载
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/uninstall.sh
bash uninstall.sh
修改主机名
# 解决无法解析主机名的问题,修改127.0.1.1后面的为正确主机名
nano /etc/hosts
DNS
# 增加dns
chattr -i /etc/resolv.conf && wget -N --no-check-certificate https://raw.githubusercontent.com/chengziqaq/dnsunblocknetflix/master/dns-change.sh && chmod +x dns-change.sh && ./dns-change.sh 要增加的dns
# 或者动修改nameserver
chattr -i /etc/resolv.conf# 解锁
sudo nano /etc/resolv.conf
chattr +i /etc/resolv.conf# 上锁
tcp调优
# 通常对优化线路有用,降低重传增加稳定性
# BlackSheep佬的脚本
# 详细情况请看ns的BlackSheep大佬的帖子
# https://www.nodeseek.com/post-197087-1
apt install iperf3
wget -q https://raw.githubusercontent.com/BlackSheep-cry/TCP-Optimization-Tool/main/tool.sh -O tool.sh && chmod +x tool.sh && ./tool.sh
科技
223boy sing-box
# https://233boy.com/sing-box/sing-box-script/
bash <(wget -qO- -o- https://github.com/233boy/sing-box/raw/main/install.sh)
sing-box+订阅
# https://github.com/fscarmen/sing-box
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh)
mack-a 8合1 sing-box
# https://github.com/mack-a/v2ray-agent
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
ygkkk sing-box
# https://github.com/yonggekkk/sing-box-yg
bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/sing-box-yg/main/sb.sh)
3x-ui
# https://github.com/MHSanaei/3x-ui
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
warp解锁
# https://github.com/fscarmen/warp-sh
# 首次运行
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
# 再次运行
warp [option] [lisence]
端口转发
也可以自行根据官方wiki手搓
realm一键脚本
wget -N https://raw.githubusercontent.com/qqrrooty/EZrealm/main/realm.sh && chmod +x realm.sh && ./realm.sh
gost一键脚本
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
探针
哪吒探针
# v1,查看[官方文档](https://nezha.wiki)
curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
# v1的Cf tunnel版本,开箱即用,更推荐这个
https://github.com/yumusb/nezha-new
# 哪吒agent的容器版本,降权
https://github.com/yosebyte/cgent
# v0养老,详见
https://www.nodeseek.com/post-211942-1
https://www.nodeseek.com/post-208624-1
beszel
# 安装beszel探针
curl -sL "https://github.com/henrygd/beszel/releases/latest/download/beszel_$(uname -s)_$(uname -m | sed 's/x86_64/amd64/' | sed 's/armv7l/arm/' | sed 's/aarch64/arm64/').tar.gz" | tar -xz -O beszel | tee ./beszel >/dev/null && chmod +x beszel && ls beszel
./beszel serve
# 安装beszel探针Docker版
wget https://github.com/henrygd/beszel/raw/refs/heads/main/supplemental/docker/hub/docker-compose.yml
docker-compose up -d
Webssh
Next terminal
https://docs.next-terminal.typesafe.cn/install/pro-install.html
Easynode
https://github.com/chaos-zhu/easynode
建站
1Panel
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
aapanel
URL=https://www.aapanel.com/script/install_7.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_7.0_en.sh "$URL";fi;bash install_7.0_en.sh aapanel
Docker
安装
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh