Evgeny Poberezkin
091fbdd0e9
rename simplexmq-legacy into simplexmq-v0 ( #270 )
...
* rename simplexmq-legacy into simplexmq-v0
* split UnliftIO instance of ExceptT
2022-01-11 07:27:30 +00:00
Evgeny Poberezkin
10c62e7fa2
fix message delivery when quota exceeded - making it concurrent per queue, not per server ( #260 )
...
* test: HELLO blocking message delivery on the same server
* test: quota exceeded in one queue should not block delivery in other queues
* fix test to work in stable branch
* simplify pending message delivery (#202 )
* simplify pending message delivery (WIP)
* refactor
* fix concurrent message delivery
* remove type synonym
2022-01-06 08:56:19 +00:00
Evgeny Poberezkin
5f7fe8b0dc
remove client from servers subscribers map after client disconnection ( #228 )
...
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-17 16:28:48 +04:00
Evgeny Poberezkin
ff2b975cd8
prepare v0.5.0 - update versions, changelog ( #219 )
...
* prepare v0.5.0 - update versions, changelog
* Update CHANGELOG.md
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-08 15:02:28 +00:00
Evgeny Poberezkin
218a7756f8
RJCT / rejectContact to reject contact requests ( #214 )
2021-12-06 13:12:10 +00:00
Evgeny Poberezkin
57c9ccfc08
use base64url encoding for public key in connection requests; only allow accepting invitations that were not accepted ( #213 )
...
* use base64url encoding for public key in connection requests; only allow accepting invitations that were not accepted
* subscribe ContactConnection, fix test to use base64url encoding in key example
2021-12-06 09:05:13 +00:00
Evgeny Poberezkin
3e226fc3f2
add CONF/LET for invitations, use REQ/ACPT only with contact connections ( #212 )
2021-12-04 21:08:02 +00:00
Evgeny Poberezkin
04c65d98da
support permanent connection link ("contact") in SMP agent protocols ( #143 )
...
* open/public queue extension for SMP and SMP agent protocols
* add connection mode - invitation or contact
* use ConnectionMode with REQ and ACPT agent notification/command
* parameterize ConnectionRequest with ConnectionMode
* implement Contact connection mode for permanent connection links
* tests for contact connections
2021-12-04 18:42:08 +00:00
Evgeny Poberezkin
606bbf5062
URI syntax for SMP queues and connection requests ( #210 )
...
* URI syntax for SMP queues and connection requests
* fix connection request parsing/serializing
* add ConnectionRequest sqlite instances
2021-12-02 17:43:05 +00:00
Evgeny Poberezkin
33de5f6fec
include migrations in the package, update docs, versions ( #194 )
...
* include migrations in the package, update versions
* update DigitalOcean version
2021-09-11 18:36:12 +01:00
Evgeny Poberezkin
0f9226ba2a
update version (0.4.0) and changelog ( #193 )
...
* update version (0.4.0) and changelog
* changelog corrections
* make tests more stable
2021-09-11 10:26:51 +01:00
Efim Poberezkin
862f25500d
v4 ( #192 )
2021-09-09 01:30:39 +10:00
Evgeny Poberezkin
d23254f44a
SMP block size via config, the client can override size set by the server ( #188 )
2021-09-03 20:16:10 +01:00
Evgeny Poberezkin
9a3afda290
ACK command, ackMessage, do not send ACK to SMP server on MSG (after the initial handshake) ( #187 )
2021-09-01 08:29:12 +01:00
Evgeny Poberezkin
7b5ebf7bd2
change type of agent sendMessage result to AgentMsgId ( #183 )
2021-08-26 23:25:49 +01:00
Evgeny Poberezkin
cb950ae2e4
add SMP queue quota to server config (and use TBQueue for messages) ( #182 )
2021-08-26 22:54:51 +01:00
Evgeny Poberezkin
cda02a3b30
support 3072 bits RSA key size ( #180 )
2021-08-22 10:04:49 +01:00
Evgeny Poberezkin
dd5137c336
asynchronous message sending to allow accepting messages when agent (or server) is offline ( #179 )
...
* asynchronous message sending to allow accepting messages when agent (or server) is offline
* send pending messages after agent restart; test for pending messages delivery when server restarted
* test pending message delivery after agent restart
* message delivery process per server
* test layout
2021-08-12 22:15:55 +01:00
Evgeny Poberezkin
e045774caa
reconnect server and resubscribe connections after disconnection ( #178 )
2021-08-09 08:49:49 +01:00
Evgeny Poberezkin
3829479a21
Remove introductions, rename CONF/LET to REQ/ACPT ( #175 )
...
* remove intros and functions in Reader monad
* rename CONF/LET to REQ/ACPT, allowConnection to acceptConnection
2021-08-05 08:27:44 +01:00
Efim Poberezkin
8a4bced569
decrease initial delay for HELLO retries on online activation ( #174 )
...
* decrease initial delay for HELLO retries on online activation
* move retry interval to config
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-08-01 13:51:40 +01:00
Efim Poberezkin
5e380e1d47
add tests for establishing connection asynchronously; retrieve correct key for activation on restart ( #169 )
2021-07-10 20:02:48 +10:00
Evgeny Poberezkin
8ba3e3e45a
remove connection ID parameter from agent functions ( #166 )
...
* remove connection ID parameter from agent functions
* remove unused extension
2021-07-03 20:18:37 +01:00
Efim Poberezkin
3d9ceff691
ask client for confirmation of sender; make establishment of connection asynchronous ( #163 )
...
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-07-04 04:48:24 +10:00
Evgeny Poberezkin
daad3315eb
upgrade stack resolver to lts-18.0 ( #165 )
...
* upgrade stack resolver to lts-18.0
* fix random package version
2021-06-30 10:35:50 +01:00
Evgeny Poberezkin
e4d9b481ec
refactor message meta to MsgMeta type ( #164 )
2021-06-30 10:29:45 +01:00
Evgeny Poberezkin
7af7272635
SQLiteStore connection pool ( #162 )
...
* SQLiteStore connection pool
* move SQLiteStore to agent env - single store instance is used for all clients
2021-06-25 18:17:11 +01:00
Evgeny Poberezkin
09c6adeabc
pass migration as parameter (to use in simplex-chat) ( #161 )
...
* pass migration as parameter (to use in simplex-chat)
* add connId parameter to create/joinConnection
2021-06-24 18:39:59 +01:00
Evgeny Poberezkin
d5f324cb5c
SMP agent: functional API ( #159 )
...
* SMP agent: functional API (WIP)
* functional API for SMP agent, tests
* fix ICON message parameter
* use stateTVar
2021-06-13 11:11:44 +01:00
Evgeny Poberezkin
bf5561c89c
remove entities, remove broadcasts ( #158 )
2021-06-12 20:01:36 +01:00
Evgeny Poberezkin
ab89963f45
introduction protocol ( #156 )
...
* commands to support introduction
* agent messages / envelopes to support introductions
* introductions and invitations table; insert record with random unique ID
* store class methods and types for introductions
* process INTRO and ACPT commands for connection introductions
* fix tests: add MonadFail constraint, remove OK response to JOIN
* process agent messages for introductions
* ICON notification when introduction is completed
* replace multiway if with case
* correction
* support random connection IDs
* save additional connection fields, refactor create connection funcs
* refactor
* refactor
* test duplex connection with random IDs
* store methods for introductions
* test introduction
* fix parsing of CON agent message
* test introduction with random connection IDs
* broadcast with random connection and broadcast IDs
* clean up sql
2021-06-11 21:33:13 +01:00
Evgeny Poberezkin
bc780343df
broadcast commands ( #154 )
...
* broadcast commands (WIP)
* broadcasts: store and commands implementation
* test broadcast
* broadcast test
* rename migration, handle SEBadConnType errors
* query semicolons
2021-06-01 18:11:16 +01:00
Evgeny Poberezkin
92bd8ef335
agent entity types ( #148 )
...
* agent entity types (WIP - fails)
* agent entities (tests pass, TODO - reduce boilerplate)
* simplify test patters
* simplify test patterns 2
* refactor testEquality for ACommand
* stricter entity parsing and correct serialization, updated tests
* fix check of entity ID
* remove unused instance Eq (Entity t)
2021-05-29 13:01:17 +01:00
Nikita Poberezkin
dea1845908
0.3.2 ( #146 )
2021-05-23 14:19:19 +03:00
Evgeny Poberezkin
5b39f51203
websockets transport ( #139 )
...
* example websockets server
* example of ws client
* type class TConnection for generic TCP/WebSockets implementation
* support WebSockets transport
* rename TConnection methods
* revert runClient to not need transport arg
* pass the list of ports and transports via SMP server config
* remove TypeApplications
* s/Transport/TProxy/, s/TConnection/Transport/
* fix server with multiple transports, make SMP client use WS transport with port 80 (TODO fallback to WS)
2021-05-17 22:33:12 +01:00
Evgeny Poberezkin
44bec887fe
0.3.1 ( #135 )
...
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-05-10 15:14:06 +04:00
Efim Poberezkin
8bd42035aa
reorganize sqlite store test suite ( #138 )
2021-05-10 15:10:32 +04:00
Evgeny Poberezkin
5d59e4b2bd
package and module docs, remove Simplex.Markdown (moved to simplex-chat), rename Agent.Transmission to Agent.Protocol ( #133 )
...
* package and module docs, remove Simplex.Markdown (moved to simplex-chat), rename Agent.Transmission to Agent.Protocol
* move errors.md to haddock comments, Transport docs
* add CHANGELOG.md, add missing package versions
* changelog, copyright
* docs for Simplex.Messaging.Crypto
* consistent punctuation
* use absolute URLs in readme
* correction
2021-05-09 09:36:08 +01:00
Efim Poberezkin
ad87442811
sqlite busy stress test ( #131 )
...
* sqlite busy stress test
* refactor withStore2
* refactor withStore2
* pragmas
* swith to IMMEDIATE sqlite transactions and add retry on ErrorBusy
* refactor
* increase timeout, print errors and results
* remove logging errors/results
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-05-08 16:30:40 +01:00
Evgeny Poberezkin
7aacee405e
agent: send CON to user when the 1st party responds HELLO; fix REPLY vulnerability ( #130 )
...
* agent: send CON to user when the 1st party responds HELLO; fix REPLY vulnerability
* test for getRcvConn
* add commented OK response to JOIN command
* store: use Only newtype to select one field
2021-05-07 06:57:53 +01:00
Evgeny Poberezkin
4b9ebbbab2
move SMP server from agent commands NEW/JOIN to agent config ( #129 )
...
* move SMP server from agent commands NEW/JOIN to agent config
* fix SMPServer parser
* update agent protocol - server management
* enable agent test
* agent test with 2 servers
* create reply queue on the configured server
* choose random server
* swap bind
2021-05-06 18:53:34 +01:00
Evgeny Poberezkin
b517d793d8
only allow correct key and signature sizes, improve timing mitigation ( #121 )
2021-05-03 12:31:23 +01:00
Efim Poberezkin
b7902ee4c8
agent sqlite: store msg hashes and integrity ( #118 , #119 , #120 )
...
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-05-02 10:48:31 +04:00
Evgeny Poberezkin
633b3a4bda
mitigate timing attack to determine if queue exists ( #117 )
...
* mitigate timing attack to determine if queue exists
* remove timing for authenticated SEND command
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-05-01 22:07:25 +01:00
Efim Poberezkin
6be4839703
agent: verify msg integrity based on previous msg hash and id ( #110 )
...
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2021-05-02 00:38:32 +04:00
Evgeny Poberezkin
6ceeb2c9db
save keys as binary to db, remove legacy encoding ( #114 )
...
* save keys as binary to db, remove legacy encoding
* import list
2021-04-30 09:13:18 +01:00
Evgeny Poberezkin
729cf10ad8
test: SMP server store log ( #109 )
...
* test: SMP server store log
* test: extend store log test: queue deletion, log compacted
* test: check store log length in lines
2021-04-29 07:23:32 +01:00
Evgeny Poberezkin
afc09a6ec4
Store log ( #108 )
...
* StoreLog (WIP)
* add log records to map
* revert Protocol change
* revert Server change
* fix parseLogRecord
* optionally save/restore queues to/from store log
* refactor
* refactor delQueueAndMsgs
* move store log to /var/opt/simplex
* use ini file
2021-04-26 20:34:28 +01:00
Evgeny Poberezkin
5fec6c1755
Sign and verify agent messages ( #106 )
...
* sign and verify agent messages with key sent in HELLO (TODO: hardcoded block size - should use size from handshake; verify signature of HELLO message itself; possibly, different MSG status if signature was not verified (currently ignored) or failed to verify (currently fails with AGENT A_ENCRYPTION - alternatively, change it to AGENT A_SIGNATURE))
* remove hardcoded block size, make it 4096 bytes
* verify signature of HELLO message before it is added to RcvQueue
* refactor
* update doc
* rename functions
2021-04-26 20:05:46 +01:00
Evgeny Poberezkin
cddff78719
binary X509 encoding for RSA key send during transport handshake ( #105 )
2021-04-24 12:46:57 +01:00