Leadaxe:sing-box-lx 的 XHTTP 此前只走 TCP 上的 HTTP/2,只开 h3 的 Xray 入站连不上

在「XHTTP + H3 该怎么配置」的问题中,Leadaxe 回复称报告者的配置本身是正确的:此前 sing-box-lx 的 XHTTP 传输只在 TCP 上跑 HTTP/2,因此只开放 h3(QUIC、UDP)的 Xray 入站无法连通。他已在 v1.14.2-lx.2-rc.2 中改为按 Xray 的方式从 tls.alpn 选择 HTTP 版本(SPEC 104):alpn 为 h3 时走 QUIC 上的 HTTP/3,为 http/1.1 时走 HTTP/1.1,未启用 TLS 时为 HTTP/1.1(原先是 h2c),REALITY 为 HTTP/2,其余情况为 HTTP/2;既有出站配置无需改动,也不需要新的密钥。他还说明三点:utls.fingerprint 对 HTTP/3 无效(与 Xray 一致),内核会记一条警告并改用接近 Chrome 的 QUIC 握手,h3 节点可去掉 utls 段以消除该警告;certificate_public_key_sha256 在 HTTP/3 上仍然生效,报告者的证书固定值与该证书匹配;HTTP/3 需要到服务器的 UDP,无法承载 UDP 的 detour 会连接失败。该修复已用 Xray 26.9.9 的 h3-only 入站配合报告者的原配置,在 packet-up、stream-up、stream-one 三种模式下验证,他请对方试用该 rc 版本并反馈。

作者原文

Thanks for the detailed report — your config was correct. The XHTTP transport in sing-box-lx spoke HTTP/2 over TCP only, so an h3-only Xray inbound (QUIC, UDP) was unreachable.

Fixed in v1.14.2-lx.2-rc.2: the HTTP version is now chosen from tls.alpn the same way Xray does it (SPEC 104):

| tls | HTTP version |
|---|---|
| alpn: ["h3"] | HTTP/3 over QUIC |
| alpn: ["http/1.1"] | HTTP/1.1 |
| no TLS | HTTP/1.1 (was h2c) |
| REALITY | HTTP/2 |
| anything else | HTTP/2 |

Your outbound works as-is, no new keys. Notes:

  • utls.fingerprint does not apply to HTTP/3 (same as Xray); the core logs a warning and uses a Chrome-like QUIC handshake instead. You can drop the utls block for h3 nodes to silence it.
  • certificate_public_key_sha256 is honoured on HTTP/3 — your pin VlDZTMJ3…BCX4= matches the certificate.
  • HTTP/3 needs UDP to the server; a detour that cannot carry UDP will fail to connect.

Verified against Xray 26.9.9 with an h3-only inbound and your exact client config, in packet-up, stream-up and stream-one. Please try the rc and let us know if it works on your side.