kayon / iploc

每秒百万高性能IP查询库,使用纯真IP库,国内省、市、县,qqwry.dat转换工具:GBK转为UTF-8
BSD 3-Clause "New" or "Revised" License
100 stars 37 forks source link

IP 结果有错, 国内地址对齐也不对 #3

Open IGGAbc opened 4 years ago

IGGAbc commented 4 years ago

国内数据格式化到省、市、县 是错误的 你可以用你自己的测试IP试试

Detail{IP:QQWry.IP{0x1, 0x18, 0x29, 0x0}, Start:QQWry.IP{0x1, 0x18, 0x29, 0x0}, End:QQWry.IP{0x1, 0x18, 0x29, 0xff}, Location:QQWry.Location{Country:"内蒙古锡林郭勒盟苏尼特右旗", Region:"联通", Province:"", City:"", County:"", raw:"内蒙古锡林郭勒盟苏尼特右旗 联通"}}

kayon commented 4 years ago

我测试有无索引结果都是一致的 &iploc.Detail{IP:iploc.IP{0x1, 0x18, 0x29, 0x0}, Start:iploc.IP{0x1, 0x18, 0x29, 0x0}, End:iploc.IP{0x1, 0x18, 0x29, 0xff}, Location:iploc.Location{Country:"中国", Region:"联通", Province:"内蒙古", City:"锡林郭勒盟", County:"苏尼特右旗", raw:"内蒙古锡林郭勒盟苏尼特右旗 联通"}}

0102redirects commented 4 years ago

我试了几个ip,城市有误