Skip to content

内置dns处理regexp规则时,判断顺序(优先级)错误。 #1127

Closed

Description

@simplerick-simplefun

使用的版本:
Xray-core v1.5.5
Xray-android-arm64-v8a.zip

问题:(注:此问题在v2fly最新稳定版中也存在)
对于mtalk.google.com,我设置的dns规则第一条是regexp:.*mtalk.google.com,第二条是geosite:google,第三条是geosite:geolocation-!cn。
但是实际match的时候,顺序变成了geosite:google、geosite:geolocation-!cn、regexp:.*mtalk.google.com,导致实际选择的dns服务器错误。

[Debug] app/dns: domain mtalk.google.com matches following rules: [geosite:google(DNS idx:2) geosite:geolocation-!cn(DNS idx:5) regexp:.*mtalk.google.com(DNS idx:0)]
[Debug] app/dns: domain mtalk.google.com will use DNS in order: [DOH//8.8.8.8 DOH//8.8.8.8 DOHL//120.53.53.53 DOHL//120.53.53.53]

我的conf.json:

{
  "dns": {
    "servers": [
      {
        "address": "https+local://120.53.53.53/dns-query",
        "skipFallback": false,
        "domains": [
          "regexp:.*mtalk.google.com"
        ]
      },
      {
        "address": "https://8.8.8.8/dns-query",
        "skipFallback": true,
        "domains": [
          "geosite:google"
        ]
      },
      {

        "address": "https+local://8.8.8.8/dns-query",
        "skipFallback": true,
        "domains": [
          "geosite:geolocation-!cn"
        ]
      }
    ]
  }
}

相关文档:
https://xtls.github.io/config/dns.html#dns-%E5%A4%84%E7%90%86%E6%B5%81%E7%A8%8B
https://www.v2fly.org/config/dns.html#dns-%E5%A4%84%E7%90%86%E6%B5%81%E7%A8%8B

没有命中 hosts,但命中了某(几)个 DNS 服务器中的 domains 域名列表,则按照命中的规则的优先级,依次使用该规则对应的 DNS 服务器进行查询。

Activity

  1. changed the title [-]内置dns处理regexp规则时,判断顺序错误。[/-] [+]内置dns处理regexp规则时,判断顺序(优先级)错误。[/+] on Jul 2, 2022
  2. added
    bug
    on Jul 3, 2022
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions