mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-02 17:03:56 +08:00
update 2026-10-28 21:59:16
This commit is contained in:
1 parent
d27d8dcd9f
commit
f01306d457
121 files changed
+16870
-88
No files matched your search
@@ -192,12 +192,12 @@ function socks_autoswitch_add_node()
|
||||
uci_set(id, "enable_autoswitch", "1")
|
||||
local new_list = uci_get(id, "autoswitch_backup_node") or {}
|
||||
for i = #new_list, 1, -1 do
|
||||
if (uci_get(new_list[i], "remarks") or ""):find(key) then
|
||||
if (uci_get(new_list[i], "remarks") or ""):find(key, 1, true) then
|
||||
table.remove(new_list, i)
|
||||
end
|
||||
end
|
||||
for k, e in ipairs(api.get_valid_nodes()) do
|
||||
if e.node_type == "normal" and e["remark"]:find(key) then
|
||||
if e.node_type == "normal" and e["remark"]:find(key, 1, true) then
|
||||
table.insert(new_list, e.id)
|
||||
end
|
||||
end
|
||||
@@ -214,7 +214,7 @@ function socks_autoswitch_remove_node()
|
||||
uci_set(id, "enable_autoswitch", "1")
|
||||
local new_list = uci_get(id, "autoswitch_backup_node") or {}
|
||||
for i = #new_list, 1, -1 do
|
||||
if (uci_get(new_list[i], "remarks") or ""):find(key) then
|
||||
if (uci_get(new_list[i], "remarks") or ""):find(key, 1, true) then
|
||||
table.remove(new_list, i)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user