💋 Sync 2026-10-16 23:55:30

This commit is contained in:
github-actions[bot] committed 2026-10-16 23:55:30 +08:00
1 parent 76f10c2a74
commit 1849cc6156
254 files changed
+25484 -8840

No files matched your search

+5 -3
View File
@@ -178,9 +178,11 @@ function get_cache_var(key)
return val
end
function get_new_port()
local cmd_format = ". /usr/share/passwall/utils.sh ; echo -n $(get_new_port %s tcp,udp)"
return tonumber(sys.exec(string.format(cmd_format, "auto")))
function get_new_port(start_port, protocol)
start_port = tonumber(start_port) or "auto"
if protocol ~= "tcp" and protocol ~= "udp" then protocol = "tcp,udp" end
local cmd_format = ". /usr/share/passwall/utils.sh ; echo -n $(get_new_port %s %s)"
return tonumber(sys.exec(string.format(cmd_format, util.shellquote(tostring(start_port)), util.shellquote(protocol))))
end
function exec_call(cmd)