maxmind / MaxMind-DB

Spec and test data for the MaxMind DB file format
https://maxmind.github.io/MaxMind-DB/
Apache License 2.0
275 stars 64 forks source link

Possibility to generate testing database instead of using downloaded binary files #121

Closed nezdolik closed 11 months ago

nezdolik commented 11 months ago

Hi, is there is a way/tool/api to generate testing databases in mmdb format based on a given input? Asking in context of adding Maxmind support to Envoy geolocation filter, where we have to check in testing binary databases from this repo and is not the most optimal approach from security and code readability standpoints.

oschwald commented 11 months ago

These files are generated from the data in the source-data directory using the script test-data/write-test-data.pl.

If you want to write your own databases with custom values, I would suggest using the Go mmdbwriter. It is likely that the Perl writer code used by this repo will be deprecated in the near future.

nezdolik commented 11 months ago

Thank you @oschwald for fast response!