All Projects → mpolden → Echoip

mpolden / Echoip

Licence: bsd-3-clause
IP address lookup service

Programming Languages

go
31211 projects - #10 most used programming language
HTML
75241 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Echoip

Ip2region
Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm
Stars: ✭ 9,836 (+200.43%)
Mutual labels:  ip-lookup, ip-location
Vendor-Threat-Triage-Lookup
Lookup file hashes, domain names and IP addresses using various vendors to assist with triaging potential threats.
Stars: ✭ 17 (-99.48%)
Mutual labels:  geoip, ip-address-lookup
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (-98.72%)
Mutual labels:  ip-lookup, ip-location
ip-location-db
ip to location database by ASN, GeoFeed, Whois, iptoasn.com, db-ip lite, GeoLite2
Stars: ✭ 160 (-95.11%)
Mutual labels:  geoip, ip-location
node-ip2region
IP/IPv6 to region on Node.js (IP/IPv6 地址到区域运营商)
Stars: ✭ 95 (-97.1%)
Mutual labels:  ip-lookup, ip-location
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (-98.99%)
Mutual labels:  ip-lookup, ip-location
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 (-95.3%)
Mutual labels:  ip-lookup, ip-location
mmdbwriter
Go library for writing MaxMind DB (mmdb) files
Stars: ✭ 44 (-98.66%)
Mutual labels:  geoip
country
IP to country
Stars: ✭ 32 (-99.02%)
Mutual labels:  geoip
sawmill
Sawmill is a JSON transformation Java library
Stars: ✭ 92 (-97.19%)
Mutual labels:  geoip
MaxMind-DB-Reader-java
Java reader for the MaxMind DB format
Stars: ✭ 88 (-97.31%)
Mutual labels:  geoip
go-inet
A Go library for reading, formatting, sorting, lookup and converting IP-addresses and IP-blocks
Stars: ✭ 14 (-99.57%)
Mutual labels:  ip-lookup
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 (-84%)
Mutual labels:  geoip
lua-resty-maxminddb
A Lua library for reading MaxMind's Geolocation database
Stars: ✭ 72 (-97.8%)
Mutual labels:  geoip
ipapi-retrofit
Android Library for Calling IP-API using Retrofit
Stars: ✭ 47 (-98.56%)
Mutual labels:  geoip
ipapi
Get geoip information with an API call.
Stars: ✭ 55 (-98.32%)
Mutual labels:  geoip
whereabouts
An HTTP service for mapping IPv4 and IPv6 addresses to cities, countries & continents
Stars: ✭ 16 (-99.51%)
Mutual labels:  geoip
V2RayGeoKit
No description or website provided.
Stars: ✭ 26 (-99.21%)
Mutual labels:  geoip
nginx-log-analyzer
A lightweight (simplistic) log analyzer for Nginx.
Stars: ✭ 17 (-99.48%)
Mutual labels:  geoip
ip2location-nginx
This is IP2Location Nginx module that enables the user to find the country, region (state), city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, address type and IAB category by IP address or hostname originates from.
Stars: ✭ 38 (-98.84%)
Mutual labels:  ip-lookup

echoip

Build Status

A simple service for looking up your IP address. This is the code that powers https://ifconfig.co.

Usage

Just the business, please:

$ curl ifconfig.co
127.0.0.1

$ http ifconfig.co
127.0.0.1

$ wget -qO- ifconfig.co
127.0.0.1

$ fetch -qo- https://ifconfig.co
127.0.0.1

$ bat -print=b ifconfig.co/ip
127.0.0.1

Country and city lookup:

$ curl ifconfig.co/country
Elbonia

$ curl ifconfig.co/country-iso
EB

$ curl ifconfig.co/city
Bornyasherk

$ curl ifconfig.co/asn
AS59795

As JSON:

$ curl -H 'Accept: application/json' ifconfig.co  # or curl ifconfig.co/json
{
  "city": "Bornyasherk",
  "country": "Elbonia",
  "country_iso": "EB",
  "ip": "127.0.0.1",
  "ip_decimal": 2130706433,
  "asn": "AS59795",
  "asn_org": "Hosting4Real"
}

Port testing:

$ curl ifconfig.co/port/80
{
  "ip": "127.0.0.1",
  "port": 80,
  "reachable": false
}

Pass the appropriate flag (usually -4 and -6) to your client to switch between IPv4 and IPv6 lookup.

Features

  • Easy to remember domain name
  • Fast
  • Supports IPv6
  • Supports HTTPS
  • Supports common command-line clients (e.g. curl, httpie, ht, wget and fetch)
  • JSON output
  • ASN, country and city lookup using the MaxMind GeoIP database
  • Port testing
  • All endpoints (except /port) can return information about a custom IP address specified via ?ip= query parameter
  • Open source under the BSD 3-Clause license

Why?

  • To scratch an itch
  • An excuse to use Go for something
  • Faster than ifconfig.me and has IPv6 support

Building

Compiling requires the Golang compiler to be installed. This package can be installed with:

go install github.com/mpolden/echoip/...@latest

For more information on building a Go project, see the official Go documentation.

Docker image

A Docker image is available on Docker Hub, which can be downloaded with:

docker pull mpolden/echoip

Usage

$ echoip -h
Usage of echoip:
  -C int
    	Size of response cache. Set to 0 to disable
  -H value
    	Header to trust for remote IP, if present (e.g. X-Real-IP)
  -a string
    	Path to GeoIP ASN database
  -c string
    	Path to GeoIP city database
  -f string
    	Path to GeoIP country database
  -l string
    	Listening address (default ":8080")
  -p	Enable port lookup
  -r	Perform reverse hostname lookups
  -t string
    	Path to template directory (default "html")
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].