mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 18:44:03 +08:00
🎨 Sync 2026-10-28 21:57:13
This commit is contained in:
1 parent
a76462cafd
commit
b21929fceb
27 files changed
+275
-246
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.10.22
|
||||
PKG_RELEASE:=352
|
||||
PKG_RELEASE:=353
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1503,11 +1503,6 @@ function to_move(app_name,file)
|
||||
}
|
||||
end
|
||||
|
||||
local flag = sys.call('busybox pgrep -af "passwall/.*'.. app_name ..'" >/dev/null')
|
||||
if flag == 0 then
|
||||
sys.call("/etc/init.d/passwall stop")
|
||||
end
|
||||
|
||||
local old_app_size = 0
|
||||
if fs.access(app_path) then
|
||||
old_app_size = get_file_space(app_path)
|
||||
@@ -1523,6 +1518,11 @@ function to_move(app_name,file)
|
||||
end
|
||||
end
|
||||
|
||||
local flag = sys.call('busybox pgrep -af "passwall/.*'.. app_name ..'" >/dev/null')
|
||||
if flag == 0 then
|
||||
sys.call("/etc/init.d/passwall stop")
|
||||
end
|
||||
|
||||
result = exec("/bin/mv", { "-f", bin_path, app_path }, nil, command_timeout) == 0
|
||||
|
||||
remove(rm_tmp)
|
||||
|
||||
@@ -9,13 +9,13 @@ local api = map.api
|
||||
function add_node_by_key() {
|
||||
var key = prompt("<%:Please enter the node keyword, pay attention to distinguish between spaces, uppercase and lowercase.%>", "");
|
||||
if (key) {
|
||||
window.location.href = '<%=api.url("socks_autoswitch_add_node")%>' + "?id=" + socks_id + "&key=" + key;
|
||||
window.location.href = '<%=api.url("socks_autoswitch_add_node")%>' + "?id=" + encodeURIComponent(socks_id) + "&key=" + encodeURIComponent(key);
|
||||
}
|
||||
}
|
||||
function remove_node_by_key() {
|
||||
var key = prompt("<%:Please enter the node keyword, pay attention to distinguish between spaces, uppercase and lowercase.%>", "");
|
||||
if (key) {
|
||||
window.location.href = '<%=api.url("socks_autoswitch_remove_node")%>' + "?id=" + socks_id + "&key=" + key;
|
||||
window.location.href = '<%=api.url("socks_autoswitch_remove_node")%>' + "?id=" + encodeURIComponent(socks_id) + "&key=" + encodeURIComponent(key);
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
|
||||
Reference in new issue
Block a user