* store SMP client version per queue
* use versioned format for queue addresses (not compatible with v1)
* multiple server hosts in queue URI/data, versioned encoding (cross-version tests fail)
* choose server host based on socksProxy setting
* test works
* multiple server addresses mostly work
* add onion hosts for provided servers
* update SMP hosts
* batch server commands in one transport block
* subscribe to multiple queues using batched commands
* agent method to subscribe to multiple queues using batched commands
* refactor
* test for batched subscriptions
* delete part of connections in batched test
* add resubscribeConnections
* remove comment
* update SMP protocol doc
* SMP v3: encrypt message timestamp and flags together with the body between server and recipient
* v3 tests
* update protocol doc
* add test for max size message
* delay in notifications test
* simplify v3
* encrypt server message to the recipient when sent
* refactor
* exit on error restoring the messages
* refactor, increase test timeout
* style
* add prints to the test
* remove error from unsafeMaxLenBS
* update protocol
* lint, improve test, change func param
* ntf: use separate key to encrypt NMsgMeta
* key negotiation
* save key on server, use for encryption
* refactor?
* store error
* NtfQueueCreds
* server - NtfCreds
* comment, rename
* fix type
* ClientNtfCreds
* encoding
* add msgId to ACK to avoid the risks of losing messages with concurrent delivery (in app/NSE)
* update ACK to only remove message and update stats if msgId matches
* add tests, fix
* rename sameMsgId/msgDeleted
* support stopping and resuming agent (#385)
* export agentDbPath
* support fully closing and resuming agent
* whitespace
* clean up
* support message flags visible to SMP server to control notifications (and for any future extensions)
* simplify message flags encoding
* GET command
* APN push client (WIP)
* APNS push client works
* TODO comments
* comment
* send notification and process the response
* config
* e2e encryption for notification parameter
* read apns key filename and ID from env
* connect APNS client to server, fix notification JSON encoding to use dash case
* do not connect to APNS on start to pass CI tests
* fix CI test
* remove redundant import
* Revert "increase PING timeout, add PING failure count"
This reverts commit a89e019bb0.
* Revert "PING error now throws error to restart SMPClient for more reliable re-connection (#342)"
This reverts commit 62acbc4ad4.
* only process END from the currently active client
* log ignored END
* make PING sent every 15 sec and destroying connection on failure (for testing - to be reverted)
* make removing subscription atomic too
* Revert "make PING sent every 15 sec and destroying connection on failure (for testing - to be reverted)"
This reverts commit 5520b318a20cebb849cbd1872561f87d145b6a16.
* refactor, aggressive PING settings for testing
* revert PING breaking connection
* agent schema/methods/types/store methods for notifications tokens
* register notification token on the server
* agent commands for notification tokens
* refactor initial servers from AgentConfig
* agent store functions for notification tokens
* server STM store methods for tokens
* fix protocol client for ntfs (use generic handshake), minimal server and agent tests
* server command to verify ntf token
* process ntf server commands
* when subscription is re-created and it was ENDed, resubscribe to SMP
* SMPClientAgent draft
* SMPClientAgent: remove double tracking of subscriptions
* subscriber frame
* PING error now throws error to restart SMPClient for more reliable re-connection (#342)
* increase TCP timeout to 5 sec
* add pragmas and vacuum db (#343)
* vacuum in each connection to enable auto-vacuum (#344)
* update protocol, token verification
* refactor SMPClient to ProtocoClient, to use with notification server protocol
* notification server client, managing notification clients in the agent
* stub for push payload
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* notifications: protocol
* update protocol to include subscription ID and DH public key
* update protocol, started server
* add notification server subscription DH key
* use the same command type in notifications protocol, protocol parsing, server frame
* remove empty files
* use TCP keep-alive instead of SMP protocol PING
* update header files
* use CInt
* use Int again
* use network-3.1.2.7
* use https in cabal.project
* confitional keep-alive parameters to work on mac
* pass keep-alive opts via client/agent options
* remove space
* make KeyHash non-optional, StrEncoding class
* change server URI format in agent config, refactor with StrEncoding
* refactor Crypto using checkAlgorithm
* refactor parsing connection requests
* prepare to validate CA fingerprint sent in client handshake
* KeyHash check in handshake
* rename type to CliCommand
* server validates keyhash sent by the client
* validate -a option when parsing
* more of StrEncoding
* binary SMP protocol encoding (server tests fail)
* use 1 byte for bytestring length when encoding/decoding
* Encoding class, binary tags
* update server tests
* negotiate SMP version in client/server handshake
* add version columns to queues and connections
* split parsing SMP client commands and server responses to different functions
* check uniqueness of protocol tags
* split client commands and server responses/messages to separate types
* update types in SMP client
* remove pattern synonyms for SMP errors
* simplify getHandshake
* update SMP protocol encoding in protocol spec
* encode time as a number of seconds (64-bit integer) since epoch