ipip-fast 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/README.md +46 -0
 - data/lib/ipdb/city.rb +19 -0
 - data/lib/ipdb/ipipfree.ipdb +0 -0
 - data/lib/ipdb/reader.rb +84 -0
 - data/lib/ipdb/readme.txt +414 -0
 - data/lib/ipip-fast.rb +10 -0
 - data/lib/ipip/fast/version.rb +7 -0
 - metadata +66 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: ac95abb83eb3f4b39a1eb100fe435b624a43362d946aa66f1390a0942862a5d5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8690406fd9b91d1a37ac12de7c02c8f85f38c9c319650a7e6a021df2c5d9c888
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0ba26e646630d05653eaf54b72b8c0bc08b238016fc9b5316aea304fdf6b3390c4f9c63f4d99bbb730db589ada889d311f8353768b85e4518f0fa1e0c4a0365a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 45b9cfe31ca5e3db7607c9e7e398878d0e4ec84396125cfe208a2194fdcc59c794d72954ef1509a898139754d71232845363a7e1a14f50bf37dd766b88a5e0a5
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,46 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # IPIP fast !
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Same function as [ipip-ipdb](https://github.com/ipipdotnet/ipdb-ruby), only faster and easier.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Warning: in order to easier usage, if no ipdb file provide, will automatically using ipipfree version, according to the ipip.net request, do not use in commercial. [禁止用于商业用途](https://www.ipip.net/product/ip.html)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem 'ipip-fast'
         
     | 
| 
      
 13 
     | 
    
         
            +
            ```
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                $ bundle install
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            Or install it yourself as:
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                $ gem install ipip-fast
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 26 
     | 
    
         
            +
            require "ipdb-fast"
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            # db = IPDB.city "/Users/[user_name]/Downloads/ipipfreedb/ipipfree.ipdb"
         
     | 
| 
      
 29 
     | 
    
         
            +
            db = IPDB.city
         
     | 
| 
      
 30 
     | 
    
         
            +
            loc = db.find "1.1.1.1", "CN"
         
     | 
| 
      
 31 
     | 
    
         
            +
            puts loc
         
     | 
| 
      
 32 
     | 
    
         
            +
            ```
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            ## Development
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            Bug reports and pull requests are welcome on GitHub at https://github.com/Eric-Guo/ipip-fast.
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            ## License
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
         
     | 
    
        data/lib/ipdb/city.rb
    ADDED
    
    | 
         @@ -0,0 +1,19 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require_relative 'reader'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            module IPDB
         
     | 
| 
      
 6 
     | 
    
         
            +
              class City
         
     | 
| 
      
 7 
     | 
    
         
            +
                def initialize(name)
         
     | 
| 
      
 8 
     | 
    
         
            +
                  @db = Reader.new name
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                def find(ipx, lang)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @db.find ipx, lang
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                def meta
         
     | 
| 
      
 16 
     | 
    
         
            +
                  @db.meta
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
| 
         Binary file 
     | 
    
        data/lib/ipdb/reader.rb
    ADDED
    
    | 
         @@ -0,0 +1,84 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'ipaddr'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "json"
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module IPDB
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Reader
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_reader :meta
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(name)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  if name.nil?
         
     | 
| 
      
 10 
     | 
    
         
            +
                    name = "#{__dir__}/ipipfree.ipdb"
         
     | 
| 
      
 11 
     | 
    
         
            +
                  elsif !File.exists?(name)
         
     | 
| 
      
 12 
     | 
    
         
            +
                    raise "You must specify 'database => ...' in your ipip filter (I looked for '#{name}')"
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  if !File.readable? name
         
     | 
| 
      
 16 
     | 
    
         
            +
                    raise "ip database is not readable."
         
     | 
| 
      
 17 
     | 
    
         
            +
                  end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                  @data = File.read name, encoding: 'ASCII-8BIT'
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  meta_len = @data[0 ... 4].unpack('N')[0]
         
     | 
| 
      
 22 
     | 
    
         
            +
                  meta_buf = @data[4 ... 4+meta_len]
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                  @meta = JSON.parse(meta_buf)
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  if @data.length != (4 + meta_len + @meta['total_size'])
         
     | 
| 
      
 27 
     | 
    
         
            +
                    raise "ip database file size error."
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                  @node_count = @meta['node_count']
         
     | 
| 
      
 31 
     | 
    
         
            +
                  @cache = {}
         
     | 
| 
      
 32 
     | 
    
         
            +
                  @body = @data[4+meta_len ... @data.length]
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                def read_node(node, idx)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  off = node * 8 + idx * 4
         
     | 
| 
      
 37 
     | 
    
         
            +
                  @body[off..off+3].unpack('N')[0]
         
     | 
| 
      
 38 
     | 
    
         
            +
                end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                def find(ipx, lang)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 42 
     | 
    
         
            +
                    ipv = IPAddr.new ipx
         
     | 
| 
      
 43 
     | 
    
         
            +
                  rescue => e
         
     | 
| 
      
 44 
     | 
    
         
            +
                    return e.message
         
     | 
| 
      
 45 
     | 
    
         
            +
                  end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                  addr = ipv.hton
         
     | 
| 
      
 48 
     | 
    
         
            +
                  node = ipv.ipv4? ? 96 : 0
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                  idx = 0
         
     | 
| 
      
 51 
     | 
    
         
            +
                  key = addr[0...16]
         
     | 
| 
      
 52 
     | 
    
         
            +
                  val = @cache[key]
         
     | 
| 
      
 53 
     | 
    
         
            +
                  if !val.nil?
         
     | 
| 
      
 54 
     | 
    
         
            +
                    node = val
         
     | 
| 
      
 55 
     | 
    
         
            +
                    idx = 16
         
     | 
| 
      
 56 
     | 
    
         
            +
                  end
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                  if node < @node_count
         
     | 
| 
      
 59 
     | 
    
         
            +
                    while idx < 128 do
         
     | 
| 
      
 60 
     | 
    
         
            +
                      bin = addr[idx >> 3].unpack("C")[0]
         
     | 
| 
      
 61 
     | 
    
         
            +
                      flag = (1 & (bin >> 7 - (idx % 8)))
         
     | 
| 
      
 62 
     | 
    
         
            +
                      node = self.read_node(node, flag)
         
     | 
| 
      
 63 
     | 
    
         
            +
                      idx += 1
         
     | 
| 
      
 64 
     | 
    
         
            +
                      if idx == 16
         
     | 
| 
      
 65 
     | 
    
         
            +
                        @cache[key] = node
         
     | 
| 
      
 66 
     | 
    
         
            +
                      end
         
     | 
| 
      
 67 
     | 
    
         
            +
                      if node > @node_count
         
     | 
| 
      
 68 
     | 
    
         
            +
                        break
         
     | 
| 
      
 69 
     | 
    
         
            +
                      end
         
     | 
| 
      
 70 
     | 
    
         
            +
                    end
         
     | 
| 
      
 71 
     | 
    
         
            +
                  end
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
                  resolved = node - @node_count + @node_count * 8
         
     | 
| 
      
 74 
     | 
    
         
            +
                  size = @body[resolved..resolved+1].unpack('n')[0]
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                  temp = @body[resolved+2..resolved+1+size]
         
     | 
| 
      
 77 
     | 
    
         
            +
                  loc = temp.encode("UTF-8", "UTF-8").split("\t", @meta['fields'].length * @meta['languages'].length)
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                  off = @meta['languages'][lang]
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                  loc[off ... @meta['fields'].length+off]
         
     | 
| 
      
 82 
     | 
    
         
            +
                end
         
     | 
| 
      
 83 
     | 
    
         
            +
              end
         
     | 
| 
      
 84 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/ipdb/readme.txt
    ADDED
    
    | 
         @@ -0,0 +1,414 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            全球 IPv4 地址归属地数据库(IPIP.NET 版)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            --- 2019 年 7 月引言 ---
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            这是 IP 库的第二十三个公开版本。
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            根据上次的说明,本次更新只会提供 IPDB 两个格式数据库。
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            IDPB 解析代码地址:https://www.ipip.net/support/code.html
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            另外我写了《IPIP.NET 2019Q2 进展报告》,有兴趣的可以来看看:https://mp.weixin.qq.com/s/k3ahovrF2eU95uqmRddbSA
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            欢迎大家反馈。
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            --
         
     | 
| 
      
 16 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 17 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 18 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 19 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            --- 2019 年 1 月引言 ---
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            这是 IP 库的第二十二个公开版本。
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            我们在去年六月份开始着手制作 IPv6 数据,八月份推出了 IPv6 产品第一版,因为之前的 DAT/DATX 均只考虑了 IPv4 数据格式,所以同时新增了一个数据格式叫 IPDB。
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            本次更新会继续提供 DATX 和 IPDB 两个格式,但是不出意外的话,下一次更新将只提供 IPDB 格式。我们也会尽快推动所有客户尽快切换到 IPDB 格式上。
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            IDPB 解析代码地址:https://www.ipip.net/support/code.html
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            另外我写了《IPIP.NET 2018 年总结与 2019 年计划》,有兴趣的可以来看看:https://mp.weixin.qq.com/s/QcLDyV8KXNrDXKiKyQW9aw
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            欢迎大家反馈。
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            --
         
     | 
| 
      
 36 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 37 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 38 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 39 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            --- 2018 年 7 月引言 ---
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            这是 IP 库的第二十一个公开版本。
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            根据三月份的决定,本次开始将只提供 DATX 格式的数据。
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            另外,目前正在制作 IPv6 的数据,由于目前的数据格式只考虑了 IPv4 的情况,所以有可能未来还会变更,提前说明一下。
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            DATX 解析代码仓库地址:https://github.com/ipipnet/datx
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            欢迎大家反馈。
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            --
         
     | 
| 
      
 54 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 55 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 56 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 57 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            --- 2018 年 3 月引言 ---
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            这是 IP 库的第二十个公开版本。
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            考虑到目前的数据条目数量以及客户升级和格式统一的便利性,我们将在未来的格式支持中不再支持 DAT 格式,为方便大家过渡,本次更新提供 DAT 和 DATX 两个格式的数据,七月份的版本中将不再提供 DAT 格式的数据。并且对数据进行紧凑化,进一步缩小文件的大小,提高查询性能。
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            DATX 解析代码仓库地址:https://github.com/ipipnet/datx
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            欢迎大家反馈。
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            --
         
     | 
| 
      
 70 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 71 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 72 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 73 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            --- 2018 年 1 月引言 ---
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
            这是 IP 库的第十九个公开版本。
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
            再次半年不见,目前的数据条目数已经超过 2500000 条啦。主要来自于美国数据的更加深入推进。:-)
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
            期望在今年第一季度可以把美国数据做到一个可以对海外客户进行销售的级别,同时继续招人,欢迎有兴趣者联系我!
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
            --
         
     | 
