From dc920d90d9a0d100b57625e9e5e49afd37cfa9bd Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 28 Nov 2022 19:59:04 +0000 Subject: [PATCH] v4.0.0 (#573) * v4.0.0 * update --- CHANGELOG.md | 15 +++++++++++++++ package.yaml | 2 +- simplexmq.cabal | 2 +- src/Simplex/Messaging/Transport.hs | 2 +- tests/CLITests.hs | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ead77d3f6..8a408cfb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# 4.0.0 + +SMP server: + +- Basic authentication. The server address can now include an optional password that is required to create messaging queues, so the contacts who message you will not be able to receive messages via your server, unless you share with them the address with the password. It is recommended to enable basic authentication on all private servers by adding `create_password` parameter into AUTH section of server INI file (the previously deployed servers do not have this section, you need to add it). +- Disable creating new queues completely with `new_queues: off` parameter in AUTH section of INI file - it can be used to simplify migrating the exising connections to another server. +- Updated server CLI with changed defaults: + - interactive server initialization, use -y flag to initalize the server non-interactively. + - store log is now enabled by default, so messaging queues and messages are restored when the server is restarted (to restore undelivered messages the server needs to be stopped with SIGINT signal). + - a random password is now generated by default during the server initialization. + +SMP agent: + +- API to test SMP servers. It connects to the server, creates and deletes a messaging queue. The new SimpleX Chat client uses this API to allow you to test that you have the correct server address, with the valid certificate fingerprint and pasword, before enabling the new server. + # 3.4.0 SMP agent: diff --git a/package.yaml b/package.yaml index 72f5819fe..e74fac751 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: simplexmq -version: 3.4.0 +version: 4.0.0 synopsis: SimpleXMQ message broker description: | This package includes <./docs/Simplex-Messaging-Server.html server>, diff --git a/simplexmq.cabal b/simplexmq.cabal index 3c2f09ba3..81143864c 100644 --- a/simplexmq.cabal +++ b/simplexmq.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: simplexmq -version: 3.4.0 +version: 4.0.0 synopsis: SimpleXMQ message broker description: This package includes <./docs/Simplex-Messaging-Server.html server>, <./docs/Simplex-Messaging-Client.html client> and diff --git a/src/Simplex/Messaging/Transport.hs b/src/Simplex/Messaging/Transport.hs index aee4b7c76..ad9caa42c 100644 --- a/src/Simplex/Messaging/Transport.hs +++ b/src/Simplex/Messaging/Transport.hs @@ -99,7 +99,7 @@ supportedSMPServerVRange :: VersionRange supportedSMPServerVRange = mkVersionRange 1 5 simplexMQVersion :: String -simplexMQVersion = "3.4.0" +simplexMQVersion = "4.0.0" -- * Transport connection class diff --git a/tests/CLITests.hs b/tests/CLITests.hs index b52816166..1834bf6e5 100644 --- a/tests/CLITests.hs +++ b/tests/CLITests.hs @@ -51,7 +51,7 @@ smpServerTest storeLog basicAuth = do lookupValue "INACTIVE_CLIENTS" "disconnect" ini `shouldBe` Right "off" doesFileExist (cfgPath <> "/ca.key") `shouldReturn` True r <- lines <$> capture_ (withArgs ["start"] $ (100000 `timeout` smpServerCLI cfgPath logPath) `catchAll_` pure (Just ())) - r `shouldContain` ["SMP server v3.4.0"] + r `shouldContain` ["SMP server v4.0.0"] r `shouldContain` (if storeLog then ["Store log: " <> logPath <> "/smp-server-store.log"] else ["Store log disabled."]) r `shouldContain` ["Listening on port 5223 (TLS)..."] r `shouldContain` ["not expiring inactive clients"]