Evgeny Poberezkin
b5b1709c24
rename version
2024-02-10 12:13:05 +00:00
Evgeny Poberezkin
a734c29eeb
do not send session ID in each transmission
2024-02-09 19:53:06 +00:00
Evgeny Poberezkin
3295fbee8b
test batching SMP v7
2024-02-08 23:54:09 +00:00
Evgeny Poberezkin
816d9a9d91
separate client and server versions for SMP protocol
2024-02-08 22:20:29 +00:00
Evgeny Poberezkin
1a7336aa26
make TransmissionAuth Maybe
2024-02-07 00:19:12 +00:00
Evgeny Poberezkin
3efdd7a256
extract authenticator to Crypto module
2024-02-06 23:40:42 +00:00
Evgeny Poberezkin
9a93c6ba80
remove old tests
2024-02-06 09:17:34 +00:00
Evgeny Poberezkin
a7a467196f
smp: command authorization
2024-02-05 09:07:27 +00:00
Alexander Bondarenko
15bc027f23
core: fix reconnection bugs ( #979 )
...
* core: fix reconnection bugs
* untangle newProtocolClient
* refactor
* report busy clientVar error
* log error
* comments
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-02-01 10:55:50 +00:00
Evgeny Poberezkin
7f7a77c4eb
SMP protocol: optimize batching transactions, remove Builder ( #961 )
...
* remove Builder
* fewer chunks
* remove lazy bytestrings
* optimize
* pad
2024-01-14 20:42:47 +00:00
Evgeny Poberezkin
ca527b4d6c
use Builder for batching commands ( #953 )
...
* use Builder for batching commands
* refactor
* refactor
* increase timeout in test
* do not materialize builder
* use concat
* debug test
* debug2
* delays
* more delay, less worker delay
* remove logs
* reduce delay
* tests
* sized builder
* builder
* comment
* remove unsafe
* style
* remove fromIntegral
2024-01-08 22:54:27 +00:00
Evgeny Poberezkin
f576260594
client: increase default network timeouts ( #918 )
2023-12-12 12:01:38 +00:00
Alexander Bondarenko
1a8dfb4cbe
agent: xrcp implementation for connection via link (no multicast) ( #884 )
...
* WIP: start working on connection invites
startSession/OOB is broken now - the port isn't coming from the actualy assigned one.
* Add invite types
* clean old invite-related types
* apply renames
* Move SessionKeys from Invitation
* Stub host-side keys and handle
* move keys and handles to Types
* add Simplex.RemoteControl.Client
* more keys
* progress
* crypto for sessions
* progress to multicast
* multicast crypto
* add RC TLS server
* agent api for remote control
* WIP: tls client
* fix test
* update encoding to include nonce
* add TODO
* update
* Use network-info to find TransportHost
* request and submit tls client certificate
* WIP: add missing bits for testing RC client
* RCEncryptedHello encoding
* add block encoding
* refactor
* validate known host certificate
* remove some spaghetti
* functional API to host/ctrl clients
* refactor connectRCCtrl_
* refactor connectRCHost
* question
* add type
* fix RC session
* update doc
* update doc 2
* add block on confirmation
* remove unused parameter
* export CtrlSessKeys
* export
* fix parsing
* move test of xrcp handshake
* move KEM to HELLO step
* fix JSON
* type
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2023-11-07 13:05:18 +00:00
Evgeny Poberezkin
511d793b92
derive JSON instances with TH ( #869 )
...
* derive JSON instances with TH
* defaultJSON
* remove ToJSON
2023-10-26 09:20:30 +01:00
Evgeny Poberezkin
9d12d76078
add fourmolu ( #868 )
...
* add fourmolu
* linebreak
* simplify
* comment
2023-10-22 09:20:14 +01:00
Evgeny Poberezkin
84ce037867
extend SMP protocol to allow creating new queues without subscriptions ( #839 )
...
* Trace auto-subs flag
* Replace Bools with SubscriptionMode
* Handle SMOnlyCreate
* Wire remaining todos
* Update tests and fix
* Bump protocol level
* Apply suggestions from code review
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
* Scrub needs_sub from agent DB
* Scrub a few more needSubs from the agent api
* change API, fix test
* agent: do not subscribe to queue when creating reply queue
* fix encoding
* WIP: SMOnlyCreate test
* Add SM guard for confirmQueue
Allows the test case to pump the allowConnection
reply without getting PROHIBITED.
* Remove tracing
* add noMessages, remove unnecessary getConnectionMessage from test
* add sending messages to the test
---------
Co-authored-by: IC Rainbow <aenor.realm@gmail.com >
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
2023-09-10 17:07:19 +01:00
Evgeny Poberezkin
40e6d16e48
client: streaming batched commands, refactor ( #826 )
2023-08-19 16:11:05 +01:00
Evgeny Poberezkin
f3111f4559
client: batch while sending commands - wait for responses before sending the next batch ( #825 )
...
* client: batch while sending commands - wait for responses before sending the next batch
* fix comments
* fix tests
2023-08-18 21:02:47 +01:00
Evgeny Poberezkin
58dbc197ce
increase TCP timeout for clients ( #797 )
2023-07-11 18:54:14 +01:00
Evgeny Poberezkin
16367fcb3b
make timeouts for batched functions dependent on the number of batches ( #786 )
...
* make timeouts for batched functions dependent on the number of batches
* fix
* refactor
* refactor
* change import
* refactor
* rename function
* rename
* refactor
* remove space
2023-06-30 12:26:09 +01:00
Evgeny Poberezkin
f7d038ef20
agent: more batched commands ( #782 )
...
* agent: more batched commands
* layout
2023-06-28 19:50:11 +01:00
Evgeny Poberezkin
4a927d1ae2
ntf server: better batching and logging ( #780 )
...
* ntf server: better batching and logging
* reduce batch delay for ntf server
* comments
* 5.1.3, ntf 1.4.2
* more logging
* more logging
* split large batches, more logging
* remove some logs
2023-06-26 20:14:35 +01:00
Evgeny Poberezkin
acea477aab
batch subscriptions for ntf server ( #778 )
...
* return updated ConnectionStats from switchConnectionAsync (#777 )
* batch ntf server subscriptions to SMP servers
* refactor
* fix filtering queues in reconnect
* test, remove repeated grouping
* enable all tests
* reduce subscriptions count
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
2023-06-25 08:27:50 +01:00
spaced4ndy
bdff274f56
use Int64 for time calculations ( #706 )
2023-04-04 14:51:13 +04:00
spaced4ndy
cf147397a4
xftp: agent receive file ( #637 )
...
* xftp: agent receive file draft
* receiveFile more stubs, changes to types, schema
* cabal file
* comments
* xftp_server_id
* schema changes, get client, local worker/action
* agent env, save file description, adjust schema
* client stubs
* download chunk wip, store, schema, types
* remove commented code
* read file description, schema, types
* check received, decrypt
* remove pure
* todo
* add XFTP to agent client
* add user id
* agent test
* tests
* rename supervisor into agent
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2023-03-03 18:50:16 +04:00
Evgeny Poberezkin
bbf9e28696
xftp: add server to client encryption layer with cryptobox ( #646 )
...
* xftp: add server to client encryption layer with cryptobox
* workarounds for http2
* update http2 commit
* remove TODOs
2023-02-22 09:03:18 +00:00
Evgeny Poberezkin
15637e545b
Merge branch 'master' into xftp
2023-02-17 21:40:35 +00:00
Evgeny Poberezkin
2ddfb044fc
parameterize protocol by error type ( #644 )
2023-02-17 20:46:01 +00:00
spaced4ndy
4e8657097c
xftp: cli client draft ( #635 )
...
* xftp: cli client draft
* more stubs
* compiles
* hash, app
* options parsers, random
* tmp
* xftp CLI client agent, simplify CLI command syntax
* only allow argument as a second parameter
* pivot signature draft
* receive file
* pivot sent chunks to recipients
* encryptFile - temp, chunks, specs
* send (upload) file and save file descriptions
* refactor, remove encrypted file
* save file size in description as string
* include filename inside padded encrypted file
* call chunk uploads concurrently, using queueing in HTTP2 as library client does not support concurrent streaming uploads
* download file (does not work yet)
* add digests to sent chunks
* fix recv - save file using AppendMode
* encrypt/decrypt sent file with secretbox
* remove print
* fix file description parsing in tests
* fix test
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2023-02-16 14:06:03 +04:00
Evgeny Poberezkin
eb1723acce
refactor transport encoding, make client IO error "temporary" ( #634 )
...
* file server/client framework
* refactor
* make IOError temporary
* fix test
2023-02-10 19:06:28 +00:00
Evgeny Poberezkin
f66e8239f4
Merge branch 'master' into users
2023-01-19 17:45:31 +00:00
Evgeny Poberezkin
56eea29ec3
end SMP client connection after configured number of PING errors, reset PING error count on any success ( #615 )
...
* end SMP client connection after configured number of PING errors, reset PING error count on any success
* only terminate client on PING timeout
* refactor
* comment
2023-01-19 17:45:06 +00:00
Evgeny Poberezkin
a854b5f2b2
batched queue deletion ( #611 )
...
* batched queue deletion
* only re-connect client on subscribe errors, not in all batch commands
* add test, fix
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
* refactor
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
2023-01-19 16:53:28 +00:00
Evgeny Poberezkin
324e01300d
execute asynchronous commands for correct users, include session in messages from SMP clients to agent ( #608 )
...
* execute asynchronous commands for correct users
* pass transport session to message processing to avoid race condition
* account for server changes when determining unused servers
* enable one test
* enable all tests, remove log
2023-01-16 11:06:19 +00:00
Evgeny Poberezkin
f4ad3a983e
support users in agent to isolate traffic of different users ( #598 )
...
* users table, isolate traffic sessions by users or by queues
* remove extra indices
* corrections
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
2023-01-11 17:47:20 +04:00
Evgeny Poberezkin
61e0c346df
simplify C.sign, Crypto tests, triage TODOs ( #592 )
...
* simplify C.sign, Crypto tests, triage TODOs
* update condition
* remove todos
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
2023-01-06 15:34:05 +00:00
Evgeny Poberezkin
874f9f5cd6
option to enable/disable TLS handshake error logs (disable by default) ( #581 )
...
* option to enable/disable TLS handshake error logs (disable by default)
* refactor
2022-12-27 10:13:51 +00:00
Evgeny Poberezkin
1d3a604988
refactor SMP client, NTF server store ( #580 )
...
* refactor SMP client, NTF server store
* remove undefined
2022-12-26 18:54:28 +00:00
Evgeny Poberezkin
aa17cc55c1
collect agent stats ( #579 )
...
* collect agent stats
* remove comment
2022-12-26 12:02:20 +00:00
Evgeny Poberezkin
e4842f4f47
agent: include server address string into BROKER errors ( #575 )
...
* agent: include server address string into BROKER errors
* eol
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
2022-11-30 08:25:07 +00:00
Evgeny Poberezkin
e281efdcb8
server: SMP basic auth ( #561 )
...
* server: SMP basic auth
* update ini default
* rfc, types
* tests
* update INI file
* typo
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
* refactor
* update INI options, log new queue creation mode on start (on/off/requires auth)
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com >
2022-11-12 22:29:36 +00:00
Evgeny Poberezkin
29332a5e9f
lints ( #539 )
...
* lints
* revert
* add import
* remove StrictData
2022-10-01 11:51:52 +01:00
Evgeny Poberezkin
02bba01c16
send host events when server hosts are connected and disconnected ( #496 )
2022-08-13 11:57:36 +01:00
Evgeny Poberezkin
68138c08d2
support multiple server hostnames per queue ( #494 )
...
* 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
2022-08-12 11:32:04 +01:00
Evgeny Poberezkin
7d99c4b35c
reconnect agent clients on any network config change ( #489 )
...
* reconnect agent clients on any network config change
* add Eq instances
2022-08-03 09:59:49 +01:00
Evgeny Poberezkin
e9db0a1162
allow passing all network configuration to the agent ( #488 )
2022-08-02 13:30:00 +01:00
Evgeny Poberezkin
fcaddb7848
agent functions to get/set network configuration ( #484 )
...
* agent functions to get/set network configuration
* fix condition
2022-07-25 13:50:46 +01:00
Evgeny Poberezkin
d788c3ca95
access servers via SOCKS proxy ( #482 )
...
* access servers via SOCKS proxy
* config to pass tcp timeout and option SOCKS5 proxy to the agent
2022-07-23 13:57:10 +01:00
Evgeny Poberezkin
a6f401041a
SMP protocol v4: batching multiple server commands/responses in a transport block ( #470 )
...
* 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
2022-07-17 10:10:38 +01:00
Evgeny Poberezkin
abd694bd5a
parameterize protocol server by scheme ( #459 )
2022-07-05 21:56:14 +01:00