| 
      
 84 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 85 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 86 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 87 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
            --- 2017 年 7 月引言 ---
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
            这是 IP 库的第十八个公开版本。
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
            半年不见,目前的数据条目数已经超过 1000000 条啦。主要来自于美国数据的深入推进。
         
     | 
| 
      
 94 
     | 
    
         
            +
             
     | 
| 
      
 95 
     | 
    
         
            +
            最近精力在美国数据上,继续招人,欢迎有兴趣者联系我!
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            --
         
     | 
| 
      
 98 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 99 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 100 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 101 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
            --- 2017 年 1 月引言 ---
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
            这是 IP 库的第十七个公开版本。
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
            因为更新周期改为半年,所以我们考虑将更新时间改为每年的一月份和七月份,比较合适。:-D
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            刚一月不见,目前的数据条目数已经超过 466300 条啦。
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
            最近精力在美国数据上,继续招人,欢迎有兴趣者联系我!
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
            --
         
     | 
| 
      
 114 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 115 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 116 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 117 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
            --- 2016 年 12 月引言 ---
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
      
 121 
     | 
    
         
            +
            这是 IP 库的第十六个公开版本。
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
            再次半年不见,目前的数据条目数接近 440000 条了。
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
            最近精力在美国数据上,继续招人,欢迎有兴趣者联系我!
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
            --
         
     | 
| 
      
 128 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 129 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 130 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 131 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            --- 2016 年 6 月引言 ---
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            这是 IP 库的第十五个公开版本。
         
     | 
| 
      
 136 
     | 
    
         
            +
             
     | 
| 
      
 137 
     | 
    
         
            +
            半年不见,目前的数据条目数超过 320000 条了。
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
            基于目前的客户购买情况,我们会在 7 月 1 日开始执行新价格方案。6 月份购买的不受影响,请潜在客户尽快考虑。
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
            --
         
     | 
| 
      
 142 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 143 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 144 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 145 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            --- 2015 年 12 月引言 ---
         
     | 
| 
      
 148 
     | 
    
         
            +
             
     | 
| 
      
 149 
     | 
    
         
            +
            这是 IP 库的第十四个公开版本。
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
            目前的数据条目数超过 220000 条了。
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
            我们一直在发布 DISCUZ 和 ECSHOP 的专用版本,但是不知道是用户变少还是用户不关心还是如何,这两年几乎无人咨询相关版本的事情,所以我们从 2016 年起,不再发布针对 DISCUZ 和 ECSHOP 的免费版。
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
            这次的免费版也有一些小变化,不过对于不关心的用户来说,没有变化。;-)
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
            --
         
     | 
| 
      
 158 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 159 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 160 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 161 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
            --- 2015 年 10 月引言 ---
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
            这是 IP 库的第十三个公开版本。
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
      
 167 
     | 
    
         
            +
            目前的数据条目数超过 200000 条了。
         
     | 
| 
      
 168 
     | 
    
         
            +
             
     | 
| 
      
 169 
     | 
    
         
            +
            这个月底,我们这个事情,就已经两岁啦。
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
            --
         
     | 
| 
      
 172 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 173 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 174 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 175 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
            --- 2015 年 8 月引言 ---
         
     | 
| 
      
 178 
     | 
    
         
            +
             
     | 
| 
      
 179 
     | 
    
         
            +
            这是 IP 库的第十二个公开版本。
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
      
 181 
     | 
    
         
            +
            目前的数据条目数接近 180000 条了,我们基本上能做到两个月新增一万条左右,注意是新增,不包括修改。
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
            认可我们的数据质量的用户和客户越来越多,在一个 2015 TOP100 互联网公司名单里,我们在里面找到了有将近 20 家客户了。
         
     | 
| 
      
 184 
     | 
    
         
            +
             
     | 
| 
      
 185 
     | 
    
         
            +
            我们和合作伙伴一起合作的的区县级 IP 数据库也赶在七月底上线了,有兴趣的请联系我们。
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
            --
         
     | 
| 
      
 188 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 189 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 190 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 191 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
            --- 2015 年 6 月引言 ---
         
     | 
| 
      
 194 
     | 
    
         
            +
             
     | 
| 
      
 195 
     | 
    
         
            +
            这是 IP 库的第十一个公开版本。
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
            目前的数据条目数超过了 170000 条了。希望下一个万条可以更快的达成。
         
     | 
| 
      
 198 
     | 
    
         
            +
             
     | 
| 
      
 199 
     | 
    
         
            +
            正在做些互联网基础设施相关的新事情,等有一定结果的时候,再来汇报吧。
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
      
 201 
     | 
    
         
            +
            寻求 Golang 语言开发人员,具体请看链接:http://www.lagou.com/jobs/649340.html
         
     | 
| 
      
 202 
     | 
    
         
            +
             
     | 
| 
      
 203 
     | 
    
         
            +
            --
         
     | 
| 
      
 204 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 205 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 206 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 207 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 208 
     | 
    
         
            +
             
     | 
| 
      
 209 
     | 
    
         
            +
            --- 2015 年 4 月引言 ---
         
     | 
| 
      
 210 
     | 
    
         
            +
             
     | 
| 
      
 211 
     | 
    
         
            +
            这是 IP 库的第十个公开版本。
         
     | 
| 
      
 212 
     | 
    
         
            +
             
     | 
| 
      
 213 
     | 
    
         
            +
            三月份发布了 CDN 版本,针对节点调度需求做了一定的优化,也有了基本的英文版了。
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
            目前的数据条目数超过了 160000 条了,算是个小里程碑,也有了新的专职编辑正在学习中,希望更好的维护这个数据库。
         
     | 
| 
      
 216 
     | 
    
         
            +
             
     | 
| 
      
 217 
     | 
    
         
            +
            如果有人对基于全球 IP 分布以及连通性方面的数据挖掘以及相关的企业级服务有兴趣,请联系我,我们正在找专职的人员。
         
     | 
| 
      
 218 
     | 
    
         
            +
             
     | 
| 
      
 219 
     | 
    
         
            +
            --
         
     | 
| 
      
 220 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 221 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 222 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 223 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
            --- 2015 年 2 月引言 ---
         
     | 
| 
      
 226 
     | 
    
         
            +
             
     | 
| 
      
 227 
     | 
    
         
            +
            这是 IP 库的第九个公开版本。
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
            我们已经更换了新的官网:http://www.ipip.net/
         
     | 
| 
      
 230 
     | 
    
         
            +
             
     | 
| 
      
 231 
     | 
    
         
            +
            这个月也会尽力发布 CDN 的专属版本以及英文版本。
         
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
            基站数据库也会看时间发布正式版。
         
     | 
| 
      
 234 
     | 
    
         
            +
             
     | 
| 
      
 235 
     | 
    
         
            +
            --
         
     | 
| 
      
 236 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 237 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 238 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 239 
     | 
    
         
            +
            http://www.ipip.net/
         
     | 
| 
      
 240 
     | 
    
         
            +
             
     | 
| 
      
 241 
     | 
    
         
            +
            --- 2014 年 12 月引言 ---
         
     | 
| 
      
 242 
     | 
    
         
            +
             
     | 
| 
      
 243 
     | 
    
         
            +
            这是 IP 库的第八个公开版本。
         
     | 
| 
      
 244 
     | 
    
         
            +
             
     | 
| 
      
 245 
     | 
    
         
            +
            11 月份算是 IP 库进展最大的一个月了,我们对数据进行了全面的扫描,并且在微博上发了一篇长文章后,带来了不少付费客户,远超乎我的预期,也让我对这个事情有了新的想法。
         
     | 
| 
      
 246 
     | 
    
         
            +
             
     | 
| 
      
 247 
     | 
    
         
            +
            文章地址是: http://www.evernote.com/l/AAHsqnNK9T9LkqZb9LW-fLjzkx0B4Dj90lY/ ,希望您也看看。
         
     | 
| 
      
 248 
     | 
    
         
            +
             
     | 
| 
      
 249 
     | 
    
         
            +
            我们也针对高级付费客户开发了 DATX 格式版本,同时集成经纬度、时区信息,在读取速度上,同等环境下是 8000QPS 对 48000QPS 的区别。
         
     | 
