x正在同步, 请稍候查看

ipcat-ruby

 收藏    我在用   0 人在用
 -  null

Ruby port of client9/ipcat

 GitHub     下载

101    116    14    over 1 year前

ipcat-ruby

A ruby port of the ipcat library to classify IP addresses from known datacenters

Build Status
Code Climate

Installation

With bundler:

# In Gemfile
gem 'ipcat'

Or with rubygems:

gem install ipcat

Usage

IPCat.datacenter?(ip_address)

It will return an IPCat::IPRange if ip_address is from a known datacenter; nil otherwise.

For example,

range = IPCat.datacenter?('52.95.252.0') # => instance of IPCat::IPRange
range.name # => 'Amazon AWS'

IPCat.datacenter?('127.0.0.1') # => nil

License

Copyright (c) 2013 Kickstarter, Inc

Released under an MIT License

 
No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up