mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: update simplexmq (fast connection handshake) (#4369)
* core: update simplexmq (fast connection handshake) * core: update simplexmq (fast connection handshake) * fix encoding tests * fix tests
This commit is contained in:
committed by
GitHub
parent
6a273677f1
commit
f12e504828
+17
-5
@@ -36,7 +36,7 @@ import Simplex.Chat.Terminal.Output (newChatTerminal)
|
||||
import Simplex.Chat.Types
|
||||
import Simplex.FileTransfer.Description (kb, mb)
|
||||
import Simplex.FileTransfer.Server (runXFTPServerBlocking)
|
||||
import Simplex.FileTransfer.Server.Env (XFTPServerConfig (..), defaultFileExpiration)
|
||||
import Simplex.FileTransfer.Server.Env (XFTPServerConfig (..), defaultFileExpiration, supportedXFTPhandshakes)
|
||||
import Simplex.FileTransfer.Transport (supportedFileServerVRange)
|
||||
import Simplex.Messaging.Agent (disposeAgentClient)
|
||||
import Simplex.Messaging.Agent.Env.SQLite
|
||||
@@ -48,10 +48,11 @@ import Simplex.Messaging.Client (ProtocolClientConfig (..))
|
||||
import Simplex.Messaging.Client.Agent (defaultSMPClientAgentConfig)
|
||||
import Simplex.Messaging.Crypto.Ratchet (supportedE2EEncryptVRange)
|
||||
import qualified Simplex.Messaging.Crypto.Ratchet as CR
|
||||
import Simplex.Messaging.Protocol (srvHostnamesSMPClientVersion)
|
||||
import Simplex.Messaging.Server (runSMPServerBlocking)
|
||||
import Simplex.Messaging.Server.Env.STM
|
||||
import Simplex.Messaging.Transport
|
||||
import Simplex.Messaging.Transport.Server (defaultTransportServerConfig)
|
||||
import Simplex.Messaging.Transport.Server (TransportServerConfig (..), defaultTransportServerConfig)
|
||||
import Simplex.Messaging.Version
|
||||
import Simplex.Messaging.Version.Internal
|
||||
import System.Directory (createDirectoryIfMissing, removeDirectoryRecursive)
|
||||
@@ -135,6 +136,14 @@ testAgentCfg =
|
||||
{ reconnectInterval = (reconnectInterval aCfg) {initialInterval = 50000}
|
||||
}
|
||||
|
||||
testAgentCfgSlow :: AgentConfig
|
||||
testAgentCfgSlow =
|
||||
testAgentCfg
|
||||
{ smpClientVRange = mkVersionRange (Version 1) srvHostnamesSMPClientVersion, -- v2
|
||||
smpAgentVRange = mkVersionRange duplexHandshakeSMPAgentVersion pqdrSMPAgentVersion, -- v5
|
||||
smpCfg = (smpCfg testAgentCfg) {serverVRange = mkVersionRange batchCmdsSMPVersion sendingProxySMPVersion} -- v8
|
||||
}
|
||||
|
||||
testCfg :: ChatConfig
|
||||
testCfg =
|
||||
defaultChatConfig
|
||||
@@ -144,6 +153,9 @@ testCfg =
|
||||
tbqSize = 16
|
||||
}
|
||||
|
||||
testCfgSlow :: ChatConfig
|
||||
testCfgSlow = testCfg {agentConfig = testAgentCfgSlow}
|
||||
|
||||
testAgentCfgVPrev :: AgentConfig
|
||||
testAgentCfgVPrev =
|
||||
testAgentCfg
|
||||
@@ -427,11 +439,11 @@ smpServerCfg =
|
||||
serverStatsLogFile = "tests/smp-server-stats.daily.log",
|
||||
serverStatsBackupFile = Nothing,
|
||||
smpServerVRange = supportedServerSMPRelayVRange,
|
||||
transportConfig = defaultTransportServerConfig,
|
||||
transportConfig = defaultTransportServerConfig {alpn = Just supportedSMPHandshakes},
|
||||
smpHandshakeTimeout = 1000000,
|
||||
controlPort = Nothing,
|
||||
smpAgentCfg = defaultSMPClientAgentConfig,
|
||||
allowSMPProxy = False,
|
||||
allowSMPProxy = True,
|
||||
serverClientConcurrency = 16,
|
||||
information = Nothing
|
||||
}
|
||||
@@ -473,7 +485,7 @@ xftpServerConfig =
|
||||
serverStatsLogFile = "tests/tmp/xftp-server-stats.daily.log",
|
||||
serverStatsBackupFile = Nothing,
|
||||
controlPort = Nothing,
|
||||
transportConfig = defaultTransportServerConfig,
|
||||
transportConfig = defaultTransportServerConfig {alpn = Just supportedXFTPhandshakes},
|
||||
responseDelay = 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user