mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 19:55:13 +08:00
update 2026-07-16 04:54:23
This commit is contained in:
1 parent
6bc60cfbf2
commit
151daa8c75
42 files changed
+645
-689
No files matched your search
@@ -1329,33 +1329,6 @@ function gen_config(var)
|
||||
return result
|
||||
end
|
||||
|
||||
local nodes_list = {}
|
||||
function get_urltest_batch_nodes(_node)
|
||||
if #nodes_list == 0 then
|
||||
for k, e in ipairs(api.get_valid_nodes()) do
|
||||
if e.node_type == "normal" and (not e.chain_proxy or e.chain_proxy == "") then
|
||||
nodes_list[#nodes_list + 1] = {
|
||||
id = e[".name"],
|
||||
remarks = e["remarks"],
|
||||
group = e["group"]
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
if not _node.node_group or _node.node_group == "" then return {} end
|
||||
local nodes = {}
|
||||
for g in _node.node_group:gmatch("%S+") do
|
||||
g = api.UrlDecode(g)
|
||||
for k, v in pairs(nodes_list) do
|
||||
local gn = (v.group and v.group ~= "") and v.group or "default"
|
||||
if gn:lower() == g:lower() and api.match_node_rule(v.remarks, _node.node_match_rule) then
|
||||
nodes[#nodes + 1] = v.id
|
||||
end
|
||||
end
|
||||
end
|
||||
return nodes
|
||||
end
|
||||
|
||||
function get_node_by_id(node_id)
|
||||
if not node_id or node_id == "" or node_id == "nil" then return nil end
|
||||
if node_id:find("Socks_") then
|
||||
@@ -1377,7 +1350,7 @@ function gen_config(var)
|
||||
-- new urltest
|
||||
local ut_nodes
|
||||
if _node.node_add_mode and _node.node_add_mode == "batch" then
|
||||
ut_nodes = get_urltest_batch_nodes(_node)
|
||||
ut_nodes = api.get_batch_nodes(_node)
|
||||
else
|
||||
ut_nodes = _node.urltest_node
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user