feat: 尝试支持设置阿里云 dns

This commit is contained in:
Mmx233
2022-12-08 18:25:18 +08:00
parent a4e9f35303
commit 8ef9b2fc9e
7 changed files with 278 additions and 8 deletions

View File

@@ -14,12 +14,16 @@ func Run(c *Config) error {
return e
}
if meta.TTL == 0 {
meta.TTL = 600
}
// 配置解析
var dns Provider
switch c.Provider {
case "aliyun":
dns, e = aliyun.New(meta.Other)
dns, e = aliyun.New(meta.TTL, meta.Other, c.Http)
default:
log.Warnf("DDNS 模块 dns 运营商 %s 不支持", c.Provider)
return nil