|
@@ -344,78 +344,89 @@ o.rmempty = false
|
|
|
|
|
|
-- [[ fragmen Settings ]]--
|
|
|
if is_finded("xray") then
|
|
|
-s = m:section(TypedSection, "global_xray_fragment", translate("Xray Fragment Settings"))
|
|
|
-s.anonymous = true
|
|
|
-
|
|
|
-o = s: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: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("tlshello", "tlshello")
|
|
|
-o:value("1-1", "1-1")
|
|
|
-o:value("1-2", "1-2")
|
|
|
-o:value("1-3", "1-3")
|
|
|
-o:value("1-5", "1-5")
|
|
|
-o:depends("fragment", true)
|
|
|
-
|
|
|
-o = s:option(Value, "fragment_length", translate("Fragment Length"), translate("Fragmented packet length (byte)"))
|
|
|
-o.default = "100-200"
|
|
|
-o:depends("fragment", true)
|
|
|
-
|
|
|
-o = s:option(Value, "fragment_interval", translate("Fragment Interval"), translate("Fragmentation interval (ms)"))
|
|
|
-o.default = "10-20"
|
|
|
-o:depends("fragment", true)
|
|
|
-
|
|
|
-o = s:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."))
|
|
|
-o.default = 0
|
|
|
-
|
|
|
-s = m:section(TypedSection, "xray_noise_packets", translate("Xray Noise Packets"))
|
|
|
-s.description = translate(
|
|
|
- "<font style='color:red'>" .. translate("To send noise packets, select \"Noise\" in Xray Settings.") .. "</font>" ..
|
|
|
- "<br/><font><b>" .. translate("For specific usage, see:") .. "</b></font>" ..
|
|
|
- "<a href='https://xtls.github.io/config/outbounds/freedom.html' target='_blank'>" ..
|
|
|
- "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>")
|
|
|
-s.template = "cbi/tblsection"
|
|
|
-s.sortable = true
|
|
|
-s.anonymous = true
|
|
|
-s.addremove = true
|
|
|
-
|
|
|
-s.remove = function(self, section)
|
|
|
- for k, v in pairs(self.children) do
|
|
|
- v.rmempty = true
|
|
|
- v.validate = nil
|
|
|
+ s = m:section(TypedSection, "global_xray_fragment", translate("Xray Fragment Settings"))
|
|
|
+ s.anonymous = true
|
|
|
+
|
|
|
+ o = s: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: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("tlshello", "tlshello")
|
|
|
+ o:value("1-1", "1-1")
|
|
|
+ o:value("1-2", "1-2")
|
|
|
+ o:value("1-3", "1-3")
|
|
|
+ o:value("1-5", "1-5")
|
|
|
+ o:depends("fragment", true)
|
|
|
+
|
|
|
+ o = s:option(Value, "fragment_length", translate("Fragment Length"), translate("Fragmented packet length (byte)"))
|
|
|
+ o.default = "100-200"
|
|
|
+ o:depends("fragment", true)
|
|
|
+
|
|
|
+ o = s:option(Value, "fragment_interval", translate("Fragment Interval"), translate("Fragmentation interval (ms)"))
|
|
|
+ o.default = "10-20"
|
|
|
+ o:depends("fragment", true)
|
|
|
+
|
|
|
+ o = s:option(Value, "fragment_maxsplit", translate("Fragment maxSplit"), translate("Fragmented maxSplit (byte)"))
|
|
|
+ o.default = "100-200"
|
|
|
+ o:depends("fragment", true)
|
|
|
+
|
|
|
+ o = s:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."))
|
|
|
+ o.default = 0
|
|
|
+
|
|
|
+ s = m:section(TypedSection, "xray_noise_packets", translate("Xray Noise Packets"))
|
|
|
+ s.description = translate(
|
|
|
+ "<font style='color:red'>" .. translate("To send noise packets, select \"Noise\" in Xray Settings.") .. "</font>" ..
|
|
|
+ "<br/><font><b>" .. translate("For specific usage, see:") .. "</b></font>" ..
|
|
|
+ "<a href='https://xtls.github.io/config/outbounds/freedom.html' target='_blank'>" ..
|
|
|
+ "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>")
|
|
|
+ s.template = "cbi/tblsection"
|
|
|
+ s.sortable = true
|
|
|
+ s.anonymous = true
|
|
|
+ s.addremove = true
|
|
|
+
|
|
|
+ s.remove = function(self, section)
|
|
|
+ for k, v in pairs(self.children) do
|
|
|
+ v.rmempty = true
|
|
|
+ v.validate = nil
|
|
|
+ end
|
|
|
+ TypedSection.remove(self, section)
|
|
|
end
|
|
|
- TypedSection.remove(self, section)
|
|
|
-end
|
|
|
|
|
|
-o = s:option(Flag, "enabled", translate("Enable"))
|
|
|
-o.default = 1
|
|
|
-o.rmempty = false
|
|
|
+ o = s:option(Flag, "enabled", translate("Enable"))
|
|
|
+ o.default = 1
|
|
|
+ o.rmempty = false
|
|
|
|
|
|
-o = s:option(ListValue, "type", translate("Type"))
|
|
|
-o.default = "base64"
|
|
|
-o:value("rand", "rand")
|
|
|
-o:value("str", "str")
|
|
|
-o:value("hex", "hex")
|
|
|
-o:value("base64", "base64")
|
|
|
-
|
|
|
-o = s:option(Value, "domainStrategy", translate("Domain Strategy"))
|
|
|
-o.default = "UseIP"
|
|
|
-o:value("AsIs", "AsIs")
|
|
|
-o:value("UseIP", "UseIP")
|
|
|
-o:value("UseIPv4", "UseIPv4")
|
|
|
-o:value("ForceIP", "ForceIP")
|
|
|
-o:value("ForceIPv4", "ForceIPv4")
|
|
|
-o.rmempty = false
|
|
|
+ o = s:option(ListValue, "type", translate("Type"))
|
|
|
+ o.default = "base64"
|
|
|
+ o:value("rand", "rand")
|
|
|
+ o:value("str", "str")
|
|
|
+ o:value("hex", "hex")
|
|
|
+ o:value("base64", "base64")
|
|
|
+
|
|
|
+ o = s:option(Value, "domainStrategy", translate("Domain Strategy"))
|
|
|
+ o.default = "UseIP"
|
|
|
+ o:value("AsIs", "AsIs")
|
|
|
+ o:value("UseIP", "UseIP")
|
|
|
+ o:value("UseIPv4", "UseIPv4")
|
|
|
+ o:value("ForceIP", "ForceIP")
|
|
|
+ o:value("ForceIPv4", "ForceIPv4")
|
|
|
+ o.rmempty = false
|
|
|
|
|
|
-o = s:option(Value, "packet", translate("Packet"))
|
|
|
-o.datatype = "minlength(1)"
|
|
|
-o.rmempty = false
|
|
|
+ o = s:option(Value, "packet", translate("Packet"))
|
|
|
+ o.datatype = "minlength(1)"
|
|
|
+ o.rmempty = false
|
|
|
|
|
|
-o = s:option(Value, "delay", translate("Delay (ms)"))
|
|
|
-o.datatype = "or(uinteger,portrange)"
|
|
|
-o.rmempty = false
|
|
|
+ o = s:option(Value, "delay", translate("Delay (ms)"))
|
|
|
+ o.datatype = "or(uinteger,portrange)"
|
|
|
+ o.rmempty = false
|
|
|
+
|
|
|
+ o = s:option(Value, "applyto", translate("ApplyTo (IP type)"))
|
|
|
+ o.default = "IP"
|
|
|
+ o:value("IP", "IP")
|
|
|
+ o:value("IPV4", "IPv4")
|
|
|
+ o:value("IPV6", "IPv6")
|
|
|
+ o.rmempty = false
|
|
|
end
|
|
|
|
|
|
return m
|