Skip to content

Conversation

@crypto75
Copy link

@crypto75 crypto75 commented Apr 9, 2021

在阿里云上添加了home.xxx.com三级域名,并配置了主机记录为@

配置ddns脚本的时候lookup host为: home.xxx.com,domain为: @home.xxx.com,提示400 error。

检查了发出的request是:http://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords&SubDomain=%40.home.xxx.com ... 里面只指定了SubDomain并没有指定Domain。

阿里的文档发现当Domain为空的时候,home会被作为主机名,而不是@。手动修改脚本添加了Domain以后,成功更新。

@Tsuk1ko
Copy link

Tsuk1ko commented Feb 25, 2022

我也发现了这个问题,但不应该修改公共参数,其他 API 是有做处理的,唯独 DescribeSubDomainRecords 漏了

只需要修改第 200 行即可

- aliyun_transfer "Action=DescribeSubDomainRecords" "SubDomain=${__HOST}.${__DOMAIN}" || write_log 14 "服务器通信失败"
+ aliyun_transfer "Action=DescribeSubDomainRecords" "SubDomain=${__HOST}.${__DOMAIN}" "DomainName=${__DOMAIN}" || write_log 14 "服务器通信失败"

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.

2 participants