mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
remove now unused and unnecessary resolving and hostname functions
This commit is contained in:
@ -1,20 +1,5 @@
|
||||
local _M = {}
|
||||
|
||||
function _M.get_hostname()
|
||||
local handler = io.popen ("/bin/hostname")
|
||||
local hostname = handler:read("*a") or ""
|
||||
handler:close()
|
||||
hostname =string.gsub(hostname, "\n$", "")
|
||||
return hostname
|
||||
end
|
||||
|
||||
function _M.resolve_fqdn(fqdn)
|
||||
local handler = io.popen(string.format("dig +short %s | head -1", fqdn))
|
||||
local result = handler:read("*a")
|
||||
handler:close()
|
||||
return result:gsub("\n", "")
|
||||
end
|
||||
|
||||
local secret_bucket_duration = 43200 -- 60 * 60 * 12 -- 12 hours
|
||||
function _M.generate_secret(context, salt, is_applet)
|
||||
local start_sec = core.now()['sec']
|
||||
|
Reference in New Issue
Block a user