my_ip: Query the computer's public IP address

View source: R/my-ip.R

my_ipR Documentation

Query the computer's public IP address

Description

It can use a DNS query to opendns.com, if method == "dns", or an HTTPS query to icanhazip.com, see https://github.com/major/icanhaz. The DNS query is much faster, the HTTPS query is secure.

Usage

my_ip(method = c("dns", "https"))

Arguments

method

Whether to use a DNS or HTTPS query.

Value

Computer's public IP address as a string.

Examples


my_ip()
my_ip(method = "https")


pingr documentation built on May 29, 2024, 12:05 p.m.