1.3.0 • Published 9 years ago
which-cloud v1.3.0
which-cloud
given an ip address, return which cloud provider it belongs to (EC2, GCE, etc)
$ which-cloud 104.196.27.39
gceif 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 -gwhich-cloudModule
npm i which-cloud --saveconst whichCloud = require('which-cloud')API
whichCloud([ip,] callback)
ip: string, optionalDetermine the cloud provider for this ip
If no ip is given, the public ip of the current host will be used
callback: function, requiredCalled with an
Erroror 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