opendnsmyip: A Go package to return the public-facing IPv4 address of the client (by querying the Cisco OpenDNS servers).

Jeffrey H. Johnson 8e42193f50 Merge pull request #17 from johnsonjh/dependabot/go_modules/github.com/miekg/dns-1.1.58 2 months ago
.github 8ed14cab3c Merge pull request #36 from gridfinity/remove>shiftleft 3 years ago
.deepsource.toml 61b5949480 Update .deepsource.toml 2 years ago
.gitattributes ab96342e33 Add .gitattributes: GitHub linguist vendoring 3 years ago
.gitignore 76715630b9 Initial commit. 7 years ago
.gitlab-ci.yml 419f30d46f Bump deps, update leaktestfe, revise CI/CD config 3 years ago
.mergify.yml ab66da024b Mergify: configuration update 3 years ago
.opendnsmyip_root b583964457 multi: CI/CD integration, code coverage reporting 3 years ago
.whitesource d8be057a52 Update .whitesource 3 years ago
LICENSE 7ceb7be0f7 multi: use github for imports, etc. 3 years ago
README.md 399d713382 Update README.md 2 years ago
SECURITY.md 7ceb7be0f7 multi: use github for imports, etc. 3 years ago
cov_report.sh 61c5509778 cov: Warn cov_report.sh is not POSIX compliant 3 years ago
go.mod dab664797e Bump github.com/miekg/dns from 1.1.57 to 1.1.58 2 months ago
go.sum dab664797e Bump github.com/miekg/dns from 1.1.57 to 1.1.58 2 months ago
opendnsmyip.go fdcddf8455 Update dependencies, import paths, tag format, etc 3 years ago
opendnsmyip_license_test.go 7ceb7be0f7 multi: use github for imports, etc. 3 years ago
opendnsmyip_test.go fdcddf8455 Update dependencies, import paths, tag format, etc 3 years ago
opendnsmyip_testutil_test.go 7ceb7be0f7 multi: use github for imports, etc. 3 years ago
renovate.json 08b4d4fcef Add renovate.json 1 year ago

README.md

opendnsmyip

GRC

A Go package that returns the public-facing IPv4 address of the client by querying the Cisco OpenDNS servers.

Original Authors

Credits

This package was inspired by:

License

Usage

package main

import (
        "fmt"

        myip "github.com/johnsonjh/opendnsmyip"
)

func main() {
        myIpAddr, err := myip.GetIP()
        if err != nil {
                fmt.Errorf(
                           "Error getting IPv4 address: %v",
                           err,
                          )
        } else {
                fmt.Printf(
                           "Public IPv4 address is: %s",
                           myIpAddr,
                          )
        }
}