Add support for gRPC protocol
Fixed a initialize plugin option problem Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
parent
51322afe0c
commit
f933348310
1 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@ class ConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChange
|
||||||
fun onInitializePluginOptions(options: PluginOptions) {
|
fun onInitializePluginOptions(options: PluginOptions) {
|
||||||
mode.value = when {
|
mode.value = when {
|
||||||
options["mode"] ?: "websocket" == "quic" -> "quic-tls"
|
options["mode"] ?: "websocket" == "quic" -> "quic-tls"
|
||||||
options["mode"] == "websocket-tls" -> "websocket-tls"
|
options["mode"] == null && "tls" in options -> "websocket-tls"
|
||||||
options["mode"] == "grpc" -> "grpc"
|
options["mode"] == "grpc" && "tls" !in options -> "grpc"
|
||||||
options["mode"] == "grpc-tls" -> "grpc-tls"
|
options["mode"] == "grpc" && "tls" in options -> "grpc-tls"
|
||||||
else -> "websocket-http"
|
else -> "websocket-http"
|
||||||
}.also { onPreferenceChange(null, it) }
|
}.also { onPreferenceChange(null, it) }
|
||||||
host.text = options["host"] ?: "cloudfront.com"
|
host.text = options["host"] ?: "cloudfront.com"
|
||||||
|
|
Loading…
Reference in a new issue