How do I override public DNS?

If you are looking to override public DNS settings for you domain, you can do that with the util.dns_remap function. This is equivalent to modifying the hosts file on operating systems to override DNS lookups. 

-- Remap to IP
util.dns_remap("", "")
-- All requests to will now be sent to
local response = http.request_batch({ {"GET", ""}
})"IP used: " .. response[1].ip)

Note: If any other port than the default port 80 is targeted the port number has to be specified. For https this means the port 443 must be specified. 


-- Make sure clients that load things from (port 80 and 443) connects to
util.dns_remap("", "")
util.dns_remap("", "")

Feedback and Knowledge Base