class Sparoid::PublicIP

Defined in:

public_ip.cr

Constant Summary

CACHE_PATH = ENV.fetch("SPAROID_CACHE_PATH", "/tmp/.sparoid_public_ip")

Class Method Summary

Class Method Detail

def self.by_dns : StaticArray(UInt8, 4) #

https://code.blogs.iiidefix.net/posts/get-public-ip-using-dns/


[View source]
def self.by_http : StaticArray(UInt8, 4) #

ifconfig.co/ip is another option


[View source]