xJonathanLEI / ipgeod

Exposing IP geolocation data from local databases via HTTP

Home Page:https://hub.docker.com/r/xjonathanlei/ipgeod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ipgeod

Exposing IP geolocation data from local databases via HTTP

Note

Only IPv4 addresses are supported for now.

Getting started

Note

This section demonstrates using the herrbischoff/country-ip-blocks database. See the full list of supported databases for other sources.

First clone the herrbischoff/country-ip-blocks repository anywhere in the filesystem. Then run from this repository:

cargo run --release -- --herrbischoff-path /path/to/country-ip-blocks-repo/

ipgeod will listen on port 3000 (configurable via --port). Test the API with:

curl http://localhost:3000/ipv4/1.2.3.4

Supported database sources

The following databases are supported:

  • herrbischoff/country-ip-blocks

    To use this database, simply clone the repository anywhere in the filesystem, and set --herrbischoff-path (or the HERRBISCHOFF_PATH environment variable) to the path.

  • IP2Location LITE

    Download the CSV version of the DB1.LITE database (code DB1LITECSV), and set --ip2location-db (or the IP2LOCATION_DB environment variable) to the file path.

License

Licensed under either of

at your option.

About

Exposing IP geolocation data from local databases via HTTP

https://hub.docker.com/r/xjonathanlei/ipgeod

License:Apache License 2.0


Languages

Language:Rust 97.6%Language:Dockerfile 2.4%