| 
      
 250 
     | 
    
         
            +
             
     | 
| 
      
 251 
     | 
    
         
            +
            我们同时也发布了官方支持的 JAVA 版读取代码。
         
     | 
| 
      
 252 
     | 
    
         
            +
             
     | 
| 
      
 253 
     | 
    
         
            +
            这个月会把网站重新改版,更换域名,发布英文版网站和数据。
         
     | 
| 
      
 254 
     | 
    
         
            +
             
     | 
| 
      
 255 
     | 
    
         
            +
            下个月就是 2015 年,明年我们在努力提高数据准确度的情况下,会提高付费客户的价格,为什么提价,我会写文章来解释的,如果您需要,请在本月购买,我们承诺老客户老价格。
         
     | 
| 
      
 256 
     | 
    
         
            +
             
     | 
| 
      
 257 
     | 
    
         
            +
            我们也会针对 CDN、DNS、VPN 厂商的需求,专门发布对应的版本。
         
     | 
| 
      
 258 
     | 
    
         
            +
             
     | 
| 
      
 259 
     | 
    
         
            +
            另外免费版的发布情况也可能会做调整,不作任何保证。
         
     | 
| 
      
 260 
     | 
    
         
            +
             
     | 
| 
      
 261 
     | 
    
         
            +
            --
         
     | 
| 
      
 262 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 263 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 264 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 265 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 266 
     | 
    
         
            +
             
     | 
| 
      
 267 
     | 
    
         
            +
            --- 2014 年 10 月引言 ---
         
     | 
| 
      
 268 
     | 
    
         
            +
             
     | 
| 
      
 269 
     | 
    
         
            +
            这是 IP 库的第七个公开版本。
         
     | 
| 
      
 270 
     | 
    
         
            +
             
     | 
| 
      
 271 
     | 
    
         
            +
            最近几个月在以新的方式在对 IP 数据进行标注,可以更加保证数据的正确性,目前完成度 80%,数据量接近十四万行,预计在 10 月底可以初步完成。
         
     | 
| 
      
 272 
     | 
    
         
            +
             
     | 
| 
      
 273 
     | 
    
         
            +
            使用官方 PHP 代码的朋友,请更新一下代码,之前犯了一个变量赋值的错误,导致缓存一直不会被命中。感谢 QQ 群里那位名字写得很乱的朋友发现的问题。做事认真严谨很重要。
         
     | 
| 
      
 274 
     | 
    
         
            +
             
     | 
| 
      
 275 
     | 
    
         
            +
            另外预告一下,明年初,我们会对付费版的价格进行调整,价格只高不低,当然之前购买的用户不会受影响。
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
            解释一下,我们毕竟在这个事情上投入了大量的精力,而且按照价格和准确度的情况来看,不说最好的,也是极好的了,再加上国内用户购买意愿低,我们只能考虑先提价的方式,毕竟对于任何一家对 IP 库有更高需求的业务,一个月付 200、300 元能够得到数据库并能保证及时更新的话,远比自己雇一个人去更新维护的成本低很多很多,何况 IP 库这件事水也很深,雇来的人的能力就能比我们做强吗?
         
     | 
| 
      
 278 
     | 
    
         
            +
             
     | 
| 
      
 279 
     | 
    
         
            +
            如果未来可以有足够付费用户的时候,我们也会考虑调低价格的。也请大家多理解多支持吧。
         
     | 
| 
      
 280 
     | 
    
         
            +
             
     | 
| 
      
 281 
     | 
    
         
            +
            我们也在做国家、城市经纬度和相关时区的数据,有需要的可以试试。
         
     | 
| 
      
 282 
     | 
    
         
            +
             
     | 
| 
      
 283 
     | 
    
         
            +
            年底之前也争取把域名换掉,也省得很多人问我 17MON 代表啥意思。:-)
         
     | 
| 
      
 284 
     | 
    
         
            +
             
     | 
| 
      
 285 
     | 
    
         
            +
            再求专职维护人员,有兴趣可以找我聊。
         
     | 
| 
      
 286 
     | 
    
         
            +
             
     | 
| 
      
 287 
     | 
    
         
            +
            --
         
     | 
| 
      
 288 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 289 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 290 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 291 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 292 
     | 
    
         
            +
             
     | 
| 
      
 293 
     | 
    
         
            +
            --- 2014 年 8 月引言 ---
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
            这是 IP 库的第六个公开版本。
         
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
            这个月参加了 ThinkInLAMP 2014 PHP 技术峰会,做了一次有关 IP 数据库的演讲,也算是对将近一年多时间的投入的一个总结。大家有兴趣的,可以看看我的 ppt。
         
     | 
