Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Determine your Internet-facing IP address and location from multiple sources.

License

NotificationsYou must be signed in to change notification settings

bengarrett/myip

Repository files navigation

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 andmore...

Packages

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

# Alpine packageapk add myip.apk# Debian packagedpkg -i myip.deb# Redhat packagerpm -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 tobe built for most platforms.

# clone this repogit clone git@github.com:bengarrett/myip.git# access the main.gocd myip/cmd/myip# target and build the app for the host systemgo build# target and build for Windows 7+ 32-bitenv GOOS=windows GOARCH=386 go build# target and build for OpenBSDenv GOOS=openbsd GOARCH=amd64 go build# target and build for Linux on MIPS CPUsenv GOOS=linux GOARCH=mips64 go build

MyIP uses the following online APIs.

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

I foundSteve Azzopardi's excellentimport "context" post useful for understanding context library in Go.

About

Determine your Internet-facing IP address and location from multiple sources.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp