shawn1m / overture

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

Error: Failed to open IP network file: open : no such file or directory #219

Closed valkjsaaa closed 4 years ago

valkjsaaa commented 4 years ago

Here is my config:

{
  "BindAddress": "127.0.0.1:5454",
  "DebugHTTPAddress": "127.0.0.1:5555",
  "PrimaryDNS": [
    {
      "Name": "CFDNS",
      "Address": "1.1.1.1:53",
      "Protocol": "tcp",
      "SOCKS5Address": "127.0.0.1:1080",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "disable",
        "ExternalIP": ""
      }
    }
  ],
  "AlternativeDNS": [
    {
      "Name": "GoogleDNS",
      "Address": "8.8.8.8:53",
      "Protocol": "tcp",
      "SOCKS5Address": "127.0.0.1:1080",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "disable",
        "ExternalIP": ""
      }
    }
  ],
  "OnlyPrimaryDNS": false,
  "IPv6UseAlternativeDNS": false,
  "IPNetworkFile": {
    "Primary": "/etc/chnroute/chnroute.txt",
    "Secondary": "/etc/overture/ip_network_alternative_sample"
  },
  "DomainFile": {
    "Primary": "/etc/overture/domain_primary_sample",
    "Alternative": "/etc/overture/domain_alternative_sample"
  },
  "HostsFile": "/etc/overture/hosts_sample",
  "MinimumTTL": 0,
  "CacheSize" : 0,
  "RejectQtype": [255]
}
valkjsaaa commented 4 years ago

I've checked and both directories in IPNetworkFile works:

➜  chnroute l /etc/chnroute/chnroute.txt
-rw-r--r-- 1 root root 127K 1月  23  2019 /etc/chnroute/chnroute.txt
➜  chnroute l /etc/overture/ip_network_alternative_sample
-rw-r--r-- 1 root root 13 1月  21  2019 /etc/overture/ip_network_alternative_sample
valkjsaaa commented 4 years ago

I got it. Secondary should be Secondary in IPNetworkFile.