openwrt-passwall2 icon indicating copy to clipboard operation
openwrt-passwall2 copied to clipboard

[Feature Request]: 希望添加自定义dns的功能

Open shang-zhen opened this issue 4 months ago • 0 comments

描述你想要的新功能

希望能提供配置由用户完全自定义dns的设置。比如由用户提供的json格式文本完全替换现有的dns设置。

描述你想要的解决方案

希望能提供配置由用户完全自定义dns的设置。比如由用户提供的json格式文本完全替换现有的dns设置。 遇到的问题是无法进行精准的dns分流。

目前自动生成的规则只有direct的才通过127.0.0.1解析,默认通过远程dns解析。

{
        "queryStrategy": "UseIPv4",
        "port": 443,
        "_flag": "default",
        "address": "https:\/\/223.6.6.6\/dns-query"
      },

会导致一些没有在路由规则中的国内网站在有国外dns的情况下获取到国外的dns。从而分流到国外网站。希望能更灵活一些。提供用户自定义配置。

我自用的dns设置:

"dns": {
    "hosts": {
      "dns.alidns.com": "223.6.6.6",
      "doh.pub": "120.53.53.53",
      "doh.apad.pro": "220.185.184.18"
    },
    "servers": [
      {
        "address": "https+local://1.1.1.1/dns-query",
        "domains": [
          "geosite:gfw"
        ],
        "skipFallback": true
      },
      "localhost"
    ],
    "clientIp": "111.17.1.1",
    "queryStrategy": "UseIPv4"
  }

通过自定义可以把特定的规则的网站才通过远程dns解析。 从而实现类似 ‘把解析后的cloudflare的ip的网站通过路由规则通过特定的出栈’的功能。

描述你考虑过的替代方案

No response

其他信息

No response

shang-zhen avatar Oct 21 '24 13:10 shang-zhen