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

Merge branch 'master' of github.com:TimothyYe/godns

This commit is contained in:
Timothy 2020-03-09 14:18:08 +08:00
commit e5f9076259
No known key found for this signature in database
GPG Key ID: DA25A2861AA0F2D1
2 changed files with 6 additions and 0 deletions

View File

@ -204,6 +204,7 @@ For DNSPod, you need to provide your API Token(you can create it [here](https://
}
],
"ip_url": "https://myip.biturl.top",
"ip_type": "IPV4",
"interval": 300,
"socks5_proxy": ""
}

View File

@ -216,6 +216,9 @@ func (handler *Handler) UpdateIP(domainID int64, subDomainID string, subDomainNa
value.Add("record_type", "A")
} else if strings.ToUpper(handler.Configuration.IPType) == godns.IPV6 {
value.Add("record_type", "AAAA")
} else {
log.Println("Error: must specify \"ip_type\" in config for DNSPod.");
return
}
value.Add("record_line", "默认")
@ -238,6 +241,8 @@ func (handler *Handler) UpdateIP(domainID int64, subDomainID string, subDomainNa
if sjson.Get("status").Get("code").MustString() == "1" {
log.Println("New IP updated!")
} else {
log.Println("Failed to update IP record:", sjson.Get("status").Get("message").MustString())
}
}