diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt index f598805ae..f34a016a7 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt @@ -5,7 +5,6 @@ enum class NetworkType(val type: String) { KCP("kcp"), WS("ws"), HTTP_UPGRADE("httpupgrade"), - SPLIT_HTTP("splithttp"), XHTTP("xhttp"), HTTP("http"), H2("h2"), diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt index 1f44cb79d..20b8b251a 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt @@ -404,7 +404,7 @@ data class V2rayConfig( httpupgradeSettings = httpupgradeSetting } - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> { + NetworkType.XHTTP.type -> { val xhttpSetting = XhttpSettingsBean() xhttpSetting.host = host.orEmpty() sni = host @@ -596,7 +596,7 @@ data class V2rayConfig( ) } - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> { + NetworkType.XHTTP.type -> { val xhttpSettings = streamSettings?.xhttpSettings ?: return null listOf( "", diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt index fc8e09a51..1ecfff47f 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt @@ -32,8 +32,6 @@ open class FmtBase { fun getItemFormQuery(config: ProfileItem, queryParam: Map, allowInsecure: Boolean) { config.network = queryParam["type"] ?: NetworkType.TCP.type - //TODO - if (config.network == NetworkType.SPLIT_HTTP.type) config.network = NetworkType.XHTTP.type config.headerType = queryParam["headerType"] config.host = queryParam["host"] config.path = queryParam["path"] @@ -95,7 +93,7 @@ open class FmtBase { config.path.let { if (it.isNotNullEmpty()) dicQuery["path"] = it.orEmpty() } } - NetworkType.SPLIT_HTTP, NetworkType.XHTTP -> { + NetworkType.XHTTP -> { config.host.let { if (it.isNotNullEmpty()) dicQuery["host"] = it.orEmpty() } config.path.let { if (it.isNotNullEmpty()) dicQuery["path"] = it.orEmpty() } config.xhttpMode.let { if (it.isNotNullEmpty()) dicQuery["mode"] = it.orEmpty() } diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt index 9beb39bf8..26b88fa1a 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt @@ -162,7 +162,7 @@ class ServerActivity : BaseActivity() { sp_header_type_title?.text = when (networks[position]) { NetworkType.GRPC.type -> getString(R.string.server_lab_mode_type) - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> getString(R.string.server_lab_xhttp_mode) + NetworkType.XHTTP.type -> getString(R.string.server_lab_xhttp_mode) else -> getString(R.string.server_lab_head_type) }.orEmpty() sp_header_type?.setSelection( @@ -170,7 +170,7 @@ class ServerActivity : BaseActivity() { types, when (networks[position]) { NetworkType.GRPC.type -> config?.mode - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> config?.xhttpMode + NetworkType.XHTTP.type -> config?.xhttpMode else -> config?.headerType }.orEmpty() ) @@ -198,7 +198,7 @@ class ServerActivity : BaseActivity() { NetworkType.TCP.type -> R.string.server_lab_request_host_http NetworkType.WS.type -> R.string.server_lab_request_host_ws NetworkType.HTTP_UPGRADE.type -> R.string.server_lab_request_host_httpupgrade - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> R.string.server_lab_request_host_xhttp + NetworkType.XHTTP.type -> R.string.server_lab_request_host_xhttp NetworkType.H2.type -> R.string.server_lab_request_host_h2 //"quic" -> R.string.server_lab_request_host_quic NetworkType.GRPC.type -> R.string.server_lab_request_host_grpc @@ -213,7 +213,7 @@ class ServerActivity : BaseActivity() { NetworkType.KCP.type -> R.string.server_lab_path_kcp NetworkType.WS.type -> R.string.server_lab_path_ws NetworkType.HTTP_UPGRADE.type -> R.string.server_lab_path_httpupgrade - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> R.string.server_lab_path_xhttp + NetworkType.XHTTP.type -> R.string.server_lab_path_xhttp NetworkType.H2.type -> R.string.server_lab_path_h2 //"quic" -> R.string.server_lab_path_quic NetworkType.GRPC.type -> R.string.server_lab_path_grpc @@ -223,14 +223,14 @@ class ServerActivity : BaseActivity() { ) et_extra?.text = Utils.getEditable( when (networks[position]) { - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> config?.xhttpExtra + NetworkType.XHTTP.type -> config?.xhttpExtra else -> null }.orEmpty() ) layout_extra?.visibility = when (networks[position]) { - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> View.VISIBLE + NetworkType.XHTTP.type -> View.VISIBLE else -> View.GONE } } @@ -578,7 +578,7 @@ class ServerActivity : BaseActivity() { grpcModes } - NetworkType.SPLIT_HTTP.type, NetworkType.XHTTP.type -> { + NetworkType.XHTTP.type -> { xhttpMode } diff --git a/V2rayNG/app/src/main/res/values/arrays.xml b/V2rayNG/app/src/main/res/values/arrays.xml index dce02b950..580b7b179 100644 --- a/V2rayNG/app/src/main/res/values/arrays.xml +++ b/V2rayNG/app/src/main/res/values/arrays.xml @@ -27,7 +27,6 @@ ws httpupgrade xhttp - splithttp h2 grpc