g-andrade

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

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/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:

g-andrade

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

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:

g-andrade

g-andrade

Hello forum,

Locus 1.6.0 was released today.

Added:

  • new API method for validating loaded databases (locus:analyze/1)
  • new command line tool supporting database validation

Changed:

  • safety of database HTTPS downloads was substantially improved by now rejecting expired certificates, mismatched hostnames, self-signed certificates or unknown certificate authorities
  • test coverage using MaxMind’s test data was greatly extended
  • database decoder was thoroughly optimized
  • documentation was mildly improved

Fixed:

  • misguided rejection of UTF-8 strings with non-printable (but valid) codepoints
  • unnecessarily strict refusal to load 2.x database formats succeeding 2.0
  • infinite recursion in maliciously crafted databases due to circular paths

Links:

g-andrade

g-andrade

I’m pleased to announce the release of Locus 1.8.0 .

Added

  • support for returning types other than map upon successful lookups

Changed

  • MMDB decoder, which was split into separate tree, data section and analysis modules
  • imported stacktrace_compat version [1.0.2 => 1.1.1]

Removed

  • support for OTP 18

Fixed

  • incidents of locus managerial processes keeping references to old binaries, upon a database update, for a potentially unlimited time (OTP 20+ only)
  • broken logging of playground shell on OTP 21.1+

Links:

Where Next?

Popular in Libraries Top

Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. Features Unstyled Phoenix components. Storybook that can be added to...
New
archan937
It is a well-know topic within the Elixir community: “To mock or not to mock? :)” Every alchemist probably has his / her own opinion con...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
381 12391 119
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement