1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

add DNS resolver, update all the handlers

This commit is contained in:
Timothy
2020-05-03 21:32:06 +08:00
parent e91015f051
commit 8a3471ad1c
10 changed files with 162 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.
for _, subDomain := range domain.SubDomains {
hostname := subDomain + "." + domain.DomainName
lastIP := godns.ResolveDNS(hostname, handler.Configuration.Resolver)
lastIP := godns.ResolveDNS(hostname, handler.Configuration.Resolver, handler.Configuration.IPType)
//check against currently known IP, if no change, skip update
if currentIP == lastIP {
log.Printf("IP is the same as cached one. Skip update.\n")