mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
feat: add No-IP provider
This commit is contained in:
@@ -54,7 +54,12 @@ func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.
|
||||
log.Println("currentIP is:", currentIP)
|
||||
for _, subDomain := range domain.SubDomains {
|
||||
hostname := subDomain + "." + domain.DomainName
|
||||
lastIP := godns.ResolveDNS(hostname, handler.Configuration.Resolver, handler.Configuration.IPType)
|
||||
lastIP, err := godns.ResolveDNS(hostname, handler.Configuration.Resolver, handler.Configuration.IPType)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
|
||||
//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")
|
||||
|
||||
Reference in New Issue
Block a user