Skip to content

[Bug] dns配置 respect-rules:false 后 DoH3 还是匹配了rules #1538

Description

@returnL

Verify steps

  • 我已经阅读了 文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我未仔细看过 文档 并解决问题
  • 我未在 Issue Tracker 中寻找过我要提出的问题
  • 我已经使用最新的 Alpha 分支版本测试过,问题依旧存在
  • 我提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • 我提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

操作系统

Windows

系统版本

Windows 11

Mihomo 版本

Mihomo Meta alpha-6c03830 windows amd64 with go1.23.1 Tue Sep 24 05:28:14 UTC 2024

配置文件

tun:
  stack: gvisor
  device: Mihomo
  auto-route: true
  auto-detect-interface: true
  dns-hijack:
  	- any:53
  strict-route: false
  mtu: 1500
  enable: true
dns:
  enable: true
  prefer-h3: true
  use-hosts: true
  use-system-hosts: true
  respect-rules: false
  ipv6: true
  listen: 127.0.0.1:8853
  enhanced-mode: fake-ip
  fake-ip-range: 28.0.0.0/8
  default-nameserver:
    - 119.29.29.29
    - 223.5.5.5
  proxy-server-nameserver:
    - https://dns.alidns.com/dns-query
  nameserver:
    - https://dns.alidns.com/dns-query
rules:
  - AND,((DST-PORT,443),(NETWORK,udp)),REJECT

描述

规则中添加了 AND,((DST-PORT,443),(NETWORK,udp)),REJECT 用于避免走QUIC,但是我仍然希望DoH3可以走UDP,希望DNS直接直连出去,配置了 respect-rules: false,之后发现log中还是出现了DoH3被REJECT的记录

重现方式

dns中添加支持DoH3的dns,并配置 prefer-h3: truerespect-rules: false

日志

[UDP] 28.0.0.0:62302(verge-mihomo-alpha.exe) --> dns.alidns.com:443 match AND(((DstPort,443) && (Network,udp))) using REJECT

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions