Skip to content

simple service to lookup contry based on visitor's IP address

Notifications You must be signed in to change notification settings

irmatov/ip2country

Repository files navigation

ip2country is a service that returns country name detected from IP address of a visitor.

ip2country obtains country data from one of the following lookup services:

List of those services could be expanded. Data received from those lookup services should be cached in local database. Duration of caching should be configurable.

Lookup services have their own rate limits which should be honored by this service. If one service is above rate limit other service must be selected for lookups.

Settings of lookup services and their list should be stored in configuration file.

There were made several assumptions about the task:

  • services use GET requests;
  • IP address is placed directly within URL;
  • services return JSON.

This service also returns json, with two keys, IP and Country. Two backends for caching currently available, in-memory cache and PostgreSQL.

About

simple service to lookup contry based on visitor's IP address

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages