🔥 Sync 2026-11-07 02:27:09
Merge-upstream / merge (push) Waiting to run

This commit is contained in:
github-actions[bot] committed 2026-11-07 02:27:09 +08:00
1 parent 208c8bf5a2
commit 7eb1d53ed5
12 files changed
+817 -1009

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=26.11.3
PKG_RELEASE:=368
PKG_RELEASE:=369
PKG_PO_VERSION:=$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
@@ -98,7 +98,8 @@ local current_node = map:get(section)
function parseNodeUrl(url) {
let protocol = url.substring(0, url.indexOf("://")) + ":"
let str = "http" + url.substring(url.indexOf("://"))
// 使用 HTTPS 的默认端口 443,避免显式 :80 被 URL 归一化为空。
let str = "https" + url.substring(url.indexOf("://"))
const parsedUrl = new URL(str);
var r = {
hash: parsedUrl.hash, // #asd
@@ -1336,7 +1337,7 @@ local current_node = map:get(section)
let url0 = sstr.substr(0, ploc);
let paramStr = sstr.substr(ploc + 2);
const m = new URL("http://" + b64decsafe(url0));
const m = new URL("https://" + b64decsafe(url0));
if (m.username !== "") {
ssm.security = m.username;
ssm.id = m.password || m.username;
@@ -1655,7 +1656,7 @@ local current_node = map:get(section)
opt.set('type', "sing-box");
}
opt.set(dom_prefix + 'protocol', "tuic");
var _parsedUrl = new URL("http://" + link_split[1]);
var _parsedUrl = new URL("https://" + link_split[1]);
var username = _parsedUrl.username;
var password = _parsedUrl.password;
var hostname = _parsedUrl.hostname;
@@ -1755,7 +1756,7 @@ local current_node = map:get(section)
opt.set('type', "sing-box");
}
opt.set(dom_prefix + 'protocol', "naive");
var _parsedUrl = new URL("http://" + link_split[1]);
var _parsedUrl = new URL("https://" + link_split[1]);
var username = _parsedUrl.username;
var password = _parsedUrl.password;
var hostname = _parsedUrl.hostname;
@@ -547,6 +547,19 @@ local function set_ss_implementation(ss_type, result)
return result
end
-- 拆分 URI 地址和端口,支持省略端口的 IPv6 地址,并去除路径。
local function parse_host_port(host_port, default_port)
local authority = (host_port or ""):gsub("/.*$", "")
local address, port = authority:match("^%[([^%]]+)%]:(.*)$")
if not address then
address = authority:match("^%[([^%]]+)%]$")
end
if not address then
address, port = authority:match("^([^:]+):(.*)$")
end
return address or authority, (port and port ~= "") and port or default_port
end
-- 处理数据
local function processData(szType, content, add_mode, group, sub_cfg)
--log(2, content, add_mode, group)
@@ -642,17 +655,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
info.security = (#id_info > 1 and id_info[1] ~= "") and id_info[1] or "auto"
info.id = id_info[#id_info]
local addr, port = sp[2], "443"
if api.is_ipv6addrport(addr) then
local a, p = addr:match("^%[(.+)%]:(%d+)$")
if a then addr, port = a, p end
addr = api.get_ipv6_only(addr)
else
local host_port = split(addr, ":")
addr = host_port[1]
if #host_port > 1 then port = host_port[#host_port] end
end
info.add, info.port = addr, port
info.add, info.port = parse_host_port(sp[2], "443")
local params = {}
for _, v in pairs(split(Info[2], '&')) do
@@ -844,19 +847,8 @@ local function processData(szType, content, add_mode, group, sub_cfg)
local hostInfo = split(base64Decode(UrlDecode(info)), "@")
if hostInfo and #hostInfo > 0 then
local host_port = hostInfo[#hostInfo]
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
-- SIP002 要求显式端口,不设置缺省值。
result.address, result.port = parse_host_port(host_port)
local userinfo = nil
if #hostInfo > 2 then
@@ -1120,19 +1112,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
result.port = port
params.security = params.security or "tls"
@@ -1269,19 +1249,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
if not params.type then params.type = "tcp" end
params.type = string.lower(params.type)
@@ -1422,19 +1390,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.hysteria_obfs = params.obfsParam
result.hysteria_auth_type = "string"
result.hysteria_auth_password = params.auth
@@ -1471,19 +1427,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.tls_pinSHA256 = params.pcs or params.pinsha256
result.tls_CertByName = params.vcn
@@ -1557,17 +1501,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.tls_disable_sni = params.disable_sni
result.tls_CertByName = params.vcn
@@ -1607,19 +1541,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
result.tls = "0"
if not params.security or params.security == "" then
params.security = "tls"
@@ -1687,17 +1609,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.uot = params.uot
result.naive_insecure_concurrency = params["insecure-concurrency"] or "0"
@@ -1741,20 +1653,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[UrlDecode(v:sub(1, s - 1)):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
result.port = "443"
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.snell_psk = params.psk or result.snell_psk
result.password = params.userkey
result.snell_version = params.version or "4"
+1 -1
View File
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2
PKG_VERSION:=26.11.3
PKG_RELEASE:=170
PKG_RELEASE:=171
PKG_PO_VERSION:=$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
@@ -87,7 +87,8 @@ local current_node = map:get(section)
function parseNodeUrl(url) {
let protocol = url.substring(0, url.indexOf("://")) + ":"
let str = "http" + url.substring(url.indexOf("://"))
// Use HTTPS's default port 443 so URL parsing preserves an explicit :80.
let str = "https" + url.substring(url.indexOf("://"))
const parsedUrl = new URL(str);
var r = {
hash: parsedUrl.hash, // #asd
@@ -1361,7 +1362,7 @@ local current_node = map:get(section)
let url0 = sstr.substr(0, ploc);
let paramStr = sstr.substr(ploc + 2);
const m = new URL("http://" + b64decsafe(url0));
const m = new URL("https://" + b64decsafe(url0));
if (m.username !== "") {
ssm.security = m.username;
ssm.id = m.password || m.username;
@@ -1701,7 +1702,7 @@ local current_node = map:get(section)
opt.set('type', "sing-box");
}
opt.set(dom_prefix + 'protocol', "tuic");
var _parsedUrl = new URL("http://" + link_split[1]);
var _parsedUrl = new URL("https://" + link_split[1]);
var username = _parsedUrl.username;
var password = _parsedUrl.password;
var hostname = _parsedUrl.hostname;
@@ -1801,7 +1802,7 @@ local current_node = map:get(section)
opt.set('type', "sing-box");
}
opt.set(dom_prefix + 'protocol', "naive");
var _parsedUrl = new URL("http://" + link_split[1]);
var _parsedUrl = new URL("https://" + link_split[1]);
var username = _parsedUrl.username;
var password = _parsedUrl.password;
var hostname = _parsedUrl.hostname;
@@ -853,6 +853,19 @@ local function processClashData(content, add_mode, group, sub_cfg)
return results
end
-- Split URI hosts and ports, support IPv6 without a port, and strip paths.
local function parse_host_port(host_port, default_port)
local authority = (host_port or ""):gsub("/.*$", "")
local address, port = authority:match("^%[([^%]]+)%]:(.*)$")
if not address then
address = authority:match("^%[([^%]]+)%]$")
end
if not address then
address, port = authority:match("^([^:]+):(.*)$")
end
return address or authority, (port and port ~= "") and port or default_port
end
-- Processing data
local function processData(szType, content, add_mode, group, sub_cfg)
--log(2, content, add_mode, group)
@@ -948,17 +961,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
info.security = (#id_info > 1 and id_info[1] ~= "") and id_info[1] or "auto"
info.id = id_info[#id_info]
local addr, port = sp[2], "443"
if api.is_ipv6addrport(addr) then
local a, p = addr:match("^%[(.+)%]:(%d+)$")
if a then addr, port = a, p end
addr = api.get_ipv6_only(addr)
else
local host_port = split(addr, ":")
addr = host_port[1]
if #host_port > 1 then port = host_port[#host_port] end
end
info.add, info.port = addr, port
info.add, info.port = parse_host_port(sp[2], "443")
local params = {}
for _, v in pairs(split(Info[2], '&')) do
@@ -1165,19 +1168,8 @@ local function processData(szType, content, add_mode, group, sub_cfg)
local hostInfo = split(base64Decode(UrlDecode(info)), "@")
if hostInfo and #hostInfo > 0 then
local host_port = hostInfo[#hostInfo]
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
-- SIP002 requires an explicit port, so do not supply a default.
result.address, result.port = parse_host_port(host_port)
local userinfo = nil
if #hostInfo > 2 then
@@ -1455,19 +1447,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
result.port = port
@@ -1619,19 +1599,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
if not params.type then params.type = "tcp" end
params.type = string.lower(params.type)
@@ -1787,19 +1755,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = v:sub(s + 1)
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.hysteria_obfs = params.obfsParam
result.hysteria_auth_type = "string"
result.hysteria_auth_password = params.auth
@@ -1835,19 +1791,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.tls_pinSHA256 = params.pcs or params.pinsha256
result.tls_CertByName = params.vcn
@@ -1915,17 +1859,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.tls_disable_sni = params.disable_sni
result.tls_pinSHA256 = params.pcs or params.pinsha256
@@ -1964,19 +1898,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
if host_port:find(":") then
local sp = split(host_port, ":")
port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, port = parse_host_port(host_port, port)
result.tls = "0"
if not params.security or params.security == "" then
params.security = "tls"
@@ -2044,17 +1966,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[v:sub(1, s - 1)] = UrlDecode(v:sub(s + 1))
end
end
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.tls_serverName = params.sni
result.uot = params.uot
result.naive_insecure_concurrency = params["insecure-concurrency"] or "0"
@@ -2098,20 +2010,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
params[UrlDecode(v:sub(1, s - 1)):lower()] = UrlDecode(v:sub(s + 1))
end
end
-- [2001:4860:4860::8888]:443
-- 8.8.8.8:443
result.port = "443"
if host_port:find(":") then
local sp = split(host_port, ":")
result.port = sp[#sp]
if api.is_ipv6addrport(host_port) then
result.address = api.get_ipv6_only(host_port)
else
result.address = sp[1]
end
else
result.address = host_port
end
result.address, result.port = parse_host_port(host_port, "443")
result.snell_psk = params.psk or result.snell_psk
result.password = params.userkey
result.snell_version = params.version or "4"
+1 -1
View File
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vantage
PKG_VERSION:=1.0.16
PKG_RELEASE:=29
PKG_RELEASE:=30
PKG_LICENSE:=GPL-3.0-or-later
LUCI_TITLE:=Vantage dashboard
@@ -781,6 +781,8 @@ h2, h3{
.vt-app .vt-node-ap { justify-self: stretch; align-self: center; padding: 12px; border-color: color-mix(in oklab, var(--vt-accent-line) 40%, var(--vt-line)); }
.vt-app .vt-node-ap .vt-node-ico { background: var(--vt-accent-fill); color: var(--vt-accent-fill-ink); }
.vt-app .vt-node-ap .vt-node-title { font-size: var(--vt-fs-md); }
/* plain text, unlike a radio's: a wider font or language stays inside */
.vt-app .vt-node-ap .vt-node-kicker { display: block; overflow: hidden; text-overflow: ellipsis; }
.vt-app .vt-node-gen { text-transform: none; letter-spacing: 0; font-weight: var(--vt-fw-medium); }
.vt-app .vt-node-radio { padding: 8px 12px; }
.vt-app .vt-node-net, .vt-app .vt-node-net:hover { text-decoration: none; color: var(--vt-text); }
@@ -866,10 +868,17 @@ h2, h3{
.vt-app .vt-branch { display: grid; grid-template-columns: minmax(136px, 172px) minmax(0, 1fr); column-gap: 34px; align-items: center; min-width: 0; }
.vt-app .vt-branch-ssids { display: flex; flex-direction: column; gap: var(--vt-sp-2); min-width: 0; }
.vt-app .vt-branch-ssids .vt-node { max-width: 260px; }
/* a network has no second column: its rates take that room */
.vt-app .vt-branch > .vt-node-net { grid-column: 1 / -1; justify-self: start; width: 100%; max-width: 260px; }
/* medium widths: the rates need their column, and the branches have room to give */
/* medium widths: the rates need their column, and the branches have room
to give; what a radio or the Wired node leads to goes under it, too
narrow beside it */
@container vthero (max-width: 1020px) {
.vt-app .vt-path { grid-template-columns: minmax(150px, 1.05fr) minmax(136px, .9fr) minmax(170px, 1.1fr) minmax(204px, 2fr); }
.vt-app .vt-path { grid-template-columns: minmax(150px, 1.05fr) minmax(136px, .9fr) minmax(190px, 1.1fr) minmax(204px, 2fr); }
.vt-app .vt-branch { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
.vt-app .vt-branch > .vt-node { justify-self: start; min-width: min(200px, 100%); }
.vt-app .vt-branch-ssids { padding-left: 34px; }
}
@container vthero (max-width: 700px) {
.vt-app .vt-path { grid-template-columns: minmax(0, 1fr); gap: 12px; min-height: 0; }
@@ -877,9 +886,6 @@ h2, h3{
.vt-app .vt-link-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-content: flex-start; padding: 0 0 0 44px; }
.vt-app .vt-link-label > * { align-self: center; }
.vt-app .vt-branches { padding-left: 34px; gap: 12px; }
.vt-app .vt-branch { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
.vt-app .vt-branch > .vt-node { justify-self: start; min-width: 200px; }
.vt-app .vt-branch-ssids { padding-left: 34px; }
.vt-app .vt-branch-ssids .vt-node { max-width: none; align-self: stretch; }
/* one column: the main line, its rates, the other lines set in (their
wires join the main line's drop into the device), the device */
@@ -1846,13 +1846,14 @@ return view.extend({
},
/* the nodes the path shows: rebuilt only when this changes (a radio,
SSID or network comes or goes); a poll updates text in place */
SSID, network or wired port comes or goes); a poll updates text in
place */
heroKey: function() {
var m = this.m, lines = '\nlines=' + this.extraLines().map(function(x) { return x.iface; }).join(',');
if (m.wired) return 'w\n' + m.networks.filter(function(n) { return n.up; }).slice(0, 8).map(function(n) { return n.name; }).join('\n') + lines;
var m = this.m, tail = '\nwired=' + this.wiredPorts().join(',') + '\nlines=' + this.extraLines().map(function(x) { return x.iface; }).join(',');
if (m.wired) return 'w\n' + m.networks.filter(function(n) { return n.up; }).slice(0, 8).map(function(n) { return n.name; }).join('\n') + tail;
return 'r\n' + m.radios.map(function(r) {
return r.id + '=' + m.ssids.filter(function(s) { return s.radio === r.id; }).map(function(s) { return s.id; }).join(',');
}).join('\n') + '\nwired=' + this.wiredPorts().join(',') + lines;
}).join('\n') + tail;
},
/* the lines to the internet beside the main one (failover, mwan3;
@@ -2000,26 +2001,26 @@ return view.extend({
h.radios.push(b);
});
if (!h.radios.length) h.branches.appendChild(E('div', { 'class': 'vt-empty-inline' }, [ _('No radios reported') ]));
/* wired hosts downstream: one branch beside the radios, a node
per port */
var ports = this.wiredPorts();
if (ports.length) {
var wb = { id: 'wired', wired: true, ssids: [], title: span('vt-node-title vt-tn'), sub: span('vt-node-sub vt-tn') };
wb.el = E('button', { 'type': 'button', 'class': 'vt-node vt-node-radio', 'click': function() { self.showWired(null); } }, [
E('span', { 'class': 'vt-node-body' }, [ E('span', { 'class': 'vt-node-kicker' }, [ _('Wired') ]), wb.title, wb.sub ])
}
/* wired hosts downstream: one branch beside the radios or the
networks, a node per port; its id is no interface's name */
var ports = this.wiredPorts();
if (ports.length) {
var wb = { id: ':wired', wired: true, ssids: [], title: span('vt-node-title vt-tn'), sub: span('vt-node-sub vt-tn') };
wb.el = E('button', { 'type': 'button', 'class': 'vt-node vt-node-radio', 'click': function() { self.showWired(null); } }, [
E('span', { 'class': 'vt-node-body' }, [ E('span', { 'class': 'vt-node-kicker' }, [ _('Wired') ]), wb.title, wb.sub ])
]);
var wcol = E('div', { 'class': 'vt-branch-ssids' });
ports.forEach(function(p) {
var sn = { id: 'port:' + p, port: p, name: E('span'), count: span('vt-tn'), rate: span('vt-node-sub vt-tn') };
sn.el = E('button', { 'type': 'button', 'class': 'vt-node vt-node-ssid', 'click': function() { self.showWired(p); } }, [
E('span', { 'class': 'vt-node-body' }, [ E('span', { 'class': 'vt-node-title vt-ssid-name' }, [ sn.name ]), E('span', { 'class': 'vt-node-sub' }, [ sn.count ]), sn.rate ])
]);
var wcol = E('div', { 'class': 'vt-branch-ssids' });
ports.forEach(function(p) {
var sn = { id: 'port:' + p, port: p, name: E('span'), count: span('vt-tn'), rate: span('vt-node-sub vt-tn') };
sn.el = E('button', { 'type': 'button', 'class': 'vt-node vt-node-ssid', 'click': function() { self.showWired(p); } }, [
E('span', { 'class': 'vt-node-body' }, [ E('span', { 'class': 'vt-node-title vt-ssid-name' }, [ sn.name ]), E('span', { 'class': 'vt-node-sub' }, [ sn.count ]), sn.rate ])
]);
wb.ssids.push(sn);
wcol.appendChild(sn.el);
});
wb.wrap = E('div', { 'class': 'vt-branch' }, [ wb.el, wcol ]);
h.radios.push(wb);
}
wb.ssids.push(sn);
wcol.appendChild(sn.el);
});
wb.wrap = E('div', { 'class': 'vt-branch' }, [ wb.el, wcol ]);
h.radios.push(wb);
}
h.radios.forEach(function(b) {
h.branches.appendChild(b.wrap);
@@ -2093,6 +2094,7 @@ return view.extend({
var nets = Object.create(null);
m.networks.forEach(function(n) { if (n.up && !nets[n.name]) nets[n.name] = n; });
h.radios.forEach(function(b) {
if (b.wired) { self.updateWiredBranch(b); return; }
var n = nets[b.id];
if (!n) return;
var r = n.dev ? st.devRates[n.dev] : null;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -9,7 +9,7 @@ PKG_NAME:=natmapt
PKG_UPSTREAM_VERSION:=20260214
PKG_UPSTREAM_GITHASH:=
PKG_VERSION:=$(PKG_UPSTREAM_VERSION)$(if $(PKG_UPSTREAM_GITHASH),~$(call version_abbrev,$(PKG_UPSTREAM_GITHASH)))
PKG_RELEASE:=17
PKG_RELEASE:=18
SCRIPTS_VERSION:=0.2026.01.24
PKG_SOURCE_SUBDIR:=$(PKG_UPSTREAM_NAME)-$(PKG_UPSTREAM_VERSION)
@@ -23,7 +23,7 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
else
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/heiher/natmap.git
PKG_SOURCE_VERSION:=b24d590cb413639c0d17783b7377367d398bd996
PKG_SOURCE_VERSION:=87b674e2e00e6478824d835e2e2af68a99085e46
PKG_MIRROR_HASH:=skip
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_SOURCE_VERSION).tar.gz