Skip to content

v1.0.0

Choose a tag to compare

@Kation Kation released this 26 Sep 09:45

防止Dns污染App

配置说明

{
  "isDebug": false, //改为true会记录很多日志
  "geo": {
    "isEnabled": true, //改为false关闭根据IP地址判断国家的功能
    "subscribeUrl": "https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb", //这里暂时不支持使用下面配置的代理来下载
    "countries": [ "CN" ] //如果IP地址不在此国家列表内,则会进行重试
  },
  "nameServers": [ //重试时使用的DNS服务器
    {
      "url": "https://dns.google/dns-query", //非Udp必填
      "ip": "8.8.8.8", //DNS服务器IP地址,必填
      "protocol": "Https", //Udp,Tcp,Tls,Https,Quic
      "port": 443
    },
    {
      "url": "dns.google",
      "ip": "8.8.4.4",
      "protocol": "Tls",
      "port": 853
    }
  ],
  "proxy": { //重试时使用代理访问DNS服务器
    "type": "None", //None,Http,Socks5
    "address": null,
    "port": 8080,
    "username": null,
    "password": null
  },
  "domains": [ //以下域名直接使用重试的DNS服务器进行解析,不使用默认服务器
    "*.google.com", //*代表只匹配这一级的泛型域名
    "+.youtube.com" //+代表匹配后缀
  ],
  "exceptDomains": [ //以下域名不进行重试,一般用于内网域名
    "lan"
  ],
  "ipcidr": [ //解析出来的IP属于以下网段时会进行重试
    "0.0.0.0/8",
    "10.0.0.0/8",
    "100.64.0.0/10",
    "127.0.0.0/8",
    "169.254.0.0/16",
    "172.16.0.0/12",
    "192.168.0.0/16",
    "224.0.0.0/4",
    "240.0.0.0/4",
    "255.255.255.255/32"
  ]
}