mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: 修复被动WS缺失链接
Signed-off-by: WhiteChi <whitechi73@outlook.com>
This commit is contained in:
parent
86b29b982c
commit
c67b49790f
@ -257,7 +257,7 @@ private fun APIInfoCard(
|
||||
hint = "请输入被动地址",
|
||||
error = "输入的地址不合法",
|
||||
checker = {
|
||||
it.startsWith("ws://") || it.startsWith("wss://") || it.isBlank()
|
||||
true
|
||||
},
|
||||
confirm = {
|
||||
if (it.startsWith("ws://") || it.startsWith("wss://") || it.isBlank()) {
|
||||
|
@ -52,13 +52,18 @@ internal object ShamrockConfig {
|
||||
it.port = wsPort
|
||||
}
|
||||
|
||||
Config.passiveWebSocket = intent.getStringExtra("ws_addr")?.split(",", "|", ",")?.filter { address ->
|
||||
val newPassiveWebSocketList = intent.getStringExtra("ws_addr")?.split(",", "|", ",")?.filter { address ->
|
||||
Config.passiveWebSocket?.any {
|
||||
it.address == address
|
||||
} != true
|
||||
}?.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")) // 证书密码
|
||||
|
@ -30,9 +30,9 @@ val GlobalJson = Json {
|
||||
val GlobalJson5 = Json5 {
|
||||
prettyPrint = true
|
||||
indentationWidth = 2
|
||||
useSingleQuotes = true
|
||||
quoteMemberNames = true
|
||||
encodeDefaults = true
|
||||
//useSingleQuotes = true
|
||||
//quoteMemberNames = true
|
||||
//encodeDefaults = true
|
||||
}
|
||||
|
||||
val String.asJson: JsonElement
|
||||
|
Loading…
x
Reference in New Issue
Block a user