ddnspod
ddnspod is a ddns updating tool of DNSPod.cn or DNSPod.com. It was originally designed for use with node.js.
How to get token
First of all, you should get the login token.
Dnspod.cn : https://support.dnspod.cn/Kb/showarticle/tsid/227
Dnspod.com : https://www.dnspod.com/docs/info.html#get-the-user-token
Install
You can install using Node Package Manager (npm):
npm install ddnspod -g
Usage
BIN Example
Run ddnspod as a command line tool. It will update your dns record after you execute the following.
ddnspod --server 'dnspod.cn' --token 'xxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' --domainName 'your-domain.com' --subDomain 'test' [--localIp true] [--ip '127.0.0.1'] [--ttl 600]
You can add it to crontab for continuously updating.
API Example
// Requirevar ddnspod = ; // Update the DNS.var { ;}; // Start Update; // Loop(5s)
You can use PM2 for continuously updating.