SagerNet / v2ray-core

A platform for building proxies to bypass network restrictions (for SagerNet :)
Other
230 stars 29 forks source link

内置DNS的“expectIPs”功能无法正常工作 #19

Open gubiao opened 2 years ago

gubiao commented 2 years ago

在v2ray-core/xray-core/AnXray中, 我总是使用以下配置做国内/国内IP地址分流:

{
  "dns": {
    "servers": [
      {
        "address": "119.29.29.29",
        "expectIPs": [
          "ext:geoip-only-cn-private.dat:cn"
        ]
      },
      {
        "address": "8.8.8.8"
      },
      {
        "address": "localhost"
      }
    ],
    "disableCache": false,
    "queryStrategy": "UseIPv4",
    "disableFallbackIfMatch": true
  }
}

首先查询国内DNS, 如果返回的IP是国内地址则最为最终结果, 如果返回的IP是国外地址则继续通过代理查询谷歌DNS并把返回的结果作为最终结果; 路有组件中配置国内国外IP地址分流, 国外IP地址统一全部走代理;

客户端和服务端全部切换为最新版本SagerNet/v2ray-core后发现此方式无法正常工作, “expectIPs”配置项好像是被忽略了, "重写后的DNS模块"不再提供此功能?还是这是由于BUG造成的?