Modified promise-free version of public-ip
Queries the DNS records of OpenDNS which has an entry with your IP address.
const publicIp = require('./publicIp')
publicIp('v4', function(ip) {
console.log(ip);
//=> '46.5.21.123'
})
publicIp('v6', function(ip) {
console.log(ip);
//=> 'fe80::200:f8ff:fe21:67cf'
})
Does not handle errors at all -- trusts that OpenDNS will be available and respond correctly (it might not).
Invokes callback with your public IPv4 ip as the first argument.
Invokes callback with your public IPv6 ip as the first argument.
- public-ip - Original of this module, with promises
- internal-ip - Get your internal IP address