From e07073952b47b04e685b4324ac2d814791b846ff Mon Sep 17 00:00:00 2001 From: actions-user Date: Mon, 5 Aug 2024 00:12:37 +0800 Subject: [PATCH] update 2024-08-05 00:12:37 --- .../model/cbi/passwall/client/node_list.lua | 11 +++++++++++ luci-app-passwall/luasrc/passwall/api.lua | 16 +++++++++++++++- luci-app-passwall/luasrc/passwall/com.lua | 4 +++- 3 files changed, 29 insertions(+), 2 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 b37587f5..5fedaa2e 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 @@ -108,9 +108,20 @@ o.cfgvalue = function(t, n) protocol = "VMess" elseif protocol == "vless" then protocol = "VLESS" + elseif protocol == "shadowsocks" then + protocol = "SS" + elseif protocol == "shadowsocksr" then + protocol = "SSR" + elseif protocol == "wireguard" then + protocol = "WG" + elseif protocol == "hysteria" then + protocol = "HY" + elseif protocol == "hysteria2" then + protocol = "HY2" else protocol = protocol:gsub("^%l",string.upper) end + if type == "sing-box" then type = "Sing-Box" end type = type .. " " .. protocol end local address = m:get(n, "address") or "" diff --git a/luci-app-passwall/luasrc/passwall/api.lua b/luci-app-passwall/luasrc/passwall/api.lua index 6c517dc7..f1eb1c0b 100644 --- a/luci-app-passwall/luasrc/passwall/api.lua +++ b/luci-app-passwall/luasrc/passwall/api.lua @@ -314,7 +314,9 @@ function get_valid_nodes() e.id = e[".name"] if e.type and e.remarks then if e.protocol and (e.protocol == "_balancing" or e.protocol == "_shunt" or e.protocol == "_iface") then - e["remark"] = "%s:[%s] " % {e.type .. " " .. i18n.translatef(e.protocol), e.remarks} + local type = e.type + if type == "sing-box" then type = "Sing-Box" end + e["remark"] = "%s:[%s] " % {type .. " " .. i18n.translatef(e.protocol), e.remarks} e["node_type"] = "special" nodes[#nodes + 1] = e end @@ -328,9 +330,20 @@ function get_valid_nodes() protocol = "VMess" elseif protocol == "vless" then protocol = "VLESS" + elseif protocol == "shadowsocks" then + protocol = "SS" + elseif protocol == "shadowsocksr" then + protocol = "SSR" + elseif protocol == "wireguard" then + protocol = "WG" + elseif protocol == "hysteria" then + protocol = "HY" + elseif protocol == "hysteria2" then + protocol = "HY2" else protocol = protocol:gsub("^%l",string.upper) end + if type == "sing-box" then type = "Sing-Box" end type = type .. " " .. protocol end if is_ipv6(address) then address = get_ipv6_full(address) end @@ -705,6 +718,7 @@ local default_file_tree = { aarch64 = "arm64", rockchip = "arm64", mips = "mips", + mips64 = "mips64", mipsel = "mipsel", armv5 = "arm.*5", armv6 = "arm.*6[^4]*", diff --git a/luci-app-passwall/luasrc/passwall/com.lua b/luci-app-passwall/luasrc/passwall/com.lua index 86c065da..7aa8390c 100644 --- a/luci-app-passwall/luasrc/passwall/com.lua +++ b/luci-app-passwall/luasrc/passwall/com.lua @@ -19,7 +19,8 @@ _M.hysteria = { match_fmt_str = "linux%%-%s$", file_tree = { armv6 = "arm", - armv7 = "arm" + armv7 = "arm", + mipsel = "mipsle" } } @@ -65,6 +66,7 @@ _M["chinadns-ng"] = { x86_64 = "wolfssl@x86_64.*x86_64@", x86 = "wolfssl@i386.*i686", mips = "wolfssl@mips%-.*mips32%+soft_float@", + mips64 = "wolfssl@mips64%-.*mips64%+soft_float@", mipsel = "wolfssl@mipsel.*mips32%+soft_float@", aarch64 = "wolfssl_noasm@aarch64.*v8a", rockchip = "wolfssl@aarch64.*v8a",