luci: add Xray mptcp option support

This commit is contained in:
xiaorouji 2024-02-19 23:17:46 +08:00 committed by sbwml
parent 28f03a8a2e
commit a1961edac1
3 changed files with 13 additions and 1 deletions

View File

@ -514,4 +514,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)

View File

@ -130,7 +130,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,

View File

@ -1536,3 +1536,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需在服务端和客户端配置中同时启用。"