ip2region
ip2region copied to clipboard
Ip2region (2.0 - xdb) is a offline IP address manager framework and locator, support billions of data segments, ten microsecond searching performance. xdb engine implementation for many programming la...
作者你好!首先非常感谢您贡献的这个项目。对我们的应用中解析ip起到了重要作用。本次查看ip库文本文件,无意中发现40156 ~ 80300 行完全和前面40155行重复。请予以审查,修正,并排查下,是否还存在其他问题。祝好~
如: 211.161.246.219 memorysearch 0|中国|0|上海|上海|鹏博士 binarysearch 0|中国|0|上海|上海|鹏博士 btreesearch 0|中国|0|上海|上海|鹏博士 解析的结果是对的,但是城市相关的ID为0
``` gcc -O2 -Wall -fPIC -I ../c/ -I /usr/local/include/luajit-2.0/ ../c/ip2region.c lua_ip2region.c -fPIC -shared -o Ip2region.so lua_ip2region.c: In function 'luaopen_Ip2region': lua_ip2region.c:224:5: warning: implicit declaration of function 'luaL_setfuncs' [-Wimplicit-function-declaration] luaL_setfuncs(L, ip2region_methods, 0);...
目前ip2region库中的检测结果都是中文名,建议使用ISO标准编码: * 国家码:https://en.wikipedia.org/wiki/ISO_3166-1 * 地区码:https://en.wikipedia.org/wiki/ISO_3166-2 * 比如中国地区码:https://en.wikipedia.org/wiki/ISO_3166-2:CN
39.134.196.84 39.134.196.237 中国|0|0|0|移动 39.134.196.84 ![image](https://user-images.githubusercontent.com/6139634/101857347-44cda280-3ba2-11eb-8248-de1d366fbedc.png)
提个需求
关于IP查询,返回对应的地理位置经度和纬度,为何不做这个需求呢?
使用自己的ip.merge.txt生成db文件,ip.merge.txt中IP分段可以重复吗
ip2region.db版本: Upgrade the ip source data and db data to the latest version 2019/05/02 IP2Region.dll Nuget包版本:1.2.0 问题描述: 不是所有的IP查询结果都是乱码,部分IP数据是乱码,如IP:223.104.246.20 这个IP三种方法也只有BtreeSearch方法会出现乱码,其它两种都不会出现乱码: ``` using (var _search = new DbSearcher(path)) { Console.WriteLine(_search.BtreeSearch("223.104.246.20").Region); // 乱码...
> 全部binding的各个search接口都不是线程安全的实现,不同线程可以通过创建不同的查询对象来使用。 文中所说的线程不安全,是指构建出来的DbSearcher对象就是不安全的,不能使用全局DbSearcher对象,每个线程都需要构建DbSearcher对象吗?我看DbSearcher对象的构造,需要加载6M多的db文件,那岂不是效率很慢。 想请问下,如何构造线程安全的用法?
IP库整合规则
请问下这个项目IP库的整合规则大概是怎样的?