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 208f7e362..33587b183 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 @@ -14,7 +14,6 @@ o = s:option(ListValue, "auto_detection_time", translate("Automatic detection de o:value("0", translate("Close")) o:value("icmp", "Ping") o:value("tcping", "TCP Ping") -o.description = translate("To optimize performance, auto-detection is disabled when there are more than 30 nodes.") o = s:option(Flag, "show_node_info", translate("Show server address and port")) o.default = "0" @@ -24,24 +23,6 @@ s:append(Template(appname .. "/node_list/link_add_node")) local auto_detection_time = m:get("@global_other[0]", "auto_detection_time") or "0" 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.node_type == "normal" then - node_count = node_count + 1 - end - end - if node_count > 30 then auto_detection_time = "0" end -end - --- Pass the auto_detection_time global variable to the webpage -local o = s:option(DummyValue, "_auto_detection_time") -o.rawhtml = true -o.default = string.format([[ - -]], auto_detection_time) -- [[ Node List ]]-- s = m:section(TypedSection, "nodes") @@ -168,17 +149,13 @@ o = s:option(DummyValue, "ping", "Ping") o.width = "8%" o.rawhtml = true o.cfgvalue = function(t, n) - 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 + local result = "---" if auto_detection_time ~= "icmp" then - return string.format('%s', n, translate("Test")) + result = string.format('%s', n, translate("Test")) else - return string.format('---', n) + result = string.format('---', n) end + return result end ---- TCP Ping @@ -186,17 +163,13 @@ o = s:option(DummyValue, "tcping", "TCPing") o.width = "8%" o.rawhtml = true o.cfgvalue = function(t, n) - 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 + local result = "---" if auto_detection_time ~= "tcping" then - return string.format('%s', n, translate("Test")) + result = string.format('%s', n, translate("Test")) else - return string.format('---', n) + result = string.format('---', n) end + return result end o = s:option(DummyValue, "_url_test", translate("URL Test")) diff --git a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm index d94416802..ef64abace 100644 --- a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm +++ b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm @@ -46,7 +46,8 @@ table td, .table .td {