Skip to content

看节奏快出Release了, 反馈哈: ECH + Go 1.27: MinVersion must be >= TLS1.3 #6737

Closed

Description

@devwak

环境

  • Xray-core: 26.7.28 (custom)
  • Go: 1.27.0 / 1.27.1(1.26.5 正常)
  • 场景: VLESS + XHTTP (H3) + ECH(echConfigList)

现象

Go 1.27.x 编译后开启 ECH,XHTTP H3 失败;同一配置用 Go 1.26.5 正常。关闭 echConfigList 后 1.27 也正常。

错误:
CRYPTO_ERROR 0x150 (local): tls: MinVersion must be >= VersionTLS13 if EncryptedClientHelloConfigList is populated

原因

Go 1.27 crypto/tls 要求:设置了 EncryptedClientHelloConfigList 时,MinVersion(若设置)必须 ≥ TLS 1.3。

  • ApplyECH 只写入 ECH list,未保证 MinVersion
  • copyConfig(uTLS)拷贝 ECH list 时未带上 MinVersion / MaxVersion,H2 + fingerprint + ECH 路径也可能踩坑

修复

1. transport/internet/tls/ech.go(必须)

在 ApplyECH 写入 EncryptedClientHelloConfigList 后强制版本:

config.EncryptedClientHelloConfigList = ECHConfig
// Go 1.27+: EncryptedClientHelloConfigList requires MinVersion >= TLS 1.3
if config.MinVersion == 0 || config.MinVersion < tls.VersionTLS13 {
	config.MinVersion = tls.VersionTLS13
}
if config.MaxVersion != 0 && config.MaxVersion < tls.VersionTLS13 {
	config.MaxVersion = tls.VersionTLS13
}   

// 估计 transport/internet/tls/tls.go 中 func copyConfig(c *tls.Config) *utls.Config {  也需要相应处理

Activity

  1. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    (若设置)必须 ≥ TLS 1.3

    确定是“若设置”吗

    @Fangliding

  2. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    这是固定要求啊 要是有人填了 Min 1.2 旧版本还能连上属于是bug 空的应该没问题

  3. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    我的意思是 Golang 的要求,我寻思一般默认留空应该没问题来着?@Fangliding 你测测看看要不要改代码吧,不急的话就下个版本

  4. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    留空肯定没问题 test写在那的 真连不上test会报的

  5. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    那就先发版了

  6. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    reality又死了一片 是不是有点过火了 并不是所有不带mlkem的都是有问题的指纹 要不只屏蔽那些开新chrome指纹但是没有mlkem指纹 明显不对劲的就行了

  7. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    三大浏览器更新 X25519MLKEM768 已经很久了,现在不带它的指纹都已经属于过时/奇怪/小众,所以长远来看要求必须有 X25519MLKEM768 相对一劳永逸,针对的除了“它被 trim 掉了”这种奇怪行为还有过时指纹,况且若检测 Chrome 指纹然而 Chrome 发个新版能直接绕过旧版检测

    @Fangliding 这个 PR #6640 改的 VLESS 出站检测 encryption 据报告有点问题,需要尽快修一下

  8. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    哪样的问题

  9. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    In upstream Xray-core, commit 65458e9 (August 27) fixed the validation that prohibits “VLESS without TLS or other encryption on a public address.”

    Before this commit, the check effectively did not work for configs using the vnext format. After the fix, the check started working, but it was looking for the encryption field in the wrong place for this format — at the top level of settings instead of vnext[0].users[0].

    As a result, ML-KEM encryption was not detected, and the core rejected valid configs with the following error:

    vless without TLS or other encryption is prohibited unless the server address is a private IP or domain

    (vless ws encryption non tls not work)

    This affects all clients using a recent Xray-core version.

    We had to patch it on our side.

    The core build now includes a patch that also checks encryption inside vnext[0].users[]. Configs using mlkem768x25519plus... now pass validation again, while plain VLESS without TLS or other encryption on a public IP is still rejected, as intended by upstream.

  10. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    我还真不知道还能写 account 里 看起来是被 proto 的 parser 自动包含的 这写法从没进过文档 有点蛋疼

  11. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    问题不大,明天补发个版本就行,顺便把这个 issue 提到的事情也写一下吧,或者你分成两个 PR

  12. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    这个issue的问题不存在 我没关只是留着把新版本有关的讨论贴在这

  13. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    我想他说的问题大概是又填了 ECH 又手填了 min/max 1.2 的情况(但应该不影响 uTLS?),但可以配置检测填了 ECH 时无视 min/max 选项

  14. Fangliding commented on Sep 8, 2026

    @Fangliding
    Member

    为什么要加这样的静默行为呢 本来就不该这样填的

  15. RPRX commented on Sep 8, 2026

    @RPRX
    Member

    那这个 issue 也顺便关了吧,有问题应当开独立的 issue 方便 track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions