risfeng / aliyun-ddns-shell

阿里云域名解析动态更新IP Shell脚本
MIT License
331 stars 102 forks source link

二级域名使用泛域名“*”的话每次都会报错 “获取record_id为空,可能没有获取到有效的解析记录” #9

Open cybasta26 opened 3 years ago

cybasta26 commented 3 years ago

配置里二级域名使用泛域名“*”的话,执行的时候每次都会失败: “获取record_id为空,可能没有获取到有效的解析记录”。 阿里云后台是加了“*”的主机记录的, 用其他的二级域名没有这个问题

risfeng commented 3 years ago

阿里云泛解析是*么?

肖枫 邮箱:risfeng@126.com

签名由 网易邮箱大师 定制

在2020年10月26日 11:22,cybasta26 写道:

配置里二级域名使用泛域名“”的话,执行的时候每次都会失败: “获取record_id为空,可能没有获取到有效的解析记录”。 阿里云后台是加了“”的主机记录的, 用其他的二级域名没有这个问题

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ZqinKing commented 3 years ago

阿里云泛解析是*么? | | 肖枫 邮箱:risfeng@126.com | 签名由 网易邮箱大师 定制 在2020年10月26日 11:22,cybasta26 写道: 配置里二级域名使用泛域名“”的话,执行的时候每次都会失败: “获取record_id为空,可能没有获取到有效的解析记录”。 阿里云后台是加了“”的主机记录的, 用其他的二级域名没有这个问题 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

泛域名不能支持么?

ZqinKing commented 3 years ago

配置里二级域名使用泛域名“”的话,执行的时候每次都会失败: “获取record_id为空,可能没有获取到有效的解析记录”。 阿里云后台是加了“”的主机记录的, 用其他的二级域名没有这个问题

变通办法,设置一个非泛域名的解析,使用脚本进行更新,然后将泛域名使用cname指向提前设置好的域名。

homercharles commented 3 years ago

可以修改代码,在获取的时候,转义,泛解析使用的在bash中是有特殊意义的,这里需要注意修改。 另外,可以修改源代码,定义多个配置文件解决。这样可以写一个循环执行配置文件,在每个配置文件中增加一个单独的二级域名也行。 以上两种方法都行。