class IPv6
- IPv6
- Reference
- Object
Defined in:
ipv6.crConstant Summary
-
GOOGLE_DNS =
Socket::IPAddress.new("2001:4860:4860::8888", 53)
Class Method Summary
-
.global?(ip : String) : Bool
Check if an IPv6 address is globally reachable.
-
.public_ipv6 : String | Nil
Get the public IPv6 address by asking the OS which source address it would use to reach a well-known IPv6 destination.
Class Method Detail
def self.global?(ip : String) : Bool
#
Check if an IPv6 address is globally reachable. Based on Rust std::net::Ipv6Addr::is_global (IETF RFC 4291, RFC 6890, etc.) ameba:disable Metrics/CyclomaticComplexity
def self.public_ipv6 : String | Nil
#
Get the public IPv6 address by asking the OS which source address it would use to reach a well-known IPv6 destination. Returns nil if no global IPv6 address is available.