All Projects → HowNetWorks → whereabouts

HowNetWorks / whereabouts

Licence: MIT license
An HTTP service for mapping IPv4 and IPv6 addresses to cities, countries & continents

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to whereabouts

ip-finder-cli
The official command line client for IPFinder
Stars: ✭ 11 (-31.25%)
Mutual labels:  ipv6, ipv4, geoip
geoip
🌚 🌍 🌝 GeoIP 规则文件加强版,同时支持定制 V2Ray dat 格式路由规则文件 geoip.dat 和 MaxMind mmdb 格式文件 Country.mmdb。Enhanced edition of GeoIP files for V2Ray, Xray-core, Trojan-Go, Clash and Leaf, with replaced CN IPv4 CIDR available from ipip.net, appended CIDR lists and more.
Stars: ✭ 524 (+3175%)
Mutual labels:  ipv6, ipv4, geoip
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (+162.5%)
Mutual labels:  ipv6, ipv4
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (+106.25%)
Mutual labels:  ipv6, ipv4
Geolocate-IP-Browser-Extension
A browser extension, which shows you the origin of your IP address.
Stars: ✭ 21 (+31.25%)
Mutual labels:  ipv6, ipv4
PHP-IPAddress
IP Address utility classes for PHP
Stars: ✭ 63 (+293.75%)
Mutual labels:  ipv6, ipv4
ipv6calc
ipv6calc
Stars: ✭ 33 (+106.25%)
Mutual labels:  ipv6, ipv4
tracetrout
A magical reverse traceroute HTTP(S) server
Stars: ✭ 48 (+200%)
Mutual labels:  ipv6, ipv4
ipv6
IPv6-adresse.dk source & data
Stars: ✭ 27 (+68.75%)
Mutual labels:  ipv6, ipv4
IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.
Stars: ✭ 154 (+862.5%)
Mutual labels:  ipv6, ipv4
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+706.25%)
Mutual labels:  ipv6, ipv4
treebitmap
Fast IP lookup table for IPv4/IPv6 prefixes
Stars: ✭ 81 (+406.25%)
Mutual labels:  ipv6, ipv4
ipaddress
Data analysis of IP addresses and networks
Stars: ✭ 20 (+25%)
Mutual labels:  ipv6, ipv4
python-iptools
A few useful functions and objects for manipulating ip addresses in python.
Stars: ✭ 68 (+325%)
Mutual labels:  ipv6, ipv4
Aggregator
A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
Stars: ✭ 19 (+18.75%)
Mutual labels:  ipv6, ipv4
php-ip-anonymizer
IP address anonymizer library for PHP
Stars: ✭ 55 (+243.75%)
Mutual labels:  ipv6, ipv4
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (+131.25%)
Mutual labels:  ipv6, ipv4
Ip
🌏根据IpV4、IpV6地址获取定位信息的PHP🐘组件 PHP components that obtain location information based on IpV4, IpV6 addresses
Stars: ✭ 23 (+43.75%)
Mutual labels:  ipv6, ipv4
accomplist
ACCOMPLIST - List Compiler
Stars: ✭ 51 (+218.75%)
Mutual labels:  ipv6, ipv4
masscanned
Let's be scanned. A low-interaction honeypot focused on network scanners and bots. It integrates very well with IVRE to build a self-hosted alternative to GreyNoise.
Stars: ✭ 50 (+212.5%)
Mutual labels:  ipv6, ipv4

Whereabouts CircleCI

An HTTP service for mapping IPv4 and IPv6 addresses to countries and continents. Written in Go (version 1.7.4).

Uses MaxMind's CC BY-SA 4.0 licensed GeoLite2 City database (available from https://www.maxmind.com/) by default. However the service can be configured to use any other similarly formatted database.

The service, once launched, polls the database URL periodically and downloads updated versions automatically. The service can also be seeded with an initial database, e.g. for speeding up service startup from a Docker image.

Quick Start

Launch Whereabouts as a Docker container:

$ docker run -ti --rm -p 8080:8080 hownetworks/whereabouts

Give the service a moment to download the database. Once that's done you can start sending queries to localhost port 8080:

$ curl http://localhost:8080/ip/8.8.8.8

Command-line Options

  • host The IP address or hostname that the HTTP server should listen to. Default: localhost.
  • port The port that the HTTP server should listen to. Default: 8080.
  • update-interval How often database updates should be checked from hash-url/update-url. Uses Go's Duration format. Default: 4 hours.
  • update-url A URL for updating the database. Default: MaxMind's GeoLite2 City database.
  • hash-url A URL pointing to a file containing an MD5 sum of the data in update-url. Useful for checking whether the database has updated without actually downloading the whole database. Default: Off by default, except when update-url points to its default value.
  • init-url A URL for the initial database load. Can be used to seed the service by e.g. baking in a snapshot of the database into the service's a Docker image. Default: The initial load will be performed from update-url.

All URL options allow http, https and file URLs.

API

The service supports requests to /ip/IP_ADDRESS where IP_ADDRESS can be an IPv4 or IPv6 address.

Let's assume the service is running on localhost port 8080 and has done the initial database load. To query Google's DNS service addresses run the following:

$ curl http://localhost:8080/ip/8.8.8.8
{"continent":{"code":"NA","name":"North America"},"country":{"code":"US","name":"United States"},"city":"Mountain View"}
$ curl http://localhost:8080/ip/2001:4860:4860::8888
{"continent":{"code":"NA","name":"North America"},"country":{"code":"US","name":"United States"}}
$ curl http://localhost:8080/ip/192.0.2.0
{}

If the queried IP isn't a valid IPv4/6 address the service returns status code 422 (Unprocessable Entity) with a JSON formatted message object:

$ curl http://localhost:8080/ip/not.an.ip.address
{"message": "Not an IPv4/IPv6 address"}

GET requests to the root path / return the status code 200, but only after the initial database load has been done. This can be used for service readiness checks.

Baking the Database into an Image

The Docker image does not contain a copy of the MaxMind GeoLite2 City database, which is always loaded from MaxMind's servers when Whereabouts starts. For situations where this is not feasible (e.g. environments without external network connectivity) you can build a custom image with that uses baked-in data for the initial load.

Create a Dockerfile with hownetworks/whereabouts as the base image:

# Instead of :latest use an explicit version such as :v0.4.0 in production
FROM hownetworks/whereabouts:latest
ADD --chown=app:app https://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip /data/
CMD /whereabouts -host 0.0.0.0 -init-url file:///data/GeoLite2-City-CSV.zip
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].