Skip to content

VLESS over Hysteria inbound transport panics with "validator is nil" and incorrectly attempts to bind TCP (DispatchLink issue) #5973

Closed as not planned

Description

@StormArchitect

Integrity requirements

  • I have read all the comments in the issue template and ensured that this issue meet the requirements.
  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • I searched issues and did not find any similar issues.
  • The problem can be successfully reproduced in the latest Release

Description

When using network: "hysteria" as an inbound transport for protocol: "vless" in v26.3.27, the core fails to start the inbound with two specific errors:

  1. failed to listen TCP on 443 (even though Hysteria is UDP-only).
  2. transport/internet/hysteria: validator is nil (even when valid physical TLS certificates are correctly provided in tlsSettings).

Root Cause & Related Issues:
Based on recent discussions (such as Issue #5845 regarding VLESS + TUN), it appears this is a fundamental L4/L7 routing bug in the VLESS dispatcher's DispatchLink() function.
The VLESS dispatcher fails to recognize new exclusive UDP transports (like Hysteria2) and blindly attempts to bind a TCP listener before the Hysteria transport correctly signals it's UDP-only. The TCP bind fails, which causes the TLS context to be discarded, leaving the Hysteria validator uninitialized (nil).

Environment & Permissions Verification:

  • Xray version: v26.3.27 (go1.26.1 linux/amd64)
  • OS: Ubuntu 24.04.1 LTS
  • Permissions: Ownership is nobody:nogroup, permissions are 644. Running sudo -u nobody cat successfully reads both .pem and .key. Physical files are used (no symlinks).
  • Config validation: xray run -test -config config.json passes successfully ("Configuration OK"). Runtime initialization is what crashes.

Workaround:
Replacing network: "hysteria" with network: "xhttp" + alpn: ["h3"] achieves the same QUIC/UDP transport and works correctly as an inbound for VLESS.

@RPRX @LjhAUMEM @yuhan6665 Could you please check the DispatchLink() transport listener wiring for network: "hysteria" under VLESS inbound?

Reproduction Method

  1. Use Xray-core version v26.3.27.
  2. Configure a VLESS inbound with network: "hysteria" and security: "tls".
  3. Point tlsSettings to valid, physical TLS certificate files (not symlinks) and ensure the user running Xray (e.g., nobody) has strict read permissions (e.g., 644).
  4. Run the Xray-core process (e.g., xray run -c config.json).
  5. Observe the runtime initialization crash: the core incorrectly attempts to bind a TCP listener (failed to listen TCP on 443) and immediately panics with transport/internet/hysteria: validator is nil.

Client config

Details

N/A — server does not start, so client connection is not possible.

Server config

Details

{
  "port": 443,
  "protocol": "vless",
  "settings": {
    "clients": [{"id": "", "flow": "xtls-rprx-vision"}],
    "decryption": "mlkem768x25519plus.native.600s."
  },
  "streamSettings": {
    "network": "hysteria",
    "security": "tls",
    "tlsSettings": {
      "certificates": [{
        "certificateFile": "/path/to/fullchain.pem",
        "keyFile": "/path/to/private.key"
      }]
    },
    "finalmask": {
      "udp": [
        {"type": "salamander", "settings": {"password": ""}}
      ],
      "quicParams": {
        "congestion": "brutal",
        "brutalUp": "100 mbps",
        "brutalDown": "100 mbps"
      }
    }
  }
}

Client log

Client log

Details

N/A — server does not start, so client connection is not possible.

Server log

Server log

Details

app/proxyman/inbound: failed to listen TCP on 443 > transport/internet: failed to listen on address: 0.0.0.0:443 > transport/internet/tcp: failed to listen TCP on 0.0.0.0:443 > listen tcp 0.0.0.0:443: bind: address already in use
transport/internet/hysteria: validator is nil

Activity

  1. RPRX commented on Apr 18, 2026

    @RPRX
    Member

    Hysteria 传输层本来是只给 Hysteria 出入站用的,不过鉴于旧版 reverse 即将被删掉,再看看吧

    算了要不这个版本就先把旧版 reverse 禁掉吧,既然 #5947 会炸掉一些内网穿透那干脆赶一起炸

  2. RPRX commented on Apr 18, 2026

    @RPRX
    Member

    @LjhAUMEM 看看有没有时间修一下这个

  3. Fangliding commented on Apr 18, 2026

    @Fangliding
    Member

    hy传输会从hy proxy获取入站用户 非hy proxy需要填auth参数 不是bug

  4. Fangliding commented on Apr 18, 2026

    @Fangliding
    Member

    AI瞎分析

  5. LjhAUMEM commented on Apr 18, 2026

    @LjhAUMEM
    Contributor

    @LjhAUMEM 看看有没有时间修一下这个

    修啥,给的日志都不是 panic,标题说是就是了,hy 传输层要求认证,搭配非 hy protocol 且无 auth 这是正常的输出

    话说这些开 issue 的不能用人话讲吗,一定要 llm 过滤一遍

  6. RPRX commented on Apr 25, 2026

    @RPRX
    Member

    虽然能配置 VLESS 反向代理 + Hysteria 传输层,不过如果真有人用容易被 Q、极不稳定的 Brutal UDP 来跑反向代理,也是这辈子有了

    @Fangliding cd4d0ba ,以及 VLESS 出站文档 reverse 还没写 sniffing 755f0a1 ,另外需要标注一下会收到原始四元组 12f4a01

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