| 
      
 298 
     | 
    
         
            +
             
     | 
| 
      
 299 
     | 
    
         
            +
            实在是精力有限,为承诺计,从这个月开始,将每两个月发布免费版了。如果您需要更好的服务,请购买付费版。
         
     | 
| 
      
 300 
     | 
    
         
            +
             
     | 
| 
      
 301 
     | 
    
         
            +
            --
         
     | 
| 
      
 302 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 303 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 304 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 305 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 306 
     | 
    
         
            +
             
     | 
| 
      
 307 
     | 
    
         
            +
            --- 2014 年 7 月引言 ---
         
     | 
| 
      
 308 
     | 
    
         
            +
             
     | 
| 
      
 309 
     | 
    
         
            +
            这是 IP 库的第五个公开版本。
         
     | 
| 
      
 310 
     | 
    
         
            +
             
     | 
| 
      
 311 
     | 
    
         
            +
            这个月公司和家里事情比较多,更新的慢了一点,还请大家谅解。
         
     | 
| 
      
 312 
     | 
    
         
            +
             
     | 
| 
      
 313 
     | 
    
         
            +
            --
         
     | 
| 
      
 314 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 315 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 316 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 317 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 318 
     | 
    
         
            +
             
     | 
| 
      
 319 
     | 
    
         
            +
            --- 2014 年 6 月引言 ---
         
     | 
| 
      
 320 
     | 
    
         
            +
             
     | 
| 
      
 321 
     | 
    
         
            +
            这是 IP 库的第四个公开版本。
         
     | 
| 
      
 322 
     | 
    
         
            +
             
     | 
| 
      
 323 
     | 
    
         
            +
            祝大家六一、端午快乐,这次我们增加了一个字段,原来是把城市和单位放在了一起,这样比如在有学校名称的时候,就没法知道所在具体城市了。
         
     | 
| 
      
 324 
     | 
    
         
            +
             
     | 
| 
      
 325 
     | 
    
         
            +
            这种情况被客户们投诉了。这次趁着三天假的机会,下决心将其分开,这回大家都满意了吧?:-)
         
     | 
| 
      
 326 
     | 
    
         
            +
             
     | 
| 
      
 327 
     | 
    
         
            +
            因为增加了字段,所以对于字段有明确要求的,请仔细核查数据和相关代码,如果有问题,请到 QQ 群: 346280296 中反馈。
         
     | 
| 
      
 328 
     | 
    
         
            +
             
     | 
| 
      
 329 
     | 
    
         
            +
            --
         
     | 
| 
      
 330 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 331 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 332 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 333 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 334 
     | 
    
         
            +
             
     | 
| 
      
 335 
     | 
    
         
            +
            --- 2014 年 5 月引言 ---
         
     | 
| 
      
 336 
     | 
    
         
            +
             
     | 
| 
      
 337 
     | 
    
         
            +
            这是 IP 库的第三个公开版本。
         
     | 
| 
      
 338 
     | 
    
         
            +
             
     | 
| 
      
 339 
     | 
    
         
            +
            祝大家五一快乐,假期之后的一周后,付费计划将上线。另外 WINDOWS 版的客户端也会同期上线。
         
     | 
| 
      
 340 
     | 
    
         
            +
             
     | 
| 
      
 341 
     | 
    
         
            +
            已经有公司与我联系了购买了付费服务,我很欣慰,呵呵。
         
     | 
| 
      
 342 
     | 
    
         
            +
             
     | 
| 
      
 343 
     | 
    
         
            +
            --
         
     | 
| 
      
 344 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 345 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 346 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 347 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 348 
     | 
    
         
            +
             
     | 
| 
      
 349 
     | 
    
         
            +
            --- 2014 年 4 月引言 ---
         
     | 
| 
      
 350 
     | 
    
         
            +
             
     | 
| 
      
 351 
     | 
    
         
            +
            这是 IP 库的第二个公开版本。
         
     | 
| 
      
 352 
     | 
    
         
            +
             
     | 
| 
      
 353 
     | 
    
         
            +
            这个版本放开了国内市一级的数据,和网站版的数据相比,只有运营商的数据和国外到市一级的数据没有放开,我想对于一般的应用来说足够用了。
         
     | 
| 
      
 354 
     | 
    
         
            +
             
     | 
| 
      
 355 
     | 
    
         
            +
            这个月,更大的收获是,校准 IP 库的方法,进一步的成型,可以更少的工作、更高的正确率,对于做付费计划,我更有信心了。
         
     | 
| 
      
 356 
     | 
    
         
            +
             
     | 
| 
      
 357 
     | 
    
         
            +
            付费计划应该在本月底之前上线。希望对于数据的数据和更新频度以及支持有要求的,请一定给予支持。不然这个事情没有办法长期执行下去。
         
     | 
