1
0
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:
Timothy
2020-08-10 23:49:12 +08:00
parent 1ddd1dfb8b
commit a7c2b0a56e
12 changed files with 202 additions and 27 deletions

View File

@@ -58,7 +58,12 @@ 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, 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")