update ddns-aliyun

This commit is contained in:
Stille
2022-01-17 15:28:35 +08:00
parent 1e2b35c633
commit c7b563e54c
16 changed files with 190 additions and 58 deletions

View File

@@ -16,6 +16,15 @@ var funcs = map[string]interface{}{
"reslove": cip.ResloveIPv4,
}
func contains(slice []string, item string) bool {
set := make(map[string]struct{}, len(slice))
for _, s := range slice {
set[s] = struct{}{}
}
_, ok := set[item]
return ok
}
func ip2locCN(ip string) (str string) {
if strings.Count(ip, `.`) < 3 {
return