| 
      
 358 
     | 
    
         
            +
             
     | 
| 
      
 359 
     | 
    
         
            +
            如果您的软件或者应用里需要内置 IP 库,可以找我来谈更紧密的合作和更新方式。
         
     | 
| 
      
 360 
     | 
    
         
            +
             
     | 
| 
      
 361 
     | 
    
         
            +
            如果您有任何问题,请到 QQ 群来说。
         
     | 
| 
      
 362 
     | 
    
         
            +
             
     | 
| 
      
 363 
     | 
    
         
            +
            不多说,睡觉去了。。。
         
     | 
| 
      
 364 
     | 
    
         
            +
             
     | 
| 
      
 365 
     | 
    
         
            +
            --
         
     | 
| 
      
 366 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 367 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 368 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 369 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
| 
      
 370 
     | 
    
         
            +
             
     | 
| 
      
 371 
     | 
    
         
            +
            --- 2014 年 3 月引言 ---
         
     | 
| 
      
 372 
     | 
    
         
            +
             
     | 
| 
      
 373 
     | 
    
         
            +
            经过半年多的不断努力,终于可以发布一个公开的版本了。
         
     | 
| 
      
 374 
     | 
    
         
            +
             
     | 
| 
      
 375 
     | 
    
         
            +
            IP 地址是互联网的基础部分,那么 IP 归属地数据库同样也很重要。
         
     | 
| 
      
 376 
     | 
    
         
            +
             
     | 
| 
      
 377 
     | 
    
         
            +
            之前在 ECSHOP 时期就研究过,只是最终没有更深入。
         
     | 
| 
      
 378 
     | 
    
         
            +
             
     | 
| 
      
 379 
     | 
    
         
            +
            终于半公半私都有关系的原因,下定决心做了,我一个人为主,也有同事很大的帮助。
         
     | 
| 
      
 380 
     | 
    
         
            +
             
     | 
| 
      
 381 
     | 
    
         
            +
            这半年多时间以来,知识见涨,尤其是全球地理方面的知识。:-)
         
     | 
| 
      
 382 
     | 
    
         
            +
             
     | 
| 
      
 383 
     | 
    
         
            +
            这次为了发布,也专门改进了库的生成方式,更准确(之前的生成代码有个小问题,导致 ECSHOP、DISCUZ 的也有同样问题,只是轻易碰不上,这次一并都改进了),库的体积也更小。
         
     | 
| 
      
 384 
     | 
    
         
            +
             
     | 
| 
      
 385 
     | 
    
         
            +
            言归正传,有空再闲扯。
         
     | 
| 
      
 386 
     | 
    
         
            +
             
     | 
| 
      
 387 
     | 
    
         
            +
            想使用很简单,把 17monipdb.dat 和 IP.class.php 放在同一个目录,使用 IP::find('x.x.x.x') 调用即可。
         
     | 
| 
      
 388 
     | 
    
         
            +
            工程师们请注意:目前为了向后兼容增加更多项目,并且方便进行二次处理,所以两个文本使用制表符分割;目前使用 UTF-8 字符集,其它字符集请自行转义;欢迎大家补充其它语言的版本。
         
     | 
| 
      
 389 
     | 
    
         
            +
             
     | 
| 
      
 390 
     | 
    
         
            +
            几点说明:
         
     | 
| 
      
 391 
     | 
    
         
            +
             
     | 
| 
      
 392 
     | 
    
         
            +
            1、维护这个数据库是个长期工作,甚至是一个无期工作,所以有打算做付费维护的考虑,请各位工程师们理解其辛苦程度。不是为赚钱,而是为了更好的维护数据库,让数据更准确,更有价值。
         
     | 
| 
      
 393 
     | 
    
         
            +
             
     | 
| 
      
 394 
     | 
    
         
            +
            2、目前公开版仅发布国内具体到省,国外具体到国家的格式数据。一般来说够用了。基于准确度优先的问题,我们暂时没有做除了直辖市或者可以明确到市的数据,即使有,目前也比较少。这个还请见谅,您可以保持关注。数据库的更新周期暂定一个月左右。17mon.cn 所对外的数据是完全版也是最新版,有需要可以使用 http://ip.17mon.cn/ 进行查询。
         
     | 
| 
      
 395 
     | 
    
         
            +
             
     | 
| 
      
 396 
     | 
    
         
            +
            3、有些 IP 段不会标注国家,是因为要么是路由器 IP 段,要么是做了 ANYCAST 技术,无法具体定位,一般来说,针对普通用户进行定位,不会碰到此类 IP,只有面对 CDN、DNS、服务器、路由器等等所在的 IP,才有可能碰到。
         
     | 
| 
      
 397 
     | 
    
         
            +
             
     | 
