class ScalewayDDNS::IP

Overview

The IP class provides methods to retrieve the current external IP address using an API.

Defined in:

scaleway_ddns/ip.cr

Constant Summary

IP_API_HOST_V4 = "api.ipify.org"
IP_API_HOST_V6 = "api6.ipify.org"

Class Method Summary

Class Method Detail

def self.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"}