TL;DR
Xray-core v26.2.4 (2026/2) 把
allowInsecure标记废弃,2026/6/1 UTC 强制下线。所有使用allowInsecure: true的客户端在 6/1 后无法连接。迁移方案:(1)服务端用真实 TLS 证书(推荐 Let’s Encrypt);或(2)客户端配置pinnedPeerCertSha256绑定证书指纹。可选启用mldsa65抗量子签名。
XTLS 团队在 2026 年 2 月通过 Xray-core v26.2.4 发布了 Reality 协议的安全收紧。核心改动是废弃 allowInsecure: true——一个早期为方便调试加入但被广泛滥用的不安全选项。强制下线时间是 2026 年 6 月 1 日 UTC。这一篇按”什么变了 / 怎么检查 / 怎么迁移 / 抗量子选项”四块讲清楚。
发生了什么
| 日期 | 事件 |
|---|---|
| 2025/12 | XTLS 公告 allowInsecure 将弃用 |
| 2026/2/15 | Xray-core v26.2.4 发布,标记 allowInsecure 为 deprecated |
| 2026/6/1 UTC | 强制下线,旧配置无法连接 |
allowInsecure 是 Reality 调试期的”开关”:让客户端跳过 TLS 证书校验,连任意服务端。便于在自签证书 / 临时部署时调试,但安全模型上是个洞——攻击者中间人可以伪造证书,Reality 的反检测设计被绕过。
怎么检查你受影响
自建用户
# 检查所有客户端配置
grep -r "allowInsecure" /your/config/path/
# 如果输出包含 "allowInsecure": true,需要迁移
或者在客户端 UI 里:
- v2rayN:服务器编辑 → TLS 设置 → 看 “Allow Insecure” 选项是否勾选
- Hiddify:节点详情 → TLS → “Skip Verification”
- Karing:节点设置 → TLS Settings
如果开着,你受影响。
机场用户
机场服务的订阅链接通常不直接暴露 allowInsecure 字段,但你可以:
- 导入订阅
- 检查实际生成的 Xray 配置(在客户端的”导出配置”功能)
- 看 streamSettings.realitySettings 或 tlsSettings 字段
正规机场服务在 2026/3 后基本都改了配置,但偶尔有用老脚本未更新的服务。如果你的订阅生成的配置仍有 allowInsecure: true,建议联系客服或换 兼容 Clash / Singbox / V2Ray 的订阅 已升级到新规范的服务商。
迁移方案 1:用真实 TLS 证书
最简单的做法是让服务端用真实的、被信任的 TLS 证书。
服务端:
# 用 acme.sh 申请 Let's Encrypt 证书
curl https://get.acme.sh | sh
~/.acme.sh/acme.sh --issue -d your-domain.com --standalone
# 把证书装到 Xray 配置
# /usr/local/etc/xray/config.json:
"tlsSettings": {
"serverName": "your-domain.com",
"certificates": [{
"certificateFile": "/root/.acme.sh/your-domain.com_ecc/fullchain.cer",
"keyFile": "/root/.acme.sh/your-domain.com_ecc/your-domain.com.key"
}]
}
客户端配置不需要 allowInsecure,直接连即可。
迁移方案 2:pinnedPeerCertSha256
如果你的服务端必须用自签证书(如内网 / 测试环境):
服务端:生成证书指纹
# 生成 SHA256 指纹
openssl x509 -in /path/to/cert.pem -noout -fingerprint -sha256 | \
awk -F= '{print $2}' | tr -d ':' | xxd -r -p | base64
# 输出形如:dGVzdGNlcnRzaGEyNTYxMjM0NTY3ODkw...
客户端:写入配置
Xray-core JSON 配置:
{
"streamSettings": {
"realitySettings": {
"show": false,
"fingerprint": "chrome",
"serverName": "your-domain.com",
"publicKey": "your-public-key",
"shortId": "your-short-id",
"spiderX": "/",
"pinnedPeerCertSha256": "dGVzdGNlcnRzaGEyNTYxMjM0NTY3ODkw..."
}
}
}
UI 客户端(v2rayN 7.x、Hiddify 4.0.4+、Karing 最新)已经有对应字段。
迁移方案 3:服务端 + 客户端都升级 + 自动协商
最稳但需服务端配合:
- 服务端升级到 Xray-core v26.2.4+
- 客户端升级到对应版本
- 双方握手时自动协商可信证书
- 不需要手动配置 allowInsecure 或 pinnedPeerCertSha256
适合机场服务商:服务端统一升级,让客户端版本要求 v26.2.4+。
可选:启用 mldsa65 抗量子签名
XTLS 在 2026 年 2 月给 Reality 加了 mldsa65(ML-DSA-65)支持,这是 NIST 在 2024 年标准化的抗量子签名算法。
启用方法
服务端:
# 生成 mldsa65 密钥对(Xray-core v26.2.4+ 内置)
xray mldsa65 -genkey > mldsa65.key
xray mldsa65 -pubout < mldsa65.key > mldsa65.pub
配置:
{
"inbounds": [{
"settings": {
"decryption": "mldsa65",
"mldsa65PrivateKey": "..."
}
}]
}
客户端:
{
"outbounds": [{
"settings": {
"vnext": [{
"encryption": "mldsa65",
"mldsa65PublicKey": "..."
}]
}
}]
}
现在要不要启用
- 数据敏感度高:金融、医疗、企业秘密通信——值得加
- 普通用户:当前没有量子计算机能破解 Curve25519,未来 5-10 年也极难
- 机场服务:性能开销约 +5-15%(签名验证),不必默认开启
XTLS 标记 mldsa65 为 “future-ready”,不是 “must”。
受影响的客户端版本
| 客户端 | 最低支持版本 | 升级方法 |
|---|---|---|
| Xray-core | v26.2.4 | github.com/XTLS/Xray-core/releases |
| v2rayN | 7.0+ | github.com/2dust/v2rayN/releases |
| v2rayNG | 1.10+ | Play Store / github.com/2dust/v2rayNG/releases |
| Hiddify | 4.0.4+ | github.com/hiddify/hiddify-app/releases |
| Karing | 1.1.x+(iOS 2026/5) | App Store |
| sing-box | 1.14+ | sing-box.sagernet.org |
GitHub 下载慢的用户可以到本站 加速下载中心 选择对应客户端,每个 Release 文件都已生成 4 个反代镜像通道直链。
实施时间表(建议)
- 现在到 2026/5/31:检查所有客户端,标记需要迁移的
- 2026/6/1 之后:未迁移的客户端无法连 v26.2.4+ 服务端
- 6 月:服务端升级 + 通知用户更新订阅
- 7 月:完成迁移
来源与最后核对
- Xray-core 发布页:github.com/xtls/xray-core/releases
- XTLS REALITY 仓库:github.com/XTLS/REALITY
- NIST ML-DSA 标准:csrc.nist.gov/projects/post-quantum-cryptography
- acme.sh 证书申请:github.com/acmesh-official/acme.sh
本文最后实际验证日期:2026-05-18。