| 
      
 398 
     | 
    
         
            +
            4、在整理过程中,感谢 DNSPOD 的建议和数据支持,部分数据参考了纯真 IP 库、淘宝 IP 库、腾讯 IP 库、新浪 IP 库、中国互联网广告行业 IP 库的数据,还包括 BGP.HE.NET 以及全球各大地区的 IP 管理机构的 WHOIS 信息数据,感谢给我帮助和支持的大家还有我的同事,还有很多基础性的文章和资料,包括中国地图出版社的美国地图和欧洲地图。
         
     | 
| 
      
 399 
     | 
    
         
            +
             
     | 
| 
      
 400 
     | 
    
         
            +
            5、为了便于查询您使用的 IP 库版本,将 255.255.255.0 - 255.255.255.255 作为版本数据输出,您需要了解版本的话,请使用 IP::find('255.255.255.255') 查询即可。
         
     | 
| 
      
 401 
     | 
    
         
            +
             
     | 
| 
      
 402 
     | 
    
         
            +
            6、我们为了自己,也为了他人方便,集成了一个大全版,有兴趣者可访问 http://ip.17mon.cn/ 。
         
     | 
| 
      
 403 
     | 
    
         
            +
             
     | 
| 
      
 404 
     | 
    
         
            +
            7、数据量超大,更不要提未来的 IPv6 了,尤其我们为了准确,尽量使用实证方式维护数据,错误难免,请加 QQ 群: 346280296 进行讨论。
         
     | 
| 
      
 405 
     | 
    
         
            +
             
     | 
| 
      
 406 
     | 
    
         
            +
            8、如果您所在公司有更准确的 IP 数据库需求,可以与我联系,希望可以发挥各自长处合作共建,而不是各自单打独斗。
         
     | 
| 
      
 407 
     | 
    
         
            +
             
     | 
| 
      
 408 
     | 
    
         
            +
            说完了。
         
     | 
| 
      
 409 
     | 
    
         
            +
             
     | 
| 
      
 410 
     | 
    
         
            +
            --
         
     | 
| 
      
 411 
     | 
    
         
            +
            高春辉
         
     | 
| 
      
 412 
     | 
    
         
            +
            Paul Gao
         
     | 
| 
      
 413 
     | 
    
         
            +
            gaochunhui@gmail.com
         
     | 
| 
      
 414 
     | 
    
         
            +
            http://www.17mon.cn/
         
     | 
    
        data/lib/ipip-fast.rb
    ADDED
    
    
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,66 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: ipip-fast
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.2
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Eric-Guo
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire:
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: exe
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-03-17 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: ruby-prof-flamegraph
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 0.3.0
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 0.3.0
         
     | 
| 
      
 27 
     | 
    
         
            +
            description: Same function as ipip-ipdb, only faster.
         
     | 
| 
      
 28 
     | 
    
         
            +
            email:
         
     | 
| 
      
 29 
     | 
    
         
            +
            - eric.guocz@gmail.com
         
     | 
| 
      
 30 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 31 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 32 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 33 
     | 
    
         
            +
            files:
         
     | 
| 
      
 34 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 35 
     | 
    
         
            +
            - lib/ipdb/city.rb
         
     | 
| 
      
 36 
     | 
    
         
            +
            - lib/ipdb/ipipfree.ipdb
         
     | 
| 
      
 37 
     | 
    
         
            +
            - lib/ipdb/reader.rb
         
     | 
| 
      
 38 
     | 
    
         
            +
            - lib/ipdb/readme.txt
         
     | 
| 
      
 39 
     | 
    
         
            +
            - lib/ipip-fast.rb
         
     | 
| 
      
 40 
     | 
    
         
            +
            - lib/ipip/fast/version.rb
         
     | 
| 
      
 41 
     | 
    
         
            +
            homepage: https://github.com/Eric-Guo/ipip-fast#ipip-fast-
         
     | 
| 
      
 42 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 43 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 44 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 45 
     | 
    
         
            +
              homepage_uri: https://github.com/Eric-Guo/ipip-fast#ipip-fast-
         
     | 
| 
      
 46 
     | 
    
         
            +
              source_code_uri: https://github.com/Eric-Guo/ipip-fast
         
     | 
| 
      
 47 
     | 
    
         
            +
            post_install_message:
         
     | 
| 
      
 48 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 49 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 50 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 51 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 52 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 53 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 54 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 55 
     | 
    
         
            +
                  version: 2.4.0
         
     | 
| 
      
 56 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 58 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 59 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 60 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 61 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 62 
     | 
    
         
            +
            rubygems_version: 3.2.14
         
     | 
| 
      
 63 
     | 
    
         
            +
            signing_key:
         
     | 
| 
      
 64 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 65 
     | 
    
         
            +
            summary: Same function as ipip-ipdb, only faster.
         
     | 
| 
      
 66 
     | 
    
         
            +
            test_files: []
         
     |