yourtion / node-ip2region

IP/IPv6 to region on Node.js (IP/IPv6 地址到区域运营商)
https://www.npmjs.com/package/ip2region
MIT License
132 stars 17 forks source link

ipv6现在还不支持吧? #29

Closed Leo555 closed 3 years ago

Leo555 commented 4 years ago

我做了测试,发现ipv6的地址会被解析到印度孟买。

const IP2Region = require('ip2region');
const query = new IP2Region();
const res = query.search('2409:8946:2d51:1569:dfdb:6dcf:dd39:5d9a');

console.log(res);

输出结果是

{
  id: 0,
  country: '印度',
  region: '0',
  province: '马哈拉施特拉',
  city: '孟买',
  isp: '印度电信'
}
yourtion commented 3 years ago

暂时不支持,但是有在考虑支持中

yourtion commented 3 years ago

2.0版本已经支持ipv6,https://github.com/yourtion/node-ip2region/releases/tag/v2.0.0