Locus: Geolocation and ASN lookup of IP addresses

Hi forum,

Locus 2.0.0, a MaxMind DB reader, was released tonight.

It’s the first breaking release and I used this opportunity to drop most deprecated code as well as polish the existing API.

Added

  • support for retrieving databases using consumer-defined locus_custom_fetchers
  • support for decoding IEEE-754 infinities in MMDB data
  • locus:check/1 to API (which replaces locus:analyze/1 and can be up to 3200% faster :racing_car:)
  • details to MMDB unpacking errors
  • linting checks with rebar3_lint
  • dead code checks with rebar3_hank

Changed

  • :warning: return type of locus:lookup/2 (see MIGRATION.md)
  • database loader to use persistent_term instead of ETS
  • MMDB decoder to perform stricter metadata validations
  • MMDB decoder to not crash upon maps containing duplicate keys
  • databases downloaded through HTTP(S) without a last-modified response header to no longer be cached
  • imported version of tls_certificate_check to ‘~> 1.7’
  • single CT suite covering both filesystem and HTTP sources into one for each
  • test coverage for the better

Removed

  • :warning: locus:wait_for_loader/1 from API (deprecated in 1.10.0 - see MIGRATION.md)
  • :warning: locus:wait_for_loader/2 from API (deprecated in 1.10.0 - see …)
  • :warning: locus:wait_for_loaders/2 from API (deprecated in 1.10.0 - see …)
  • :warning: locus:get_version/1 from API (deprecated in 1.4.0 - see …)
  • :warning: locus:analyze/1 from API (locus:check/1 now fullfils this role - see …)
  • deprecated loader options pre_readiness_update_period and post_readiness_update_period (see …)
  • warnings on the use of discontinued GeoLite2 HTTP URLs

Links:

8 Likes