DNSPod的DNS修改API封装
使用前准备
- 安装Nodejs 8.0+
- 去Web控制台添加域名到DNSPod
- 申请必需的TOKEN和ID
使用方法
var dnspod =ID: "xxx"TOKEN: "xxx";# 自动更新公网IP到指定域名# 如果公网IP和域名记录一致,则不会发送更新请求,防止触发DNSPod警告dnspod
自动后台轮询示例
asyncvar dnspod =IDTOKEN;whiletruevar status = false;while !statustryawait dnspod;status = true;catchelog4js;console;await DNSPod;console;await DNSPod;;