Fix fragment for reality configs
This commit is contained in:
1 parent
ebd0257f6e
commit
58dbb71b53
1 file changed
+13
-2
@@ -581,10 +581,21 @@ object V2rayConfigUtil {
|
|||||||
tag = TAG_FRAGMENT,
|
tag = TAG_FRAGMENT,
|
||||||
mux = null
|
mux = null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var packets = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_PACKETS) ?: "tlshello"
|
||||||
|
if (v2rayConfig.outbounds[0].streamSettings?.security == V2rayConfig.REALITY
|
||||||
|
&& packets == "tlshello"
|
||||||
|
) {
|
||||||
|
packets = "1-3"
|
||||||
|
} else if (v2rayConfig.outbounds[0].streamSettings?.security == V2rayConfig.TLS
|
||||||
|
&& packets != "tlshello"
|
||||||
|
) {
|
||||||
|
packets = "tlshello"
|
||||||
|
}
|
||||||
|
|
||||||
fragmentOutbound.settings = V2rayConfig.OutboundBean.OutSettingsBean(
|
fragmentOutbound.settings = V2rayConfig.OutboundBean.OutSettingsBean(
|
||||||
fragment = V2rayConfig.OutboundBean.OutSettingsBean.FragmentBean(
|
fragment = V2rayConfig.OutboundBean.OutSettingsBean.FragmentBean(
|
||||||
packets = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_PACKETS)
|
packets = packets,
|
||||||
?: "tlshello",
|
|
||||||
length = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_LENGTH)
|
length = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_LENGTH)
|
||||||
?: "50-100",
|
?: "50-100",
|
||||||
interval = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL)
|
interval = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL)
|
||||||
|
|||||||
Reference in new issue
Block a user