Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 support #4

Open
Kikobeats opened this issue Mar 3, 2021 · 8 comments
Open

IPv6 support #4

Kikobeats opened this issue Mar 3, 2021 · 8 comments

Comments

@Kikobeats
Copy link

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?

@corollari
Copy link
Contributor

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.

🥳, 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.

@Kikobeats
Copy link
Author

that makes sense; then it can be combined with is-ip in order to determine what fast-geoip should be used!

@jlarmstrongiv
Copy link

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.

@sanchezzzhak
Copy link

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

@Doc999tor
Copy link

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',
}

@maddybo
Copy link

maddybo commented Apr 28, 2022

Any news? IP v6 still dont work properly

@emjoseph
Copy link

emjoseph commented Jun 1, 2023

IPv6 support would be incredible :)

@maddybo
Copy link

maddybo commented Jun 1, 2023

We still waiting :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants