Skip to content

Commit

Permalink
Add UDP noise
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Aug 30, 2024
1 parent a7664f0 commit c42aa93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ data class V2rayConfig(
data class OutSettingsBean(
var vnext: List<VnextBean>? = null,
var fragment: FragmentBean? = null,
var noise: NoiseBean? = null,
var servers: List<ServersBean>? = null,
/*Blackhole*/
var response: Response? = null,
Expand Down Expand Up @@ -127,6 +128,11 @@ data class V2rayConfig(
var interval: String? = null
)

data class NoiseBean(
var packet: String? = null,
var delay: String? = null
)

data class ServersBean(
var address: String = "",
var method: String = "chacha20-poly1305",
Expand Down Expand Up @@ -638,4 +644,4 @@ data class V2rayConfig(
.create()
.toJson(this)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,11 @@ object V2rayConfigUtil {
?: "50-100",
interval = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL)
?: "10-20"
)
),
noise = V2rayConfig.OutboundBean.OutSettingsBean.NoiseBean(
packet = "rand:100-200",
delay = "10-20",
),
)
fragmentOutbound.streamSettings = V2rayConfig.OutboundBean.StreamSettingsBean(
sockopt = V2rayConfig.OutboundBean.StreamSettingsBean.SockoptBean(
Expand Down

0 comments on commit c42aa93

Please sign in to comment.