dynu-dns
v1.0.3
Published
Update IP of your DNS (dynu.com)
Downloads
4
Readme
Dynu-DNS
Updates IP of your dynamic DNS (dynu.com)
Installation
npm i dynu-dns
Usage
Example updating the IPV4 of the domain domain.com
.
let dns = new DynuDNS("username", "password");
dns.updateIPOfDomain("domain.com", "145.126.1.0")
.then((res: ResponseEnum) => {
console.log("success!")
})
.catch((err: ResponseEnum) => {
console.log("error...")
});
API
Class DynuDNS
constructor(username, password)
- username - (string) Username of the dynu account.
- password - (string) Password of the dynu account. For security reason, you can pass the md5 of your password.
updateIPOfDomain(domain, ipv4): Promise
- domain - (string) Domain you want to update (without http://).
- ipv4 - (string) IPV4 you want to set. If
10.0.0.0
, it will be replaced by the origin request IPV4.
ResponseEnum
See ResponseEnum.ts
for more details.