Alexander Bondarenko
c38a14194b
replace sbDecryptNoPad_ with nacl secretBoxOpen
2024-06-04 16:33:09 +03:00
Alexander Bondarenko
f63b360d6c
tweetnacl only uses -1 rc
2024-06-04 15:29:13 +03:00
Alexander Bondarenko
6f9dddd527
replace cryptoBox with nacl afternm
2024-06-04 13:08:52 +03:00
Alexander Bondarenko
ad640eccee
bind and test afternm
2024-06-04 12:02:03 +03:00
Alexander Bondarenko
4397e975cd
bind hsalsa20 and test shared secret compatibility with beforenm
2024-06-03 22:26:20 +03:00
IC Rainbow
53b3bebbcd
crypto: add tweetnacl bindings and test our cryptobox
2024-06-03 19:26:18 +03:00
Evgeny Poberezkin
d12ea92055
agent: report correct errors from xftp handshake so they are treated as temporary ( #1184 )
...
* agent: report correct errors from xftp handshake so they are treated as temporary
* disable slow servers test
* remove comments
* all tests
* remove duplicate functions
2024-05-31 09:47:47 +01:00
Evgeny Poberezkin
88f1b727e0
SMP protocol extension to debug subscribed SMP queues ( #1181 )
...
* SMP protocol extension to debug subscribed SMP queues
* fix, test
* corrections
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
* increase delays
* increase timeout
* delay
* delay
* enable all tests
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
2024-05-30 18:49:43 +01:00
Evgeny Poberezkin
5c2c88315a
SMP server information ( #1072 )
...
* SMP server information
* fix tests
* country codes
* smp-server: serve contact and link pages from static files (#1084 )
* smp-server: serve contact and link pages from static files
* generate index
* use params from ini
* render using ServerInformation
* tweak templates
* update
* fix some html
* smp-server: fix layout (#1097 )
* smp-server: fix layout
* port fixes to link page
---------
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
* update server information page
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
Co-authored-by: M. Sarmad Qadeer <MSarmadQadeer@gmail.com >
* update server info
* web: improve server info page design (#1166 )
* web: improve server info page design
* web: fix font errors & some tags
* web: improve contact & invitation page layout and header
* update
* remove unused files/css
* cleanup
* fix link page
* remove unused font links
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
* show contact address as is
---------
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
Co-authored-by: M. Sarmad Qadeer <MSarmadQadeer@gmail.com >
2024-05-29 11:30:42 +01:00
Evgeny Poberezkin
63f5e76f9c
agent: treat absent proxy session as a temporary error to retry sending ( #1178 )
...
* agent: treat absent proxy session as a temporary error to retry sending
* enable all tests
2024-05-29 08:06:01 +01:00
Evgeny Poberezkin
e55ec07fe2
server: log stats for QUOTA and other errors ( #1177 )
...
* server: log stats for QUOTA errors
* fix test
* more stats
* remove duplicate column
2024-05-28 15:32:41 +01:00
Evgeny Poberezkin
199f85ec62
agent: send MWARN on QUOTA errors ( #1176 )
...
* agent: send MWARN on QUOTA errors
* fix tests
2024-05-28 11:56:57 +01:00
Evgeny Poberezkin
4a96dbf871
server: preprocess proxy commands that will not be connecting to network to reduce concurrency, do not wait for destination relay responses before processing the next command ( #1174 )
...
* server: preprocess proxy commands that will not be connecting to network to reduce concurrency
* implementation
* tests
* increase proxy client concurrency
* simplify
* refactor
* refactor2
* rename
* refactor3
* fix 8.10.7
2024-05-28 09:38:47 +01:00
Evgeny Poberezkin
470dc74391
ntf server: do not persist server connection errors
2024-05-24 14:25:05 +01:00
Evgeny Poberezkin
2ff5f5a832
agent: add context to CMD error ( #1167 )
...
* agent: add context to CMD error
* tests, more warnings
* fix tests
* log TBQueue sizes
* log locks
* more logs
* log sendMessagesB
* fix test
* log length
* refactor
* remove logging
* revert lock scope change
* cleanup
* add string error to A_PROHIBITED
* remove
* remove test limitations
* language
2024-05-24 14:13:01 +01:00
Evgeny Poberezkin
875a56b75a
Merge branch 'stable'
2024-05-23 16:48:11 +01:00
Alexander Bondarenko
984394d906
core: remove MonadUnliftIO ExceptT orphans ( #1169 )
2024-05-23 16:44:00 +01:00
Alexander Bondarenko
5d38ad03af
tests: add proxy stress tests ( #1163 )
...
* tests: add proxy stress tests
* organize benches
* add agent tests
* move prints to logNote
* fix stuck agent tests
2024-05-23 15:34:25 +01:00
Evgeny Poberezkin
8097df5540
agent: persist server connection error ( #1165 )
...
* agent: persist server connection
* comment, refactor
* fix tests, reduce interval for ntf server
* cleanup
* 0
2024-05-22 13:25:49 +01:00
Evgeny Poberezkin
5bff2f5537
Merge branch 'stable'
2024-05-21 23:42:49 +01:00
Evgeny Poberezkin
f50589b31a
agent: remove external timeout to resubscribe ( #1164 )
...
* agent: remove external timeout to resubscribe
* liftIO
* fix tests
2024-05-21 22:52:22 +01:00
Alexander Bondarenko
f50fa5c60b
smp-server: limit concurrency in proxy command processing ( #1162 )
...
* smp: put client proxy command processing threads under a shared semaphore
* add LIMITS.max_proc_threads to server config
* rename to PROXY.client_concurrency
* retry on strictly greater than max concurrency
* set default to 16
* rename
* fix limit
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-05-21 12:53:33 +01:00
Alexander Bondarenko
f89d715a99
smp server: add proxy stats ( #1157 )
...
* smp-server: add proxy counters
* count simplex.im messages
* update
* fix
* get own servers from INI
* remove export
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-05-20 17:07:33 +01:00
spaced4ndy
2e5433676e
xftp: check proxy before downloading from unknown server ( #1102 )
...
* xftp: check proxy before downloading from unknown server
* corrections
* remove import
* tests
* comment
* tests
* don't wrap into internal error
* fix tests
2024-05-20 14:14:04 +01:00
Evgeny Poberezkin
8b21f7ef2a
agent: aggregate multiple expired subscription responses into a single UP event ( #1160 )
...
* agent: aggregate multiple expired subscription responses into a single UP event
* clean up
* refactor processing of expired responses
* refactor
* refactor 2
* refactor unexpectedResponse
2024-05-20 07:56:51 +01:00
Evgeny Poberezkin
7a15ea59c9
Merge branch 'stable'
2024-05-19 07:58:00 +01:00
Evgeny Poberezkin
1bb6a5c43b
agent: do not increase network activity interval while offline ( #1159 )
...
* agent: do not increase network activity interval while offline
* test
2024-05-19 07:50:47 +01:00
Evgeny Poberezkin
077ca9c046
Merge branch 'stable'
2024-05-17 15:38:06 +01:00
Evgeny Poberezkin
33f6d2f1da
agent: optimize waiting for user network to avoid contention for state updates from multiple threads ( #1155 )
...
* haskell magic
* update
* agent: optimize waiting for user network with TChan
* clean up
* Int64
* use TVar
* cleanup
* fix
* testing
* update
2024-05-17 15:12:05 +01:00
Evgeny Poberezkin
16d79da73e
config
2024-05-15 15:15:59 +01:00
Evgeny Poberezkin
2d2cc86bd8
Merge pull request #1095 from simplex-chat/proxy
...
SMP proxy feature branch
2024-05-14 21:35:51 +01:00
Evgeny Poberezkin
f51cf1deac
agent: use MVar for DB connection for more fair connection distribution between threads ( #1147 )
2024-05-14 20:04:51 +01:00
Evgeny Poberezkin
c4c983348f
Merge branch 'master' into proxy
2024-05-13 14:13:52 +01:00
Evgeny Poberezkin
91cc48aabe
agent: do not mark subscriptions on expired sessions as active, mark delayed subscriptions as active on the same session, do not cancel sending expired commands ( #1127 )
...
* agent: do not mark subscriptions on expired sessions as active, do mark delayed subscriptions as active on the same session, SUBOK response in the next SMP protocol version
* client: prevent sub actions from zombie sessions (#1122 )
* client: prevent sub actions from zombie sessions
* error handling
* add AERR to pass background errors to client
* switch to activeClientSession
* put closeClient under activeClientSession
* rename
* remove AERR, do not skip processing
* move check and state update to one transaction
* catch extra UPs
* fix
* check queue is still pending before making it active
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
* do not forward agent error
* revert not expiring sending subs
* fixes
* track subscription responses better
* add pending connection
* Revert "revert not expiring sending subs"
This reverts commit 4310a69391 .
* do not expire sending commands
* rename
* fix race
* function
---------
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
2024-05-12 17:47:08 +01:00
Evgeny Poberezkin
9f72b249b4
Merge branch 'master' into proxy
2024-05-11 10:25:35 +01:00
Evgeny Poberezkin
5cafd9d5c4
server: more efficient responses to batch subscriptions ( #1137 )
...
* server: more efficient responses to batch subscriptions
* comments
* comment
* enable tests
* LogError
2024-05-09 09:20:57 +01:00
Evgeny Poberezkin
b27f126bab
include server version range in transport handle ( #1135 )
...
* include server version range in transport handle
* xftp handshake
* remove coment
* simplify
* comments
2024-05-08 23:00:00 +01:00
Evgeny Poberezkin
6d471b8be2
Merge branch 'master' into proxy
2024-05-08 00:14:06 +01:00
Alexander Bondarenko
7a07076277
transport: require ALPN for extended handshakes ( #1134 )
...
* transport: require ALPN for extended handshakes
* fix 8.10 build
* rename
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-05-08 00:06:09 +01:00
Evgeny Poberezkin
a70f492f4d
proxy: fallback to direct connection if destination relay does not support proxy protocol ( #1132 )
...
* proxy: fallback to direct connection if destination relay does not support proxy protocol
* move version to TransportError, refactor
2024-05-07 13:37:40 +01:00
Alexander Bondarenko
c85f6a2f0e
proxy: reporting errors ( #1108 )
...
* smp-proxy: iron out errors
* treat proxy timeouts as temporary
* update errors
* proxy errors (missing encoding)
* update
* enable tests
* update
* update
* fix
* fix
* simplify
* test
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-05-06 22:00:42 +01:00
Evgeny Poberezkin
f22daf5cb6
Merge branch 'master' into proxy
2024-05-06 15:26:11 +01:00
Evgeny Poberezkin
ee8e4067b0
agent: prepare connection record before joining to prevent race conditions ( #1128 )
...
* agent: prepare connection record before joining to prevent race conditions
* prepare connection for contact address as well
* clean up
2024-05-05 12:12:19 +01:00
Alexander Bondarenko
0e205e70ad
add TRcvQueues tests ( #1117 )
...
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-05-03 23:39:00 +01:00
Evgeny Poberezkin
fb5d54e0a2
Merge branch 'master' into proxy
2024-05-01 12:52:04 +01:00
Evgeny Poberezkin
6d60de2429
proxy: agent implementation ( #1106 )
...
* proxy: agent implementation
* revert change
* update rfc
* test stuck subscription mock
* store proxy sessions inside SMP client var
* rename
* create and use proxy session
* tests
* return proxy in SENT event
* rename, more tests
* rename
* more tests
* remove comment
---------
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
2024-05-01 08:48:33 +01:00
Evgeny Poberezkin
fe28e02be7
agent: make version independent of PQ enqryption support ( #1114 )
...
* agent: make version independent of PQ enqryption support
* remove comment
2024-04-22 13:40:24 +01:00
Alexander Bondarenko
b98fdb672d
transport: increase client timeouts, don't send command after timeout ( #1110 )
...
* transport: fix client handshake timeouts
* fix handshake timeout
* skip sending requests for timed out responses
* expose batch concurrency as PClient field
* move to NetworkConfig
* remove Request on timeout
* use record
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-04-20 18:17:48 +01:00
Evgeny Poberezkin
2d1609f222
update envelope sizes for proxied messages, remove unnecessary proxy-relay encryption padding ( #1107 )
...
* update envelope sizes for proxied messages
* remove unnecessary padding from proxy-relay encryption
2024-04-19 20:24:25 +01:00
Alexander Bondarenko
58ede38bf4
put smp errors into proxy wrappers ( #1103 )
...
* put smp errors into proxy wrappers
* use substring in PROXY UNEXPECTED error
* fix encoding
* revert String encoding, discard invalid errors in QC
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com >
2024-04-19 14:58:15 +01:00