Skip to content

Exposing IP geolocation data from local databases via HTTP

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

xJonathanLEI/ipgeod

Repository files navigation

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

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published