luci: Add Xray fragment front-end options

"Some key-value pair configuration items are used to control
outgoing TCP fragments, which can deceive the censorship
system in some cases, such as bypassing SNI blacklists."

-"packets": Supports two slicing methods. "1-3" is TCP's stream
slicing, which is applied to the client's 1st to 3rd time writing data.
 "tlshello" is the TLS handshake packet slice.

-"length": Fragmented packet length (byte)

-"interval": Fragmentation interval (ms)

https://xtls.github.io/config/outbounds/freedom.html#outboundconfigurationobject
This commit is contained in:
bowhorse 2024-02-19 01:47:06 -02:00 committed by sbwml
parent a1961edac1
commit 401548753b

View File

@ -155,6 +155,23 @@ if has_xray then
s_xray.anonymous = true
s_xray.addremove = false
o = s_xray:option(Flag, "fragment", translate("Fragment"), translate("TCP fragments, which can deceive the censorship system in some cases, such as bypassing SNI blacklists."))
o.default = 0
o = s_xray:option(ListValue, "fragment_packets", translate("Fragment Packets"), translate(" \"1-3\" is for segmentation at TCP layer, applying to the beginning 1 to 3 data writes by the client. \"tlshello\" is for TLS client hello packet fragmentation."))
o.default = "tlshello"
o:value("1-3", "1-3")
o:value("tlshello", "tlshello")
o:depends("fragment", true)
o = s_xray:option(Value, "fragment_length", translate("Fragment Length"), translate("Fragmented packet length (byte)"))
o.default = "10-20"
o:depends("fragment", true)
o = s_xray:option(Value, "fragment_interval", translate("Fragment Interval"), translate("Fragmentation interval (ms)"))
o.default = "10-20"
o:depends("fragment", true)
o = s_xray:option(Flag, "sniffing", translate("Sniffing"), translate("When using the shunt, must be enabled, otherwise the shunt will invalid."))
o.default = 1
o.rmempty = false