ShamrockPrivate: 正确GUI配置配置文件

Signed-off-by: WhiteChi <whitechi73@outlook.com>
This commit is contained in:
WhiteChi 2023-11-03 22:14:05 +08:00
parent d347bd0a41
commit ee9cf694a0

View File

@ -52,18 +52,11 @@ internal object ShamrockConfig {
it.port = wsPort
}
val newPassiveWebSocketList = intent.getStringExtra("ws_addr")?.split(",", "|", "")?.filter { address ->
Config.passiveWebSocket?.any {
it.address == address
} != true
Config.passiveWebSocket = intent.getStringExtra("ws_addr")?.split(",", "|", "")?.filter { address ->
address.isNotBlank() && (address.startsWith("ws://") || address.startsWith("wss://"))
}?.map {
ConnectionConfig(address = it)
}?.toMutableList()
if (Config.passiveWebSocket == null) {
Config.passiveWebSocket = newPassiveWebSocketList
} else {
Config.passiveWebSocket?.addAll(newPassiveWebSocketList ?: emptyList())
}
putString( "key_store", intent.getStringExtra("key_store")) // 证书路径
putString( "ssl_pwd", intent.getStringExtra("ssl_pwd")) // 证书密码