https://github.com/2dust/v2rayNG/issues/3895
This commit is contained in:
2dust
2024-11-07 20:32:08 +08:00
parent 4da3a23162
commit 2218251b03

View File

@@ -153,15 +153,32 @@ class ServerActivity : BaseActivity() {
sp_header_type_title?.text = if (networks[position] == "grpc")
getString(R.string.server_lab_mode_type) else
getString(R.string.server_lab_head_type)
config?.headerType?.let { it ->
sp_header_type?.setSelection(Utils.arrayFind(types, it))
}
config?.host?.let { it ->
et_request_host?.text = Utils.getEditable(it)
}
config?.path?.let { it ->
et_path?.text = Utils.getEditable(it)
}
sp_header_type?.setSelection(
Utils.arrayFind(
types,
when (networks[position]) {
"grpc" -> config?.mode
else -> config?.headerType
}.orEmpty()
)
)
et_request_host?.text = Utils.getEditable(
when (networks[position]) {
"quic" -> config?.quicSecurity
"grpc" -> config?.authority
else -> config?.host
}.orEmpty()
)
et_path?.text = Utils.getEditable(
when (networks[position]) {
"kcp" -> config?.seed
"quic" -> config?.quicKey
"grpc" -> config?.serviceName
else -> config?.path
}.orEmpty()
)
tv_request_host?.text = Utils.getEditable(
getString(
when (networks[position]) {