luci-app-ssr-plus: ws: Add enable early data option

This commit is contained in:
sbwml 2022-09-21 15:44:40 +08:00
parent 1f9554c3e7
commit a03ce7441c
2 changed files with 9 additions and 2 deletions

View File

@ -431,16 +431,20 @@ o:depends("transport", "ws")
o.rmempty = true o.rmempty = true
if is_finded("v2ray") then if is_finded("v2ray") then
-- 启用WS前置数据
o = s:option(Flag, "ws_ed_enable", translate("Enable early data"))
o:depends("transport", "ws")
-- WS前置数据 -- WS前置数据
o = s:option(Value, "ws_ed", translate("Max Early Data")) o = s:option(Value, "ws_ed", translate("Max Early Data"))
o:depends("transport", "ws") o:depends("ws_ed_enable", true)
o.datatype = "uinteger" o.datatype = "uinteger"
o.default = 2048 o.default = 2048
o.rmempty = true o.rmempty = true
-- WS前置数据标头 -- WS前置数据标头
o = s:option(Value, "ws_ed_header", translate("Early Data Header Name")) o = s:option(Value, "ws_ed_header", translate("Early Data Header Name"))
o:depends("transport", "ws") o:depends("ws_ed_enable", true)
o.default = "Sec-WebSocket-Protocol" o.default = "Sec-WebSocket-Protocol"
o.rmempty = true o.rmempty = true
end end

View File

@ -727,6 +727,9 @@ msgstr "WebSocket 主机名"
msgid "WebSocket Path" msgid "WebSocket Path"
msgstr "WebSocket 路径" msgstr "WebSocket 路径"
msgid "Enable early data"
msgstr "启用前置数据"
msgid "Max Early Data" msgid "Max Early Data"
msgstr "最大前置数据" msgstr "最大前置数据"