The first release of the geoip project has taken place, implementing a service for retrieving information about the locations of IP addresses via REST API. The project is aimed at simplifying the integration of GeoIP functionality into various applications, freeing developers from the need to manage database updates themselves and to work with the MMDB format. The code is written in Rust and is distributed under the MIT license. It supports operation on Linux and macOS, as well as other UNIX-like systems.
Key features of the service:
- High performance and low memory consumption due to the use of a compiled programming language with no garbage collector.
- Providing information about the IP address (country, city, postal code, coordinates, ISP, etc.) through REST API based on MaxMind GeoLite2 (free) and MaxMind GeoIP2 (paid) data.
- Determining the current an IP address user (available via a separate endpoint; the ip parameter of the main endpoint is optional).
- Customizable automatic database updates (from both official MaxMind resources using Account ID and License Key, and from a custom URL with authorization support; the update check interval can be specified).
- Web interface for manually sending requests, including optional support for display on OpenStreetMap.

- For all results containing the timezone field, an additional posix_timezone field is automatically generated (e.g., Europe/Paris converts to CET-1CEST,M3.5.0,M10.5.0/3). This ensures automatic timezone configuration on embedded devices (e.g., ESP32 and other newlib targets without built-in tzdata). This capability is unique and absent in similar solutions.
- Automatic updates of the timezone database (interval, source, and authorization can be configured; by default, the official IANA website is used). When updates are disabled, the system database is applied.
- Ability to download the latest database archives via HTTP directly from the service (allowing one instance to act as a proxy source for others and reducing MaxMind quota consumption).
- Support for endpoint protection with an optional API key.
- Availability of OpenAPI specification and built-in Swagger UI for easier integration with your projects.
- Providing a ready-made Docker image for quick deployment: docker run \ -e MAXMIND_ACCOUNT_ID=XXXX \ -e MAXMIND_LICENCE_KEY=YYYY \ -e OSM_TILES_URL="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" \ # optional -v geoip_data:/data \ -p 8080:8080 \ ghcr.io/quoi-dev/geoip:latest
Source: opennet.ru

