From 13fa586cab595985538fcc23319d793568747804 Mon Sep 17 00:00:00 2001 From: actions Date: Mon, 19 Feb 2024 23:30:10 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream --- .../luasrc/model/cbi/passwall2/client/type/ray.lua | 7 +++++++ luci-app-passwall2/luasrc/passwall2/util_xray.lua | 4 +++- luci-app-passwall2/luasrc/view/passwall2/global/status.htm | 6 +++--- luci-app-passwall2/po/zh-cn/passwall2.po | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua index a297b0ac1..6118c19d2 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua @@ -515,4 +515,11 @@ o = s:option(Value, option_name("xudp_concurrency"), translate("XUDP Mux concurr o.default = 8 o:depends({ [option_name("xmux")] = true }) +--[[tcpMptcp]] +o = s:option(Flag, option_name("tcpMptcp"), "tcpMptcp", translate("Enable Multipath TCP, need to be enabled in both server and client configuration.")) +o.default = 0 + +o = s:option(Flag, option_name("tcpNoDelay"), "tcpNoDelay") +o.default = 0 + api.luci_types(arg[1], m, s, type_name, option_prefix) diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index f9b8e968b..fcbfb4452 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -127,7 +127,9 @@ function gen_outbound(flag, node, tag, proxy_table) -- 底层传输配置 streamSettings = (node.streamSettings or node.protocol == "vmess" or node.protocol == "vless" or node.protocol == "socks" or node.protocol == "shadowsocks" or node.protocol == "trojan") and { sockopt = { - mark = 255 + mark = 255, + tcpMptcp = (node.tcpMptcp == "1") and true or nil, + tcpNoDelay = (node.tcpNoDelay == "1") and true or nil, }, network = node.transport, security = node.stream_security, diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/status.htm b/luci-app-passwall2/luasrc/view/passwall2/global/status.htm index 58e2821e0..66ede8545 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/status.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/status.htm @@ -95,7 +95,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md -
+
@@ -107,7 +107,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
-
+
@@ -119,7 +119,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
-
+
diff --git a/luci-app-passwall2/po/zh-cn/passwall2.po b/luci-app-passwall2/po/zh-cn/passwall2.po index 467fc2218..869b0dfb0 100644 --- a/luci-app-passwall2/po/zh-cn/passwall2.po +++ b/luci-app-passwall2/po/zh-cn/passwall2.po @@ -1446,3 +1446,6 @@ msgstr "后量子对等证书签名方案" msgid "Disable adaptive sizing of TLS records" msgstr "禁用 TLS 记录的自适应大小调整" + +msgid "Enable Multipath TCP, need to be enabled in both server and client configuration." +msgstr "启用 Multipath TCP,需在服务端和客户端配置中同时启用。"