fast-geoip
fast-geoip copied to clipboard
IPv6 support
Hello,
First of all, thanks for this module. It's really appreciated how well-designed it is 👏
I created a module called request-country
that essentially uses fast-geoip
for getting the country.
I noted the lookup function is referencing IPv4 addresses and I wanted to ask if it is possible to add ipv6 support.
Correct me if I'm wrong but probably that is not possible since MaxMind's GeoLite database is just for IPv4?
It's really appreciated how well-designed it is clap
Thanks!
I created a module called request-country that essentially uses fast-geoip for getting the country.
:partying_face:, let me know if there's anything on my end that I could do to make your life easier,
Correct me if I'm wrong but probably that is not possible since MaxMind's GeoLite database is just for IPv4?
MaxMind also provides an IPv6 database so it is definitely possible to integrate IPv6 addresses into the package. With that being said, I'd probably make this into a new package in order to keep the size of the current package low enough so that it fits into the lowest-memory lambda.
that makes sense; then it can be combined with is-ip
in order to determine what fast-geoip should be used!
Any updates on IPv6 support? 😄 I’d love to use fast-geoip for my serverless use case, but only node-geoip
supports both IPv4 and IPv6. Enjoyed reading the optimization strategies—very cool.
that makes sense; then it can be combined with
is-ip
in order to determine what fast-geoip should be used!
if we need to find out the ip version, we can do it without dependencies.
const Net = require('net');
let version = Net.isIP(ipAdress); // return 4 or 6
Any news about v6?
> geoip.lookup('141.226.15.196').then(r => console.log(r))
> {
country: 'IL',
timezone: 'Asia/Jerusalem',
city: 'Tel Aviv',
}
> geoip.lookup('2a02:ed0:52be:e900:442d:a98c:84a5:6d31').then(r => console.log(r)) -- the same ip in v6
> {
country: 'FR', 😂
timezone: 'Europe/Paris',
city: 'Mamers',
}
Any news? IP v6 still dont work properly
IPv6 support would be incredible :)
We still waiting :D