IPINFO

IP info web service. It handles next requests:
- default - plain text info about request IP
/short - short info about request IP
/json - json info about request IP
/xml - json info about request IP
/html - html info about request IP
Examples are in the file api.md.

Build
make build
# cp config.example.json ipinfo.json
# set custom settings in ipinfo.json
./ipinfo -config ipinfo.json
For docker container z0rr0/ipinfo
make docker
# or only for linux amd64
# make docker_linux_amd64
Local run
make start
make stop
# alias for [stop + start]
make restart
For docker container
# mydir/ipinfo.json
# mydir/GeoLite2-City.mmdb
docker run --rm --name ipinfo -u $UID:$UID -p 8082:8082 -v /mydir:/data/conf:ro z0rr0/ipinfo:latest
Configuration
See config.example.json. Optional field ip_itself: when set,
requests coming from an internal private or loopback address (e.g. another docker
container on the same host) have their IP replaced by this value before geolocation,
so they report the host's real public IP. Leave it empty to disable.
License
This source code is governed by a BSD 3-Clause
license that can be found in the LICENSE file.
This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com