ScalewayDDNS::IP
Inherits Reference < Object
The IP class provides methods to retrieve the current external IP address using an API.
Constants
IP_API_HOST_V4 = "api.ipify.org"
IP_API_HOST_V6 = "api6.ipify.org"
Class methods
current_ips(ipv4 : Bool = true, ipv6 : Bool = false) : Hash(String, String)
Returns a hash of enabled IP versions and their addresses, e.g. {"ipv4" => "1.2.3.4", "ipv6" => "::1"}