From 24d2f10e7a37c87bb00b431016e9e019f16d2aca Mon Sep 17 00:00:00 2001 From: gitea-action Date: Fri, 18 Apr 2025 22:30:28 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/ace83350834e7ab409154fa4f95e0f8a811863f1 --- .../luasrc/model/cbi/passwall/client/node_list.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua index 61dd830f9..208f7e362 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua @@ -27,7 +27,7 @@ local show_node_info = m:get("@global_other[0]", "show_node_info") or "0" if auto_detection_time ~= "0" then local node_count = 0 for k, e in ipairs(api.get_valid_nodes()) do - if e.protocol ~= "_shunt" and e.protocol ~= "_balancing" and e.protocol ~= "_urltest" and e.protocol ~= "_iface" then + if e.node_type == "normal" then node_count = node_count + 1 end end @@ -168,8 +168,10 @@ o = s:option(DummyValue, "ping", "Ping") o.width = "8%" o.rawhtml = true o.cfgvalue = function(t, n) - local protocol = m:get(n, "protocol") - if protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface" then + local type = m:get(n, "type") or "" + local protocol = m:get(n, "protocol") or "" + if (type == "sing-box" or type == "Xray") and + (protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface") then return string.format('---', n) end if auto_detection_time ~= "icmp" then @@ -184,8 +186,10 @@ o = s:option(DummyValue, "tcping", "TCPing") o.width = "8%" o.rawhtml = true o.cfgvalue = function(t, n) - local protocol = m:get(n, "protocol") - if protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface" then + local type = m:get(n, "type") or "" + local protocol = m:get(n, "protocol") or "" + if (type == "sing-box" or type == "Xray") and + (protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface") then return string.format('---', n) end if auto_detection_time ~= "tcping" then