From 5478ca91f26bc004602300cf66731099dcea94b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Oct 2026 13:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=8B=20Sync=202026-10-07=2013:35:16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-open-box/Makefile | 4 +- luci-app-passwall/Makefile | 2 +- .../cbi/passwall/client/type/1_sing-box.lua | 12 +++--- .../model/cbi/passwall/client/type/2_xray.lua | 12 +++--- .../cbi/passwall/client/type/5_hysteria2.lua | 12 +++--- luci-app-passwall/luasrc/passwall/api.lua | 39 ------------------- .../luasrc/passwall/util_hysteria2.lua | 4 +- .../luasrc/passwall/util_sing-box.lua | 4 +- .../luasrc/passwall/util_xray.lua | 4 +- .../root/usr/share/passwall/rule_update.lua | 2 +- .../resources/view/network/wireless.js | 18 ++++++--- 11 files changed, 40 insertions(+), 73 deletions(-) diff --git a/luci-app-open-box/Makefile b/luci-app-open-box/Makefile index f2d9f56b7..dd7b076cd 100644 --- a/luci-app-open-box/Makefile +++ b/luci-app-open-box/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-open-box -PKG_VERSION:=0.1.291 -PKG_RELEASE:=14 +PKG_VERSION:=0.1.292 +PKG_RELEASE:=15 PKG_MAINTAINER:=liandu2024 PKG_LICENSE:=GPL-3.0-or-later diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 657d6a9eb..4e6e4b614 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=26.10.4 -PKG_RELEASE:=318 +PKG_RELEASE:=319 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua index 2e214d5e7..a24b734d0 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua @@ -462,14 +462,14 @@ if singbox_tags:find("with_quic") then o = s:option(Value, "hysteria2_down_mbps", translate("Max download Mbps")) o:depends({ protocol = "hysteria2" }) - o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window")) - o.datatype = "uinteger" - o.placeholder = "8388608" + o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window") .. " (MB)") + o.datatype = "range(1,1000)" + o.placeholder = "8" o:depends({ protocol = "hysteria2" }) - o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window")) - o.datatype = "uinteger" - o.placeholder = "20971520" + o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window") .. " (MB)") + o.datatype = "range(1,1000)" + o.placeholder = "20" o:depends({ protocol = "hysteria2" }) o = s:option(Value, "hysteria2_idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/2_xray.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/2_xray.lua index 88bb72128..4e07e0045 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/2_xray.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/2_xray.lua @@ -393,14 +393,14 @@ o:depends({ protocol = "hysteria2" }) o = s:option(Value, "hysteria2_down_mbps", translate("Max download Mbps")) o:depends({ protocol = "hysteria2" }) -o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window")) -o.datatype = "uinteger" -o.placeholder = "8388608" +o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window") .. " (MB)") +o.datatype = "range(1,1000)" +o.placeholder = "8" o:depends({ protocol = "hysteria2" }) -o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window")) -o.datatype = "uinteger" -o.placeholder = "20971520" +o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window") .. " (MB)") +o.datatype = "range(1,1000)" +o.placeholder = "20" o:depends({ protocol = "hysteria2" }) o = s:option(Value, "hysteria2_idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/5_hysteria2.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/5_hysteria2.lua index e57fedfe3..1ab16104e 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/5_hysteria2.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/5_hysteria2.lua @@ -109,14 +109,14 @@ o.rewrite_option = o.option o = s:option(Value, "down_mbps", translate("Max download Mbps")) o.rewrite_option = o.option -o = s:option(Value, "stream_recv_win", translate("QUIC stream receive window")) -o.datatype = "uinteger" -o.placeholder = "8388608" +o = s:option(Value, "stream_recv_win", translate("QUIC stream receive window") .. " (MB)") +o.datatype = "range(1,1000)" +o.placeholder = "8" o.rewrite_option = o.option -o = s:option(Value, "conn_recv_win", translate("QUIC connection receive window")) -o.datatype = "uinteger" -o.placeholder = "20971520" +o = s:option(Value, "conn_recv_win", translate("QUIC connection receive window") .. " (MB)") +o.datatype = "range(1,1000)" +o.placeholder = "20" o.rewrite_option = o.option o = s:option(Value, "idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)") diff --git a/luci-app-passwall/luasrc/passwall/api.lua b/luci-app-passwall/luasrc/passwall/api.lua index a9e81adf7..4abd41063 100644 --- a/luci-app-passwall/luasrc/passwall/api.lua +++ b/luci-app-passwall/luasrc/passwall/api.lua @@ -261,16 +261,6 @@ function get_domain_port_from_url(url) return domain, port end ---解析域名 -function domainToIPv4(domain, dns) - local Dns = dns or "223.5.5.5" - local IPs = luci.sys.exec('nslookup %s %s | awk \'/^Name:/{getline; if ($1 == "Address:") print $2}\'' % { domain, Dns }) - for IP in string.gmatch(IPs, "%S+") do - if datatypes.ipaddr(IP) and not datatypes.ip6addr(IP) then return IP end - end - return nil -end - function curl_base(url, file, args) if not args then args = {} end if file then @@ -300,35 +290,6 @@ function curl_logic(url, file, args) return return_code, result end -function curl_direct(url, file, args) - --直连访问 - local chn_list = uci_get_c("@global[0]", "chn_list") or "direct" - local Dns = (chn_list == "proxy") and "1.1.1.1" or "223.5.5.5" - if not args then args = {} end - local tmp_args = clone(args) - local domain, port = get_domain_port_from_url(url) - if domain then - local ip = domainToIPv4(domain, Dns) - if ip then - tmp_args[#tmp_args + 1] = "--resolve " .. domain .. ":" .. port .. ":" .. ip - end - end - return curl_base(url, file, tmp_args) -end - -function curl_auto(url, file, args) - local localhost_proxy = uci_get_c("@global[0]", "localhost_proxy") or "1" - if localhost_proxy == "1" then - return curl_base(url, file, args) -- 当路由器本机开启代理时,采用passwall规则进行访问 - else - local return_code, result = curl_proxy(url, file, args) - if not return_code or return_code ~= 0 then - return_code, result = curl_direct(url, file, args) - end - return return_code, result - end -end - function url(...) local url = string.format("admin/services/%s", appname) local args = { ... } diff --git a/luci-app-passwall/luasrc/passwall/util_hysteria2.lua b/luci-app-passwall/luasrc/passwall/util_hysteria2.lua index 110e58fbd..51924690d 100644 --- a/luci-app-passwall/luasrc/passwall/util_hysteria2.lua +++ b/luci-app-passwall/luasrc/passwall/util_hysteria2.lua @@ -144,8 +144,8 @@ function gen_config(var) ech = (node.ech == "1") and node.ech_config or nil }, quic = { - initStreamReceiveWindow = node.hysteria2_stream_recv_win and tonumber(node.hysteria2_stream_recv_win) or nil, - initConnReceiveWindow = node.hysteria2_conn_recv_win and tonumber(node.hysteria2_conn_recv_win) or nil, + initStreamReceiveWindow = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)*1048576 or nil, + initConnReceiveWindow = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)*1048576 or nil, maxIdleTimeout = (function(t) t = tonumber(tostring(t or "30"):match("^%d+")) return (t and t >= 4 and t <= 120) and t .. "s" or "30s" diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index d1d2338d2..6ed462bb3 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -630,8 +630,8 @@ function gen_outbound(flag, node, tag, proxy_table) t = tonumber(tostring(t or "0"):match("^%d+")) return (t and t >= 2 and t <= 60) and t .. "s" or nil end)(node.hysteria2_keep_alive_period), - stream_receive_window = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)/1048576 .. " MB" or nil, - connection_receive_window = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)/1048576 .. " MB" or nil, + stream_receive_window = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win) .. " MB" or nil, + connection_receive_window = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win) .. " MB" or nil, disable_path_mtu_discovery = version_ge_1_14_0 and (node.hysteria2_disable_mtu_discovery == "1") or nil, tls = tls, realm = node.hysteria2_realms and (function() diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index e48c7e1d9..9f7bd666c 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -389,8 +389,8 @@ function gen_outbound(flag, node, tag, proxy_table) return (t and t >= 2 and t <= 60) and t or nil end)(node.hysteria2_keep_alive_period), disablePathMTUDiscovery = node.hysteria2_disable_mtu_discovery == "1", - initStreamReceiveWindow = node.hysteria2_stream_recv_win and tonumber(node.hysteria2_stream_recv_win) or nil, - initConnectionReceiveWindow = node.hysteria2_conn_recv_win and tonumber(node.hysteria2_conn_recv_win) or nil, + initStreamReceiveWindow = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)*1048576 or nil, + initConnectionReceiveWindow = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)*1048576 or nil, } end if fragment and fragment_table and ({raw=1, ws=1, httpupgrade=1, grpc=1, xhttp=1})[TP] then diff --git a/luci-app-passwall/root/usr/share/passwall/rule_update.lua b/luci-app-passwall/root/usr/share/passwall/rule_update.lua index 5f5ffeb52..96fd00bc0 100755 --- a/luci-app-passwall/root/usr/share/passwall/rule_update.lua +++ b/luci-app-passwall/root/usr/share/passwall/rule_update.lua @@ -111,7 +111,7 @@ local function curl(url, file) if file then args[#args + 1] = "-o " .. file end - local return_code, result = api.curl_auto(url, nil, args) + local return_code, result = api.curl_logic(url, nil, args) if result and result ~= "" then local body, code = result:match("^(.-)%s*([0-9]+)$") if code then diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 1ae831791..cb5208bb8 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -596,14 +596,20 @@ function getDisplayEncryption(radioNet) { } function getDisplayBSSID(radioNet) { - const bssid = uci.get('wireless', radioNet.getName(), 'macaddr') || - uci.get('wireless', radioNet.getWifiDeviceName(), 'macaddr') || - radioNet.getBSSID() || radioNet.getActiveBSSID(); + // A radio MAC may differ from the BSSID of an individual virtual AP. + const candidates = [ + radioNet.getActiveBSSID(), + radioNet.getBSSID(), + uci.get('wireless', radioNet.getName(), 'macaddr') + ]; - if (bssid && bssid != '00:00:00:00:00:00') - return String(bssid).toUpperCase(); + for (const bssid of candidates) + if (typeof bssid == 'string' && + /^(?:[0-9a-f]{2}:){5}[0-9a-f]{2}$/i.test(bssid) && + bssid != '00:00:00:00:00:00') + return bssid.toUpperCase(); - return bssid || null; + return null; } function getFtIdentifier(radioNet) {