@masx200/no-ip-ddns-ipv6
Version:
Noip.com Dynamic DNS update client built in Node.js ,support ipv6
16 lines (14 loc) • 458 B
JavaScript
import { publicIpv6, IpNotFoundError } from "public-ip";
async function getipv6address() {
return new Promise((s, j) => {
publicIpv6().then(s).catch(j);
setTimeout(() => {
j(
Object.assign(new IpNotFoundError("TIMEOUT_ERR"), {
cause: new DOMException("TIMEOUT_ERR", "TIMEOUT_ERR"),
})
);
}, 5000);
});
}
export { getipv6address as getipv6address };