shawn1m / overture

A customized DNS relay server
MIT License
1.79k stars 284 forks source link

只域名黑名单情况下,rc4全走Primary,rc3正常 #172

Closed WoChen5770 closed 4 years ago

WoChen5770 commented 5 years ago

import-yuefeng commented 5 years ago

贴一下配置文件看看

WoChen5770 commented 5 years ago

贴一下配置文件看看

{ "BindAddress": ":53", "DebugHTTPAddress": "127.0.0.1:5555", "PrimaryDNS": [ { "Name": "DNSPod", "Address": "119.29.29.29:53", "Protocol": "udp", "SOCKS5Address": "", "Timeout": 6, "EDNSClientSubnet": { "Policy": "auto", "ExternalIP": "", "NoCookie": true } }, { "Name": "DNSPod2", "Address": "119.28.28.28:53", "Protocol": "udp", "SOCKS5Address": "", "Timeout": 6, "EDNSClientSubnet": { "Policy": "auto", "ExternalIP": "", "NoCookie": true } } ], "AlternativeDNS": [ { "Name": "google", "Address": "dns.google:853@8.8.8.8", "Protocol": "tcp-tls", "SOCKS5Address": "", "Timeout": 6, "EDNSClientSubnet": { "Policy": "auto", "ExternalIP": "", "NoCookie": true } }, { "Name": "dns_one", "Address": "one.one.one.one:853@1.1.1.1", "Protocol": "tcp-tls", "SOCKS5Address": "", "Timeout": 6, "EDNSClientSubnet": { "Policy": "auto", "ExternalIP": "", "NoCookie": true } } ], "OnlyPrimaryDNS": false, "IPv6UseAlternativeDNS": false, "WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS", "IPNetworkFile": { "Primary": "/etc/overture/ip_network_primary_sample", "Alternative": "/etc/overture/ip_network_alternative_sample" }, "DomainFile": { "Primary": "/etc/overture/domain_primary_sample", "Alternative": "/etc/overture/domain_alternative_sample", "Matcher": "suffix-tree" }, "HostsFile": "/etc/overture/hosts_sample", "MinimumTTL": 0, "DomainTTLFile" : "/etc/overture/domain_ttl_sample", "CacheSize" : 0, "RejectQType": [255] }

import-yuefeng commented 5 years ago

奇怪🤔,我在进行 smartDNS 改动的时候遇到过,不过是匹配模式选错了,代码级的逻辑我看了下,似乎没问题。

rampageX commented 4 years ago

域名匹配方式选 suffix-tree 就会有这个问题,在有主 IPNetworkfile 为 chnroute 的情况下,即使主从域名列表均为空都总是会用主 DNS 查询从而返回被污染的结果。选其它匹配方式没有问题,但是性能降低太厉害。

  "OnlyPrimaryDNS": false,
  "IPv6UseAlternativeDNS": false,
  "WhenPrimaryDNSAnswerNoneUse": "AlternativeDNS",
  "IPNetworkFile": {
    "Primary": "/opt/etc/cn.zone",
    "Alternative": "/opt/etc/empty"
  },
  "DomainFile": {
    "Primary": "",
    "Alternative": "",
    "Matcher":  "suffix-tree"
  },

overture_suffix-tree_bug