given an ip address, return which cloud provider it belongs to (AWS, GCE, etc)
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin feat: lookup host ip if none given (#14) Jun 14, 2016
data feat: adds support for Azure cloud (#1) Jun 3, 2016
lib
test feat: lookup host ip if none given (#14) Jun 14, 2016
.gitignore
.travis.yml feat: adds support for AWS/EC2 Jun 3, 2016
CHANGELOG.md chore(release): 1.3.0 Jun 14, 2016
LICENSE.txt feat: adds support for AWS/EC2 Jun 3, 2016
README.md
index.js
package.json

README.md

which-cloud

Build Status Coverage Status Standard Version

given an ip address, return which cloud provider it belongs to (EC2, GCE, etc)

$ which-cloud 104.196.27.39
gce

if no ip is given, which-cloud will use the public ip of the current host

$ which-cloud
AT&T Internet Services (SIS-80)

Installing

CLI

npm i which-cloud -g
which-cloud

Module

npm i which-cloud --save
const whichCloud = require('which-cloud')

API

whichCloud([ip,] callback)

  • ip: string, optional

    Determine the cloud provider for this ip

    If no ip is given, the public ip of the current host will be used

  • callback: function, required

    Called with an Error or the determined cloud provider as a string

Supported Clouds

  • Amazon Web Services (aws).
  • Google Compute Engine (gce).
  • Azure (azure).
  • fallback to whois lookup.

Patches Welcome!

I would love help adding support for more cloud services.

License

ISC