Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Dynadot. #1050

Merged
merged 3 commits into from Mar 22, 2024
Merged

Add support for Dynadot. #1050

merged 3 commits into from Mar 22, 2024

Conversation

YangerStars
Copy link
Contributor

What does this PR do?

增加对Dynadot域名的DDNS支持

Motivation

我们是Dynadot的开发团队,Dynadot是一家国外域名注册商,目前我们大约管理480w域名并且还在持续增长。近期我们需要一个DDNS的客户端并且能支持跨平台,DDNS-GO是一个非常好的选择,所以我们希望使用DDNS-GO作为我们目前的官方推荐客户端

Additional Notes

我在代码中拓展了Dynadot的配置选项,并对封装好的功能做了一些测试工作,包括(域名设置、中英文日志、错误状态日志打印),目前该功能在Dynadot还在我们的灰度测试中,但是测试工作已经基本完成,并且会在合并后发行新版的安装包后将该功能上线。

@jeessy2
Copy link
Owner

jeessy2 commented Mar 22, 2024

有没有成功后的截图

@YangerStars
Copy link
Contributor Author

image image

dns/dynadot.go Outdated
Comment on lines 132 to 138
if result.ErrorCode != -1 {
util.Log("更新域名解析 %s 成功! IP: %s", domain, ipAddr)
domain.UpdateStatus = config.UpdatedSuccess
} else {
util.Log("新增域名解析 %s 失败! 异常信息: %s", domain, strings.Join(result.Content, ","))
domain.UpdateStatus = config.UpdatedFailed
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前一种条件打印为更新,后面又是打印为新增?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不好意思,这里是我的检查不到位,都使用更新就好

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个接口能新增,也能更新?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,新增和更新是一起的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我更正了失败时的日志提示

@jeessy2 jeessy2 merged commit 77caa37 into jeessy2:master Mar 22, 2024
2 checks passed
Copy link
Owner

@jeessy2 jeessy2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要改下

Comment on lines +120 to +121
var result DynadotResp
err := dynadot.request(params, &result)
Copy link
Owner

@jeessy2 jeessy2 Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

每次都要请求接口,所以IP没有变动也会请求接口,会导致收到webhook通知过多

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参考godaddy.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好,我这两天改一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants