luci-app-passwall: sync upstream

last commit: fc2aa64c17
This commit is contained in:
gitea-action 2024-11-03 12:30:48 +08:00
parent 68233beda6
commit 8fc189a0ea
3 changed files with 48 additions and 3 deletions

View File

@ -574,8 +574,23 @@ o = s:option(Value, option_name("splithttp_path"), translate("SplitHTTP Path"))
o.placeholder = "/" o.placeholder = "/"
o:depends({ [option_name("transport")] = "splithttp" }) o:depends({ [option_name("transport")] = "splithttp" })
-- [[ Mux ]]-- o = s:option(Flag, option_name("splithttp_xmux"), "XMUX", translate("Enable SplitHTTP XMUX. It's not recommended to enable Mux.Cool at the same time."))
o = s:option(Flag, option_name("mux"), translate("Mux")) o:depends({ [option_name("transport")] = "splithttp" })
o = s:option(Value, option_name("maxConcurrency"), translate("XMUX Max Concurrency"))
o:depends({ [option_name("splithttp_xmux")] = true })
o = s:option(Value, option_name("maxConnections"), translate("XMUX Max Connections"))
o:depends({ [option_name("splithttp_xmux")] = true })
o = s:option(Value, option_name("cMaxReuseTimes"), translate("XMUX Connection Max Reuse Times"))
o:depends({ [option_name("splithttp_xmux")] = true })
o = s:option(Value, option_name("cMaxLifetimeMs"), translate("XMUX Connection Max Lifetime (ms)"))
o:depends({ [option_name("splithttp_xmux")] = true })
-- [[ Mux.Cool ]]--
o = s:option(Flag, option_name("mux"), "Mux", translate("Enable Mux.Cool"))
o:depends({ [option_name("protocol")] = "vmess" }) o:depends({ [option_name("protocol")] = "vmess" })
o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "" }) o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "" })
o:depends({ [option_name("protocol")] = "http" }) o:depends({ [option_name("protocol")] = "http" })
@ -588,7 +603,7 @@ o.default = 8
o:depends({ [option_name("mux")] = true }) o:depends({ [option_name("mux")] = true })
-- [[ XUDP Mux ]]-- -- [[ XUDP Mux ]]--
o = s:option(Flag, option_name("xmux"), translate("xMux")) o = s:option(Flag, option_name("xmux"), "XUDP Mux")
o.default = 1 o.default = 1
o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "xtls-rprx-vision" }) o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "xtls-rprx-vision" })

View File

@ -288,6 +288,18 @@ function gen_outbound(flag, node, tag, proxy_table)
result.streamSettings.tlsSettings.alpn = alpn result.streamSettings.tlsSettings.alpn = alpn
end end
end end
local xmux = {}
if node.splithttp_xmux then
xmux.maxConcurrency = node.maxConcurrency and (string.find(node.maxConcurrency, "-") and node.maxConcurrency or tonumber(node.maxConcurrency)) or 0
xmux.maxConnections = node.maxConnections and (string.find(node.maxConnections, "-") and node.maxConnections or tonumber(node.maxConnections)) or 0
xmux.cMaxReuseTimes = node.cMaxReuseTimes and (string.find(node.cMaxReuseTimes, "-") and node.cMaxReuseTimes or tonumber(node.cMaxReuseTimes)) or 0
xmux.cMaxLifetimeMs = node.cMaxLifetimeMs and (string.find(node.cMaxLifetimeMs, "-") and node.cMaxLifetimeMs or tonumber(node.cMaxLifetimeMs)) or 0
if result.streamSettings.splithttpSettings then
result.streamSettings.splithttpSettings.xmux = xmux
end
end
end end
return result return result
end end

View File

@ -1519,6 +1519,24 @@ msgstr "客户端文件不适合当前设备。"
msgid "Can't move new file to path: %s" msgid "Can't move new file to path: %s"
msgstr "无法移动新文件到:%s" msgstr "无法移动新文件到:%s"
msgid "Enable SplitHTTP XMUX. It's not recommended to enable Mux.Cool at the same time."
msgstr "启用 SplitHTTP XMUX。不建议与 Mux.Cool 同时启用。"
msgid "XMUX Max Concurrency"
msgstr "XMUX 连接最大复用流数"
msgid "XMUX Max Connections"
msgstr "XMUX 最大连接数"
msgid "XMUX Connection Max Reuse Times"
msgstr "XMUX 连接最多复用次数"
msgid "XMUX Connection Max Lifetime (ms)"
msgstr "XMUX 连接最大存活时间ms"
msgid "Enable Mux.Cool"
msgstr "启用 Mux.Cool"
msgid "Mux concurrency" msgid "Mux concurrency"
msgstr "最大并发连接数" msgstr "最大并发连接数"