Get ip address with Golang on your computer/system

Get IP Address with Golang

Go

Get IP address(es) with go-lang is a simple command line tool to get your IP address vpn, internal, external, etc.

Usage

getipinfo -h
A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.

Usage:
  getipinfo [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  external    Get external ip information
  help        Help about any command
  internal    Get internal ip information
  version     Show ipinfo version information
  vpn         Get vpn ip information

Flags:
  -h, --help     help for getipinfo
  -t, --toggle   Help message for toggle

Use "getipinfo [command] --help" for more information about a command.

External IP:

getipinfo external
External ip address: xx.xx.xx.xx

Internal IP:

getipinfo internal
VPN ip address: 192.168.1.49

VPN IP:

getipinfo vpn
VPN ip address: xx.xx.xx.xx
  • How to install getipinfo
go install github.com/masum0813/getipinfo@latest
go get -u github.com/spf13/cobra@latest
go install github.com/spf13/cobra-cli@latest

Cobra Generator

https://github.com/spf13/cobra-cli/blob/main/README.md

https://cobra.dev

cobra-cli usage

cobra-cli init
go run main.go
cobra-cli add internal

References

https://github.com/GlenDC/go-external-ip

https://dev.to/koddr/github-action-for-release-your-go-projects-as-fast-and-easily-as-possible-20a2

Similar Resources

Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes.

DNS-Updater Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes. Motivation Havin

Mar 10, 2022

Network address types

netaddr What This is a package containing a new IP address type for Go. See its docs: https://pkg.go.dev/inet.af/netaddr Motivation See https://tailsc

Dec 28, 2022

A simple tool for retrieving a request's IP address on the server.

reqip A simple tool for retrieving a request's IP address on the server. Inspired from request-ip Installation Via go get go get github.com/mo7zayed/r

Oct 26, 2022

An Yggdrasil address miner in Go

SimpleYggGen-Go This program reimplements SimpleYggGen in Go, importing the original Yggdrasil code for generating keys and utilizing multiple CPU thr

Apr 21, 2022

Serverless Lightning Address server

Addressless Put a Lightning Address "server" on a serverless host like Vercel. The code is heavily borrowed from satdress, minus the federated part. T

Aug 29, 2022

Shrek is a vanity .onion address generator written in Go.

Shrek is a vanity .onion address generator written in Go.

Shrek Shrek is a vanity .onion address generator written in Go. Usage (CLI) Shrek compiles to a single binary that can be used on the CLI. To build an

Aug 16, 2022

checkip is a CLI tool and library that checks an IP address using various public services.

checkip is a CLI tool and library that checks an IP address using various public services.

checkip is a CLI tool and library that checks an IP address using various public services.

Dec 20, 2022

A small library to detect if an IP address is close to yours

go-geofence A small library to detect if an IP address is close to yours or another of your choosing using https://ipstack.com/ Usage First you will n

Aug 10, 2022

A small tool used to correspond to the IP address according to the name, id, and network alias of the docker container, which can be run as a DNS server

A small tool used to correspond to the IP address according to the name, id, and network alias of the docker container, which can be run as a DNS server

Apr 4, 2022
Gopi - Simple API for get geo information about your IP Address, Build by go-fiber

gopi Simple API to get information from your IP Address Idea This idea come from IP zxq and literaly i clone it How to download GeoIP2 ? Remember to c

May 27, 2022
Take an IP address and quickly get the reverse PTR

FlipIP Just a little quick app to take an IP (or set of IPs), and convert them to reverse IP pointers Example: $ flipip 1.2.3.4 4.3.2.1.in-addr.arpa.

Feb 27, 2022
Deskreen turns any device with a web browser into a secondary screen for your computer
Deskreen turns any device with a web browser into a secondary screen for your computer

Deskreen Website: https://deskreen.com ▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage) Deskreen turns an

Jan 7, 2023
Running Golang on the Internet Computer?...
Running Golang on the Internet Computer?...

Golang on the Internet Computer Running Golang on the Internat Computer?! Yes, it is possible! This repository contains a simple example that shows ho

Jun 13, 2022
Go setup - Setting up Golang on my computer

This is my Journey Of Learning Go in 2022 I am going to first get some backgroun

Feb 4, 2022
A library for the MIGP (Might I Get Pwned) protocolA library for the MIGP (Might I Get Pwned) protocol

MIGP library This contains a library for the MIGP (Might I Get Pwned) protocol. MIGP can be used to build privacy-preserving compromised credential ch

Dec 3, 2022
Easily and securely send things from one computer to another :crocodile: :package:
Easily and securely send things from one computer to another :crocodile: :package:

This project is supported by: croc is a tool that allows any two computers to simply and securely transfer files and folders. AFAIK, croc is the only

Jan 3, 2023
Go pkg for returning your public facing IP address.

#publicip This package returns the public facing IP address of the calling client (a la https://icanhazip.com, but from Go!) Author James Polera james

Nov 21, 2022
⚡ 🖥️ 👾 Host your own Lightning Address on LND

⚡ ??️ ?? Host your own Lightning Address on LND Lighting Wallets like BlueWallet, Blixt and many more allow us to send sats to Lighting Addresses like

Dec 22, 2022
Automatically update your Windows hosts file with the WSL2 VM IP address

Automatically update your Windows hosts file with the WSL2 VM IP address

Jan 9, 2023