Tools to Determine Your Public ‘IP’ Address(es)
It is often necessary to know the ‘IPv4’ and/or ‘IPv6’ external addresses of a workstation for ‘API’ calls. Functions are provided to use one or more external services to accomplish this task along with a wrapper function that can return results from multiple services or use a random service.
The following functions are implemented:
myip/ip_external: Wrapper function for getting your IP addressakamai: Use whatismyip.akamai.com to retrieve public IP addressamazon: Use checkip.amazonaws.com to retrieve public IP addresshttpbin: Use httpbin.org to retrieve public IP addressicanhazip: Use icanhazip to retrieve public IP addressipecho: Use ipecho.net/plain to retrieve public IP addressipinfo: Use ipinfo.io/ip to retrieve public IP addressopendns: Use checkip.dyndns.org to retrieve public IP address
devtools::install_git("https://git.sr.ht/~hrbrmstr/myip")
# OR
devtools::install_git("https://gitlab.com/hrbrmstr/myip")
# OR
devtools::install_git("https://github.com/hrbrmstr/myip")library(myip)
# current verison
packageVersion("myip")
## [1] '0.2.0'
akamai()
httpbin()
myip("all")
## [[1]]
## (akamai) Public IPv4 Address: 174.62.167.97
##
## [[2]]
## (amazon) Public IPv4 Address: 174.62.167.97
##
## [[3]]
## (httpbin) Public IPv4 Address: 174.62.167.97
##
## [[4]]
## (icanhazip) Public IPv4 Address: 174.62.167.97
##
## [[5]]
## (ipecho) Public IPv4 Address: 174.62.167.97
##
## [[6]]
## (ipinfo) Public IPv4 Address: 174.62.167.97
##
## [[7]]
## (opendns) Public IPv4 Address: 174.62.167.97| Lang | # Files | (%) | LoC | (%) | Blank lines | (%) | # Lines | (%) |
|---|---|---|---|---|---|---|---|---|
| R | 14 | 0.93 | 106 | 0.86 | 66 | 0.75 | 98 | 0.72 |
| Rmd | 1 | 0.07 | 17 | 0.14 | 22 | 0.25 | 38 | 0.28 |
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.