getip

A micro-package for getting your IP address, either the local/internal or the public/external one. Currently only IPv4 addresses are supported.

Installation

The development version is maintained on GitHub:

remotes::install_github("wrathematics/getip")

Usage

To get your local (internal) IP address:

getip::getip("internal")

To get your public (external) IP address:

getip::getip("external")

The argument is case-insensitive and operates by partial matching. So if you’re very lazy, you can just type getip("e") for the external IP.