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 = "请输入被动地址",
|
hint = "请输入被动地址",
|
||||||
error = "输入的地址不合法",
|
error = "输入的地址不合法",
|
||||||
checker = {
|
checker = {
|
||||||
it.startsWith("ws://") || it.startsWith("wss://") || it.isBlank()
|
true
|
||||||
},
|
},
|
||||||
confirm = {
|
confirm = {
|
||||||
if (it.startsWith("ws://") || it.startsWith("wss://") || it.isBlank()) {
|
if (it.startsWith("ws://") || it.startsWith("wss://") || it.isBlank()) {
|
||||||
|
@ -52,13 +52,18 @@ internal object ShamrockConfig {
|
|||||||
it.port = wsPort
|
it.port = wsPort
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.passiveWebSocket = intent.getStringExtra("ws_addr")?.split(",", "|", ",")?.filter { address ->
|
val newPassiveWebSocketList = intent.getStringExtra("ws_addr")?.split(",", "|", ",")?.filter { address ->
|
||||||
Config.passiveWebSocket?.any {
|
Config.passiveWebSocket?.any {
|
||||||
it.address == address
|
it.address == address
|
||||||
} != true
|
} != true
|
||||||
}?.map {
|
}?.map {
|
||||||
ConnectionConfig(address = it)
|
ConnectionConfig(address = it)
|
||||||
}?.toMutableList()
|
}?.toMutableList()
|
||||||
|
if (Config.passiveWebSocket == null) {
|
||||||
|
Config.passiveWebSocket = newPassiveWebSocketList
|
||||||
|
} else {
|
||||||
|
Config.passiveWebSocket?.addAll(newPassiveWebSocketList ?: emptyList())
|
||||||
|
}
|
||||||
|
|
||||||
putString( "key_store", intent.getStringExtra("key_store")) // 证书路径
|
putString( "key_store", intent.getStringExtra("key_store")) // 证书路径
|
||||||
putString( "ssl_pwd", intent.getStringExtra("ssl_pwd")) // 证书密码
|
putString( "ssl_pwd", intent.getStringExtra("ssl_pwd")) // 证书密码
|
||||||
|
@ -30,9 +30,9 @@ val GlobalJson = Json {
|
|||||||
val GlobalJson5 = Json5 {
|
val GlobalJson5 = Json5 {
|
||||||
prettyPrint = true
|
prettyPrint = true
|
||||||
indentationWidth = 2
|
indentationWidth = 2
|
||||||
useSingleQuotes = true
|
//useSingleQuotes = true
|
||||||
quoteMemberNames = true
|
//quoteMemberNames = true
|
||||||
encodeDefaults = true
|
//encodeDefaults = true
|
||||||
}
|
}
|
||||||
|
|
||||||
val String.asJson: JsonElement
|
val String.asJson: JsonElement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user