Skip to content

jessegalley/myip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myip

Reliably determine a host's WAN IP by querying several well known IP echo services.

To include in your own project:

import  "github.com/jessegalley/myip"
    
MyIP := myip.NewMyIP() 
ip, err := MyIP.Get() // returns net.IP
if err != nil {
    fmt.Println(err)
}

fmt.Println(ip.String())

To build and run the binary:

make build 

./bin/myip [-v[vv], -n]

About

A package for reliably determining a host's WAN IP, as well as a CLI tool to execute it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors