Skip to content

无法阻断quic协议 #6052

Closed
Closed

Description

@debugzxcv

完整性要求

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

描述

无法阻断quic协议

重现方式

  1. 打开edge浏览器,打开DevTools,切换到网络标签,勾选禁用缓存,
  2. 地址栏输入 https://p.sda1.dev/favicon.ico (确保 Experimental QUIC protocol 处于 Enabled edge://flags/#enable-quic)
  3. 多刷新几次

客户端配置

Details

{
  "log": {
    "loglevel": "debug",
    "dnsLog": true
  },
  "dns": {
    "servers": [
      "https://223.5.5.5/dns-query"
    ]
  },
  "inbounds": [
    {
      "tag": "tun",
      "protocol": "tun",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls",
          "quic"
        ],
        "routeOnly": true
      },
      "settings": {
        "name": "xray0",
        "MTU": 9000,
        "gateway": [
          "172.18.0.1/30"
        ],
        "autoSystemRoutingTable": [
          "0.0.0.0/0",
          "::/0"
        ],
        "autoOutboundsInterface": "auto"
      }
    }
  ],
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    {
      "tag": "block",
      "protocol": "blackhole"
    },
    {
      "tag": "dns",
      "protocol": "dns",
      "settings": {
        "rules": [
          {
            "action": "hijack",
            "qtype": "1,28"
          }
        ]
      }
    }
  ],
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "outboundTag": "direct",
        "process": [
          "xray/",
          "self/"
        ]
      },
      {
        "outboundTag": "dns",
        "port": "53"
      },
      {
        "outboundTag": "block",
        "domain": [
          "full:p.sda1.dev"
        ],
        "protocol": [
          "quic"
        ]
      }
    ]
  }
}

服务端配置

N/A

客户端日志

Details

2026/05/02 00:56:09.212964 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
2026/05/02 00:56:09.215501 [Debug] app/log: Logger started
2026/05/02 00:56:09.215501 [Info] app/dns: DNS: created DOH client for https://223.5.5.5/dns-query, with h2c false
2026/05/02 00:56:09.260022 Using existing driver 0.14
2026/05/02 00:56:09.262596 Creating adapter
2026/05/02 00:56:09.353248 [Info] proxy/tun: [tun] update interface 以太网 13
2026/05/02 00:56:09.353248 [Info] proxy/tun: xray0 created
2026/05/02 00:56:09.365673 [Info] proxy/tun: xray0 up
2026/05/02 00:56:09.366666 [Warning] core: Xray 26.4.17 started
2026/05/02 00:56:09.435782 [Info] [642388821] proxy/tun: processing from udp:172.18.0.2:137 to udp:172.18.0.3:137
2026/05/02 00:56:09.437313 [Info] [642388821] app/dispatcher: default route for udp:172.18.0.3:137
2026/05/02 00:56:09.437313 [Debug] [642388821] transport/internet: dialing to udp:172.18.0.3:137
2026/05/02 00:56:09.437313 from udp:172.18.0.2:137 accepted udp:172.18.0.3:137 [tun >> direct]
2026/05/02 00:56:09.437822 [Info] [642388821] proxy/freedom: connection opened to udp:172.18.0.3:137, local endpoint [::]:63474, remote endpoint 172.18.0.3:137
2026/05/02 00:56:20.410233 [Info] [3935300331] proxy/tun: processing from udp:172.18.0.2:57309 to udp:172.18.0.1:53
2026/05/02 00:56:20.410233 [Info] [3935300331] app/dispatcher: taking detour [dns] for [udp:172.18.0.1:53]
2026/05/02 00:56:20.410233 from udp:172.18.0.2:57309 accepted udp:172.18.0.1:53 [tun -> dns]
2026/05/02 00:56:20.410233 [Info] [3935300331] proxy/dns: handling DNS traffic to udp:172.18.0.1:53
2026/05/02 00:56:20.410233 [Debug] app/dns: domain p.sda1.dev will use DNS in order: [DOH//223.5.5.5]
2026/05/02 00:56:20.410749 [Info] app/dns: DOH//223.5.5.5 querying: p.sda1.dev.
2026/05/02 00:56:20.427071 DOH//223.5.5.5 got answer: p.sda1.dev. -> [104.21.42.212, 172.67.166.78] 16.8382ms
2026/05/02 00:56:20.427071 [Info] app/dns: DOH//223.5.5.5 got answer: p.sda1.dev. TypeA -> [104.21.42.212 172.67.166.78], rtt: 16.8382ms, lock: 0s
2026/05/02 00:56:20.428031 [Info] [406579242] proxy/tun: processing from udp:172.18.0.2:49872 to udp:104.21.42.212:443
2026/05/02 00:56:20.428547 [Info] [406579242] app/dispatcher: sniffed domain: p.sda1.dev
2026/05/02 00:56:20.428547 [Info] [406579242] app/dispatcher: taking detour [block] for [udp:p.sda1.dev:443]
2026/05/02 00:56:20.428547 from udp:172.18.0.2:49872 accepted udp:104.21.42.212:443 [tun -> block]
2026/05/02 00:56:21.132683 [Info] [2105151232] proxy/tun: processing from udp:172.18.0.2:49872 to udp:104.21.42.212:443
2026/05/02 00:56:21.333583 [Info] [2105151232] app/dispatcher: default route for udp:104.21.42.212:443
2026/05/02 00:56:21.333583 from udp:172.18.0.2:49872 accepted udp:104.21.42.212:443 [tun >> direct]
2026/05/02 00:56:21.333629 [Debug] [2105151232] transport/internet: dialing to udp:104.21.42.212:443
2026/05/02 00:56:21.333629 [Info] [2105151232] proxy/freedom: connection opened to udp:104.21.42.212:443, local endpoint [::]:49873, remote endpoint 104.21.42.212:443
2026/05/02 00:56:31.006151 [Debug] app/log: Logger closing

服务端日志

N/A

Activity

  1. Fangliding commented on May 1, 2026

    @Fangliding
    Member

    可比 #6051 好多了 有日志就都可以解释了 看起来是AI写的UDP逻辑有问题

  2. RPRX commented on May 1, 2026

    @RPRX
    Member

    测一下 v26.4.25

    确实有问题的话 @Fangliding 修一下吧,该发稳定版了

  3. Fangliding commented on May 1, 2026

    @Fangliding
    Member

    测一下 v26.4.25

    确实有问题的话 @Fangliding 修一下吧,该发稳定版了

    可能还得考虑 我稍微看了一下 这是link退出导致整个conn被回收 流程大概是 发第一个 QUIC init 然后后面跟了几个包 前面因为sniffer被正确丢掉了 然后link退出 后面被重算一个新连接了 然后之前的包这会进来了 导致这几个包充当了noise的作用骗过了嗅探器

  4. Fangliding commented on May 1, 2026

    @Fangliding
    Member

    想法来自GFW阻断UDP的行为 搬到xray来了

  5. debugzxcv commented on May 1, 2026

    @debugzxcv
    Author
  6. bigpao88 commented on May 2, 2026

    @bigpao88
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