+ whois, rdns: begin getting info for the most active clients on startup

This commit is contained in:
Simon Zolin 2019-10-07 15:57:34 +03:00
parent 418baa608f
commit d75620fdc0
1 changed files with 12 additions and 0 deletions

View File

@ -60,6 +60,18 @@ func initDNSServer() {
config.dnsctx.rdns = InitRDNS(&config.clients)
config.dnsctx.whois = initWhois(&config.clients)
topClients := config.stats.GetTopData(30)
for _, ip := range topClients {
ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
config.dnsctx.rdns.Begin(ip)
}
if isPublicIP(ipAddr) {
config.dnsctx.whois.Begin(ip)
}
}
initFiltering()
}