内容授权: CC-BY-NC-SA 4.0已测试 AlmaLinux 8，目标 Debian 11 /12替换系统可能会失联，请自行考虑是否接受风险后继续1.更新系统并安装依赖# 请看提示输入 Y dnf update --nogpgcheck # 请再次看提示输入 Y dnf install tar xz virt-what nano 2.下载 OsMutation 脚本wget -qO OsMutation.sh https://raw.githubusercontent.com/LloydAsp/OsMutation/main/OsMutation.sh && chmod u+x OsMutation.sh 3.手动修复脚本 Bug建议但不是必须，不修改建议祈祷使用编辑器nano OsMutation.sh 按 Alt+N 显示行号定位到 86 行，并将以下内容path="$(echo $path | grep -v arm64)" 修改为# 注意引号位置 path=$(echo "$path" | grep -v arm64) 4.替换系统运行./OsMutation.sh 选择 debian-bullseye 或 debian-bookworm5.设置网络不要重启，非常重要！不要重启！否则会失联5.1 使用 ip a 命令查看自己的IP地址IPv4: 以 10.10 开头，复制保存IPv6: 以 2400 开头，/64 结尾，复制保存5.2 安装编辑器apt update && apt install nano -y 5.3 编辑网络配置强制关机重启网络配置会被覆盖，但建议正确配置避免意外失联nano /etc/network/interface 参照模板填写并完整替换内容# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 你的IPv4地址/24 gateway 10.10.24.1 iface eth0 inet6 static address 你的IPv6地址/64 gateway 2400:c620:12::1 6.再次设置密码非常重要，否则会失联passwd 请分别输入两次密码并按回车7.关机并手动开机7.1 输入 shutdown now 命令立即关机7.2 在面板选择 "拔 VPS 电源"7.3 开机参考资料： TG: @Riiinahttps://t.me/c/2007588547/17014
将apt源更换为清华大学源(国内源)这款产品屏蔽了中国方向出和国际方向入，所以正常使用自带的debian镜像源是没问题的。只要你能忍受他的速度如果你不能忍受，可以使用清华大学源(在白名单)以Debian11为例，一键命令echo "# 默认注释了源码镜像以提高 apt update 速度，如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free " >/etc/apt/sources.list其他Debian版本去清华大学镜像站找 https://mirrors.tuna.tsinghua.edu.cn/help/debian/当然Ubuntu版本也有 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/使用IPv6代理访问Githubcat >> /etc/hosts << EOF # https://danwin1210.de/github-ipv6-proxy.php 2a01:4f8:c010:d56::2 github.com 2a01:4f8:c010:d56::3 api.github.com 2a01:4f8:c010:d56::4 codeload.github.com 2a01:4f8:c010:d56::5 objects.githubusercontent.com 2a01:4f8:c010:d56::6 ghcr.io 2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com EOF 更多可跳转 https://iscoconut.com/archives/3/ 查看在VNC上进行复制粘贴在控制台找到这个： Xterm.js Console 使用他就可以进行复制粘贴了。现在可以升级和安装软件了，他的用途是什么？或许可以考虑把他连接到你的 WAP HK LXC 或者 WAP KP LXC，延迟在50ms左右。然后在HK或者KP上安装对应的代理软件，在CN上转发过去就可以轻松使用 https://wap.ac/store/hk-e5-lxc-ipv6也可以连接到 ByteVirt家的SG 延迟80ms https://bytevirt.com/store/nat-lxcsocat转发快速参考， 感谢群友 @Riiina香港端 sing-box 入站设置参考考虑到备案检测等不稳定隐私，不建议进行 TLS 转发不建议在国内存储审计日志不建议在国内对公网开放面板 HTTP 访问{ "inbounds": [ { "type": "shadowsocks", "tag": "inbound-shadowsocks", "listen": "::", "listen_port": 3775, "sniff": true, "sniff_override_destination": true, "method": "2022-blake3-aes-256-gcm", "password": "使用 ./sing-box generate rand --base64 32 生成", # 强烈建议开启 Multiplex 和 Padding 并使用 sing-box 客户端 "multiplex": { # 强烈建议开启 Multiplex 和 Padding 并使用 sing-box 客户端 "enabled": true, "padding": true } } ] } 国内机安装 socatapt update && apt install -y socat 国内机测试转发/usr/bin/socat TCP6-LISTEN:3775,fork,reuseaddr TCP6:[你的香港IPv6地址]:3775 systemd 服务参考配置文件编辑命令: nano /etc/systemd/system/socat.service[Unit] Description=Internet Freedom [Service] DynamicUser=true ProtectSystem=true ProtectHome=true ExecStart=/usr/bin/socat TCP6-LISTEN:3775,fork,reuseaddr TCP6:[你的香港IPv6地址]:3775 Restart=always [Install] WantedBy=multi-user.target 启动服务systemctl enable socat.service systemctl start socat.service systemctl status socat.service 输出 "Active: active (running)" 表明 socat 已正常运行需要注意什么？只有IPv6，使用起来可能会很多麻烦。共享带宽，实际带宽质量可能并不能达到期望值参考资料：TG: @Riiinahttps://t.me/wap_group/230446
PVE防火墙实现禁止国内入向流量和国际出向流量
直接替换，需要详细资料见参考资料echo "deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb https://mirrors.aliyun.com/debian-security/ bullseye-security main deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >/etc/apt/sources.list 参考资料： https://www.cnblogs.com/liuguanglin/p/debian11_repo.html
下面给出的都是一件命令，如需详细信息请打开参考资料将debian12源替换为清华大学源echo " # 默认注释了源码镜像以提高 apt update 速度，如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware "> /etc/apt/sources.list 将pve源替换为清华大学源echo " deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription " > /etc/apt/sources.list.d/pve-enterprise.list 参考资料：https://mirrors.tuna.tsinghua.edu.cn/help/debian/https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/
修改 /etc/gai.conf找到下面这一行#precedence ::ffff:0:0/96 100当然也可能是#precedence ::ffff:0:0/96 10取消注释，修改为：precedence ::ffff:0:0/96 100 一句话命令：#鬼知道你这个是结尾10还是100，所以都执行。不过你最好手动去改 sed -i 's/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/' /etc/gai.conf sed -i 's/#precedence ::ffff:0:0\/96 10/precedence ::ffff:0:0\/96 100/' /etc/gai.conf 参考资料： https://u.sb/debian-prefer-ipv4/
GitHub仍不支持IPv6，但是可以使用指定host到代理服务器实现cat >> /etc/hosts << EOF # https://danwin1210.de/github-ipv6-proxy.php 2a01:4f8:c010:d56::2 github.com 2a01:4f8:c010:d56::3 api.github.com 2a01:4f8:c010:d56::4 codeload.github.com 2a01:4f8:c010:d56::5 objects.githubusercontent.com 2a01:4f8:c010:d56::6 ghcr.io 2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com EOF 参考资料： https://danwin1210.de/github-ipv6-proxy.phphttps://www.nodeseek.com/post-57839-1