Skip to content

tunnel 入站协议的 allowedNetwork 配置无效 #6406

Description

@BingMeng

完整性要求

  • 我读完了 issue 模板中的所有注释,确保填写符合要求。
  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我提供了完整的配置文件和日志,而不是出于自己的判断只给出截取的部分。
  • 我搜索了 issues, 没有发现已提出的类似问题。
  • 问题在 Release 最新的版本上可以成功复现

描述

tunnel 入站协议的 allowedNetwork 配置无效。
配置为 udp 时,依然监听 tcp 端口

重现方式

配置 tunnel 入站协议

{
      "listen": "127.0.0.1",
      "port": 597,
      "protocol": "tunnel",
      "settings": {
        "allowedNetwork": "udp",
        "rewriteAddress": "127.0.0.1",
        "rewritePort": 12345
      }
}

客户端配置

配置 tunnel 入站协议

{
      "listen": "127.0.0.1",
      "port": 597,
      "protocol": "tunnel",
      "settings": {
        "allowedNetwork": "udp",
        "rewriteAddress": "127.0.0.1",
        "rewritePort": 12345
      }
}

服务端配置

客户端日志

Jun 30 18:11:55 systemd[1]: Started xray@client.service - Xray Service.
Jun 30 18:11:55 xray[208706]: Xray 26.3.27 (Xray, Penetrates Everything.) d2758a0 (go1.26.1 linux/amd64)
Jun 30 18:11:55 xray[208706]: A unified platform for anti-censorship.
Jun 30 18:11:55 xray[208706]: 2026/06/30 18:11:55.490130 [Info] infra/conf/serial: Reading config: &{Name:/usr/local/etc/xray/client.json Format:json}
Jun 30 18:11:55 xray[208706]: 2026/06/30 18:11:55.491567 [Warning] core: Xray 26.3.27 started

netstat
tcp        0      0 127.0.0.1:597           0.0.0.0:*               LISTEN      208767/xray

服务端日志

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions