shawn1m / overture

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

How do I add a third upstream DNS? #177

Open hurongyang opened 4 years ago

hurongyang commented 4 years ago

By default, the conif.json file defines PrimaryDNS and AlternativeDNS. How do I add the third one?

phantomcraft commented 4 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": "disable",
        "ExternalIP": "",
        "NoCookie": true
      }
    }
  ],
  "AlternativeDNS": [
    {
      "Name": "OpenDNS",
      "Address": "208.67.222.222:443",
      "Protocol": "tcp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "disable",
        "ExternalIP": "",
        "NoCookie": true
      }
    },{
      "Name": "Cloudflare",
      "Address": "1.1.1.1:53",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "disable",
        "ExternalIP": "",
        "NoCookie": true
      }
    },{
      "Name": "Quad9",
      "Address": "9.9.9.9:53",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "disable",
        "ExternalIP": "",
        "NoCookie": true
      }
    }
  ],
  "OnlyPrimaryDNS": false,
  "IPv6UseAlternativeDNS": false,
  "WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
  "IPNetworkFile": {
    "Primary": "./ip_network_primary_sample",
    "Alternative": "./ip_network_alternative_sample"
  },
  "DomainFile": {
    "Primary": "./domain_primary_sample",
    "Alternative": "./domain_alternative_sample",
    "Matcher":  "regex-list"
  },
  "HostsFile": "./hosts_sample",
  "MinimumTTL": 0,
  "DomainTTLFile" : "./domain_ttl_sample",
  "CacheSize" : 0,
  "RejectQType": [255]
}

As I have seen, overture looks for the first active DNS server and if an error is encountered, it uses the next.

shawn1m commented 4 years ago

This feature is not available by now.

phantomcraft commented 4 years ago

@shawn1m

I don't understand, I can choose more than one alternative addresses although they will be used always as a fallback if the preceding one fails.

Also, an interesting feature would be HTTP proxy support, as it exists few DNS servers that support using port 443:

185.121.177.177:443 169.239.202.202:443 142.4.204.111:443 142.4.205.47:443 208.67.220.123:443 208.67.222.222:443 208.67.220.220:443