https://github.com/gonet2/geoip
query geo-locations of ips
https://github.com/gonet2/geoip
Last synced: about 1 month ago
JSON representation
query geo-locations of ips
- Host: GitHub
- URL: https://github.com/gonet2/geoip
- Owner: gonet2
- License: mit
- Created: 2015-05-22T03:29:50.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-02-23T09:30:59.000Z (about 9 years ago)
- Last Synced: 2024-08-05T17:26:00.528Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 41.5 MB
- Stars: 31
- Watchers: 7
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - gonet2/geoip - query geo-locations of ips (Go)
README
# geoip
[](https://travis-ci.org/gonet2/geoip)
# 设计思路
查询IP归属地,基于maxmind的geoip2库做的封装,如果需要最新的准确的数据,需要向maxmind购买。
(query geo-locations of IP, if you need accurate & updated data, please purchase from maxmind.com, thanks. )
> 问: 为什么选择maxmind的geoip2库?
> 答: maxmind的geoip2的库设计为一个支持mmap的二叉树文件,查询时间复杂度为O(logN), 文件大小不超过100M,极其紧凑,省内存,速度快,零配置,是目前见过的最好的方案。
## 使用
参考测试用例
## 安装
参考Dockerfile