node package manager

whatismyip

Get your current public IP address fast and easy.

whatismyip

Node.js package to provide the current public IP address from remote IP lookup servers.

var ip = require('whatismyip');
var options = {
  url: 'http://checkip.dyndns.org/',
  truncate: '',
  timeout: 60000,
  matchIndex: 0
};

ip.whatismyip(options, function(err, data){
  if (err === null) {
    console.log(data);
  }
});
$ whatismyip
$ whatismyip -6

or

$ whatismyip --ipv6
$ whatismyip -v

or

$ whatismyip --verbose
$ whatismyip -av

or

$ whatismyip --all --verbose
$ whatismyip --help