Skip to content

Geo Ip Plugin

Si Carter edited this page Oct 23, 2018 · 3 revisions

Geo Ip

The Geo Ip plugin is a simple Plugin module which allows websites to retrieve Geo Ip data in the form of Country and City, Region.

At present there are two individual sources, they are:

  • WebNet77 data.
  • IpStack data.

Each external service has it's own implementation and may or may not require you to download or register for services, should you choose that implementation.

Settings

The Geo Ip plugin can be configured using appsettings.json. Add an entry called GeoIpPluginConfiguration, this has the following settings:

GeoIpProvider

Enum, this value can be None or IpStack.

Webnet77CSVData

String, path to IpToCountry.csv for country data only, obtained from http://software77.net/geo-ip/.

IpStack

This property has one sub property called ApiKey which can be obtained from https://ipstack.com/.

ApiKey

String, Api key obtained by registering with IpStack.

New Geo Ip providers

There are plans to include other Geo Ip providers in the future, if you want one integrated create an issue and get involved or create an issue which someone else can pick up and implement.

Webnet77 integration.

If you provide the path/file name for IpToCountry.csv in the settings, this will be loaded into memory when the plugin is started, this allows for a very fast lookup of country only, based on a range of Ip addresses. If you then choose IpStack on top, each range will only be searched once when required, this can involve a small delay as IpStack is a web based service. Once data has been retrieved for a range, any Ip address within the range will not require a future lookup.