mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-11-20 21:41:52 +03:00
Fix proxy code for Kotlin/Native iOS compile before 1.3.0 release.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package ru.fromchat.network.proxy
|
||||
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.IO
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.first
|
||||
@@ -18,6 +19,7 @@ import ru.fromchat.network.proxy.ssh.KeyPassphraseSubmit
|
||||
import ru.fromchat.network.proxy.ssh.decryptAndExportPrivateKeyPem
|
||||
import ru.fromchat.network.proxy.ssh.isPassphraseFailure
|
||||
import ru.fromchat.network.proxy.ssh.privateKeyNeedsPassphrase
|
||||
import kotlin.concurrent.Volatile
|
||||
|
||||
object ProxyRuntime {
|
||||
@Volatile
|
||||
@@ -361,7 +363,7 @@ object ProxyRuntime {
|
||||
}
|
||||
|
||||
val error = connectResult.exceptionOrNull()
|
||||
val message = error?.message ?: error?.javaClass?.simpleName.orEmpty()
|
||||
val message = error?.message ?: error?.let { it::class.simpleName }.orEmpty()
|
||||
if (
|
||||
proxy.auth is SshKeyAuth &&
|
||||
keyPassphrase != null &&
|
||||
|
||||
@@ -9,6 +9,7 @@ import kotlinx.serialization.builtins.ListSerializer
|
||||
import kotlinx.serialization.json.Json
|
||||
import ru.fromchat.api.local.AttachmentMediaLog
|
||||
import ru.fromchat.utils.settings.Settings as PlatformSettings
|
||||
import kotlin.concurrent.Volatile
|
||||
|
||||
@Serializable
|
||||
data class TrustedTlsCertificate(
|
||||
|
||||
@@ -50,6 +50,7 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlin.random.Random
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.IO
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
|
||||
Reference in New Issue
Block a user