update 2026-08-31 18:23:00

This commit is contained in:
action committed 2026-08-31 18:23:00 +08:00
1 parent be2557c9dc
commit f959ff8b68
1959 files changed
+24 -1523250

No files matched your search

@@ -6,9 +6,7 @@ local fs = api.fs
local uci = api.uci
local sys = api.sys
local log = function(...)
api.log(...)
end
local log = api.log
function get_ip_port_from(str)
local result_port = sys.exec("echo -n " .. str .. " | sed -n 's/^.*[:#]\\([0-9]*\\)$/\\1/p'")
@@ -19,13 +17,13 @@ end
local var = api.get_args(arg)
local haproxy_path = var["-path"]
local haproxy_conf = var["-conf"]
local haproxy_dns = var["-dns"] or "119.29.29.29:53,223.5.5.5:53"
local haproxy_dns = "127.0.0.1"
local cpu_thread = sys.exec('echo -n $(cat /proc/cpuinfo | grep "processor" | wc -l)') or "1"
local health_check_type = api.uci_get_c("@global_haproxy[0]", "health_check_type") or "tcp"
local health_check_inter = api.uci_get_c("@global_haproxy[0]", "health_check_inter") or "20"
local balancingStrategy = api.uci_get_c("@global_haproxy[0]", "balancingStrategy") or "roundrobin"
local console_port = api.uci_get_c("@global_haproxy[0]", "console_port")
local console_port = api.uci_get_c("@global_haproxy[0]", "console_port") or "1188"
local bind_local = api.uci_get_c("@global_haproxy[0]", "bind_local") or "0"
local bind_address = "0.0.0.0"
if bind_local == "1" then bind_address = "127.0.0.1" end
@@ -54,7 +52,7 @@ defaults
log global
option tcplog
option dontlognull
option http-server-close
option abortonclose
#option forwardfor except 127.0.0.0/8
option redispatch
retries 2