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:
commit
e5f9076259
@ -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_url": "https://myip.biturl.top",
|
||||||
|
"ip_type": "IPV4",
|
||||||
"interval": 300,
|
"interval": 300,
|
||||||
"socks5_proxy": ""
|
"socks5_proxy": ""
|
||||||
}
|
}
|
||||||
|
@ -216,6 +216,9 @@ func (handler *Handler) UpdateIP(domainID int64, subDomainID string, subDomainNa
|
|||||||
value.Add("record_type", "A")
|
value.Add("record_type", "A")
|
||||||
} else if strings.ToUpper(handler.Configuration.IPType) == godns.IPV6 {
|
} else if strings.ToUpper(handler.Configuration.IPType) == godns.IPV6 {
|
||||||
value.Add("record_type", "AAAA")
|
value.Add("record_type", "AAAA")
|
||||||
|
} else {
|
||||||
|
log.Println("Error: must specify \"ip_type\" in config for DNSPod.");
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
value.Add("record_line", "默认")
|
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" {
|
if sjson.Get("status").Get("code").MustString() == "1" {
|
||||||
log.Println("New IP updated!")
|
log.Println("New IP updated!")
|
||||||
|
} else {
|
||||||
|
log.Println("Failed to update IP record:", sjson.Get("status").Get("message").MustString())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user