Adapt Onionoo's parsing code for MaxMind's GeoLite2 City files to their new format
MaxMind has changed their file format for GeoLite2 City database files. They split up blocks into IPv4 and IPv6 addresses, and they now support different locales. We need to update our parsing code to read their new formats. At the same time we should drop support for the old format in order to remove otherwise dead code.
I'll post a branch in a minute. Please review. I'll hold back on merging that branch into master until all mirrors have upgraded to the new database. It's just a matter of fetching the latest database and putting GeoLite2-City-Blocks-IPv4.csv
and GeoLite2-City-Locations-en.csv
into the geoip/
directory. iwakeh, please let me know when that's the case. It's not that mirrors would break, but they would stop resolving IP addresses to locations and ASes.