Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Nov 26, 2024
1 parent f3abd0d commit aa0f563
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ data class V2rayConfig(

data class StreamSettingsBean(
var network: String = AppConfig.DEFAULT_NETWORK,
var security: String = "",
var security: String? = null,
var tcpSettings: TcpSettingsBean? = null,
var kcpSettings: KcpSettingsBean? = null,
var wsSettings: WsSettingsBean? = null,
Expand Down Expand Up @@ -357,7 +357,7 @@ data class V2rayConfig(
authority: String?
): String? {
var sni: String? = null
network = transport
network = if (transport.isEmpty()) NetworkType.TCP.type else transport
when (network) {
NetworkType.TCP.type -> {
val tcpSetting = TcpSettingsBean()
Expand Down Expand Up @@ -453,7 +453,8 @@ data class V2rayConfig(
shortId: String?,
spiderX: String?
) {
security = streamSecurity
security = if (streamSecurity.isEmpty()) null else streamSecurity
if (security == null) return
val tlsSetting = TlsSettingsBean(
allowInsecure = allowInsecure,
serverName = sni,
Expand Down

0 comments on commit aa0f563

Please sign in to comment.