Get your public IP address - very fast!
Queries the DNS records of OpenDNS which has an entry with your IP address.
$ npm install --global public-ip
$ public-ip --help
Example
$ public-ip
46.5.21.123
$ time public-ip
46.5.21.123
real 0.08s
user 0.05s
sys 0.02s
$ npm install --save public-ip
var publicIp = require('public-ip');
publicIp(function (err, ip) {
console.log(ip);
//=> 46.5.21.123
});
See internal-ip to get your internal IP address.
MIT © Sindre Sorhus