g-andrade
Locus: Geolocation and ASN lookup of IP addresses
Hi forum,
I’m pleased to announce the release of locus 1.0.0, an Erlang/OTP library that allows you to pinpoint the country, city or ASN of IPv4 and IPv6 addresses, using MaxMind’s GeoLite2 databases.
The MaxMind databases you choose are downloaded on-demand, cached on the filesystem and updated automatically.
The databases are loaded into memory (mostly) as-is; reference counted binaries are shared with the application callers using ETS tables, and the original binary search tree is used to lookup addresses. The data for each entry is decoded on the fly upon successful lookups.
Most Liked
g-andrade
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/1to API (which replaceslocus:analyze/1and can be up to 3200% faster
)- details to MMDB unpacking errors
- linting checks with
rebar3_lint - dead code checks with
rebar3_hank
Changed
return type of locus:lookup/2(see MIGRATION.md)- database loader to use
persistent_terminstead 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-modifiedresponse header to no longer be cached - imported version of
tls_certificate_checkto ‘~> 1.7’ - single CT suite covering both filesystem and HTTP sources into one for each
- test coverage for the better
Removed
locus:wait_for_loader/1from API (deprecated in 1.10.0 - see MIGRATION.md)
locus:wait_for_loader/2from API (deprecated in 1.10.0 - see …)
locus:wait_for_loaders/2from API (deprecated in 1.10.0 - see …)
locus:get_version/1from API (deprecated in 1.4.0 - see …)
locus:analyze/1from API (locus:check/1now fullfils this role - see …)- deprecated loader options
pre_readiness_update_periodandpost_readiness_update_period(see …) - warnings on the use of discontinued GeoLite2 HTTP URLs
Links:
g-andrade
Locus 1.9.0, after one month in beta, has been released!
Added
- support for downloading databases with full awareness of license keys (now mandatory)
Deprecated
- the use of discontinued
https://geolite.maxmind.com/download/geoip/database/GeoLite2-...database URLs
Links:
g-andrade
Hi forum,
Locus 1.3.0 was released today.
Added:
- ability of loading databases from local file system
- type spec of database entries
Fixed:
- wrong handling of timezones on cached tarballs
- wrong handling of daylight saving time on conditional HTTP requests
The timezone / DST fixes mentioned above were also backported to earlier versions and tagged under:
- 1.0.1
- 1.1.4
- 1.2.2
Links:
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









