Adds Maxmind MMDB functionality to rtorrent client for enhanced detail on remote peer addresses.
For use with Free Maxmind GeoLite MMDB databases.
UPDATE FROM DECEMBER 30, 2019: You are now required to create a free account to download databases.
https://www.maxmind.com/en/geolite2/signup
GeoLite2 Downloadable Databases: https://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads
Update via: https://dev.maxmind.com/geoip/geoipupdate/
This patch was based upon an old 0.8.9 GeoIP patch (author unknown) and russellsimpkins-nyt / geo_functions.c
Note: Patches for 0.8.9, 0.9.6 and 0.9.8 are provided.
As Maxmind's GeoIP .dat is now obsolete, this replaces GeoIP lookup with new .mmdb GeoLite City and ASNum databases.
Additional libraries required for build:
apt-get install libmaxminddb-dev libmaxminddb0 geoipupdate
Expected DB locations defined in 'geo_functions.h':
#ifndef MAX_CITY_DB
#define MAX_CITY_DB "/usr/share/GeoIP/GeoLite2-City.mmdb"
#endif
#ifndef MAX_AS_DB
#define MAX_AS_DB "/usr/share/GeoIP/GeoLite2-ASN.mmdb"
#endif
Note: The 0.8.9 patch contains a 'range_map.h' backport patch, which is required for this changeset.
- 'range_map.h' will fail to merge where this patch has already been applied.
Example usage in: https://github.com/DirtBagXon/rtorrent