whereisip

command module
v2.0.0-...-907c423 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

Where Is My IP

Small webservice using GeoLite2 database to give geographic information about IP address location

Dependencies

This project depends on MaxMind GeoLite2

Build

Simply build the project with Go:

go build

Installation

First you need to copy a version of GroLite2-City database from MaxMind. Copy this file into the same directory than whereisip binary: GeoLite2-City.mmdb

Then run the webservice: ./whereisip

There is no command line arguments supported for now.

Usage

Only one GET request to / is supported and you'll get a JSON response of GeoLite database content based on your remote address. Server listen on :8085.

Example response:

{
  "address": "82.212.171.24",
  "country_code": "BE",
  "country_name": "Belgium",
  "subdivision": "Wallonia",
  "continent": "Europe",
  "city_name": "Liège",
  "latitude": 50.6337,
  "longitude": 5.5675,
  "source": "maxmind geolite2"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL