Git Product home page Git Product logo

myip's Introduction

MyIP Tetrad

goreleaser ย  Go Reference

MyIP Tetrad is a simple to use terminal tool to determine your Internet-facing IP address and location from four remote sources. Developed on Go, it's a portable self-contained binary with no dependencies.

It is an excellent tool for quickly determining if your machine or network is connected to the Internet or to see if a VPN is activated.

Downloads

Windows, macOS, Linux and more...

Packages

apk - Alpine package, deb - Debian package, rpm - Redhat package

# Alpine package
apk add myip.apk

# Debian package
dpkg -i myip.deb

# Redhat package
rpm -i myip.rpm

Usage

myip -help
# MyIP Usage:
#     myip [options]:
#
#     -h, --help       show this list of options
#     -f, --first      returns the first reported IP address and its location
#     -s, --simple     simple mode only displays the IP address
#     -t, --timeout    https request timeout in milliseconds (default: 5000 [5 seconds])
#     -v, --version    version and information for this program
myip
# (1/4) 93.184.216.34, Norwell, United States
# (2/4) 93.184.216.34, Norwell, United States
# (3/4) 93.184.216.34, Norwell, United States
# (4/4) 93.184.216.34, Norwell, United States
myip -first
# (1/1) 93.184.216.34, Norwell, United States
myip -simple
# 93.184.216.34
# 93.184.216.34
# 93.184.216.34
# 93.184.216.34
myip -simple -first
# 93.184.216.34
myip -timeout=900
# (1/4) 93.184.216.34, Norwell, United States
# ip4.seeip.org: timeout
# (3/4) 93.184.216.34, Norwell, United States
# api.ipify.org: timeout

Build

Go supports dozens of architectures and operating systems letting MyIP to be built for most platforms.

# clone this repo
git clone [email protected]:bengarrett/myip.git

# access the main.go
cd myip/cmd/myip

# target and build the app for the host system
go build

# target and build for Windows 7+ 32-bit
env GOOS=windows GOARCH=386 go build

# target and build for OpenBSD
env GOOS=openbsd GOARCH=amd64 go build

# target and build for Linux on MIPS CPUs
env GOOS=linux GOARCH=mips64 go build

MyIP uses the following online APIs.

The IP region data is from GeoLite2 created by MaxMind, available from maxmind.com.

I found Steve Azzopardi's excellent import "context" post useful for understanding context library in Go.

myip's People

Contributors

bengarrett avatar dependabot[bot] avatar goreleaserbot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.