Add support for IPv6 database
evgenyneu opened this issue · 4 comments
There is a IPv6 version of GeoLite database here: http://www.maxmind.com/app/geolite. It looks like it is not supported yet, as it shows the error
geoip.rb:186:in `throw': uncaught throw "Invalid GeoIP database type, can't look up Country by IP" (ArgumentError)
The database search code will be completely different. It'll be a case of doing basically what I did when I wrote the first version, which is to get Maxmind's GPL'd C code and transliterate it into Ruby. It's unlikely I'll get to this soon, but I have a weekend away coming up so it's possible - I'll grab a copy of the data file and the C code to check out. Otherwise you are welcome to do the same, of course - pull requests always welcome ;).
Cool. I would not have time to do it in near future, I am afraid. But if I do - I will update you here, so we do not both work on it simultaneously.
This would be a great feature. Do you have any plans to implement it?
Does this commit work for you? I haven't had time to test it:
shovtyuk@3e690f9