Commit Graph

424 Commits

Author SHA1 Message Date
spaced4ndy
bfab76ed90 core: allow sending messages immediately on joinConnection, acceptContact (#4465) 2024-07-18 20:33:51 +04:00
Evgeny Poberezkin
ff8bbf11e7 core: allow start in extension without subscriptions but with enabled files (#4464)
* core: allow start in extension without subscriptions but with enabled files

* only start sending files

* update

* update

* update simplexmq
2024-07-17 14:14:19 +01:00
Evgeny Poberezkin
bf59402856 cli: option to only use SOCKS5 proxy with onion-only relays (#4459)
* cli: option to only use SOCKS5 proxy with onion-only relays

* simplexmq

* show socks mode in CLI, fix to use correct network config
2024-07-15 23:04:09 +01:00
Evgeny Poberezkin
b348979b32 core: use disabled servers as known for private message routing (#4444)
* core: use disabled servers as known for private message routing

* send all servers to agent, add all preset servers

* update nix hashes

* refactor

* check that some servers are enabled, refactor

* update simplexmq

* remove functions
2024-07-12 14:12:20 +01:00
Evgeny Poberezkin
5f96f6c117 core: extending queue information to debug delivery (#4395)
* core: extending queue information to debug delivery

* simplexmq
2024-07-03 19:34:58 +01:00
spaced4ndy
4bd6517d19 core: servers stats improvements, fixes (#4358) 2024-07-03 15:58:37 +04:00
Evgeny Poberezkin
5907d8bd0c core: remove legacy agent stats (#4375) 2024-07-01 11:25:27 +01:00
spaced4ndy
d951003191 core: servers summary api (#4319)
* core: servers summary api

* rework

* server known types

* set stats file path

* rename

* local simplexmq

* update

* rfc

* update

* update

* get servers

* compile summary

* remove sort

* rename

* rename, refactor

* refactor attempt

* refactor attempt 2

* refactor

* fix

* fix2

* remove space

* refactor xftp

* update

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2024-06-25 09:51:55 +04:00
spaced4ndy
a58522ef15 core: api to reconnect single server (#4317) 2024-06-17 11:52:55 +04:00
spaced4ndy
490e8cead8 core: file errors (#4261) 2024-06-05 21:02:13 +04:00
Evgeny Poberezkin
ef30fcf5e2 cli: options for private message routing and fallback mode (#4256)
* cli: options for private message routing and fallback mode

* remove short options

* fix tests

* encoding

* fix
2024-05-31 23:41:20 +01:00
Evgeny Poberezkin
5ac521f6d8 core: commands to debug subscribed SMP queues (#4253)
* core: commands to debug subscribed SMP queues

* getLastRcvMsgInfo

* DESC

* update

* update commands, ui compiles

* update

* ios: fix type

* swap

* simplexmq

* group member queue info

* copy button in the alert
2024-05-31 12:45:58 +01:00
spaced4ndy
54088c6d5a core: "/get queues" api to debug agent queues (#4252) 2024-05-30 14:24:33 +04:00
spaced4ndy
2143eb2d7a core: batch send pending group messages (#4242) 2024-05-28 18:32:29 +04:00
spaced4ndy
3d395b0e45 core: inactive connections/members (#4009) 2024-05-28 16:42:07 +04:00
Evgeny Poberezkin
291df6e9d0 core: logging of chat events (#4216)
* core: update simplexmq (persist server errors)

* fix

* same config

* logging

* logging 2

* log

* log 2

* finally

* catch better

* more logs

* logs

* fix

* more logging, context from PROHIBITED

* warning

* more logs

* logs3

* logs4

* logs in simplexmq

* log locks from simplemq

* log queue size

* log sendMessagesB in simplexmq

* update simplexmq

* logs5

* logs6

* logs7

* logs8

* logs8

* logs9

* logs10

* log11

* log12

* fix test

* more logs

* logging

* clean up

* refactor

* simplify

* tags

* log level

* remove network errors from the log

* rename
2024-05-24 21:09:21 +01:00
spaced4ndy
d2d450d1d7 core: check known relays before file reception, support user approval of unknown relays (#4043)
* core: check known relays before file reception, support user approval of unknown relays

* comment

* reset on not approved agent error

* add privacyAskToApproveRelays to AppSettings

* filter distinct servers

* update simplexmq

* remember user_approved_relays

* refactor

* rename

* update simplexmq

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-05-20 17:23:29 +04:00
spaced4ndy
49e09ca449 core: contact disabled event (#4194) 2024-05-16 17:08:13 +04:00
spaced4ndy
ef75eceb40 core: support message forwarding with custom ttl (#4191) 2024-05-16 14:11:55 +04:00
Evgeny Poberezkin
331b4633fc core: platform independent encoding for delete command (#4176) 2024-05-13 20:39:13 +01:00
Evgeny Poberezkin
29db2b4e9b core: command to show duplicate message count (#4172)
* core: command to show duplicate message count

* update

* updated

* update

* update

* simplexmq
2024-05-13 19:55:57 +01:00
spaced4ndy
f40ba6f04d core: api to differentiate contacts and conversations (#4111) 2024-05-13 16:51:54 +04:00
Evgeny Poberezkin
bc5af35a3e core: wallpapers api (#4110)
* core: wallpapers api

* optional colors

* update

* api

* update

* whitespace

* typo

* test, fix

* fix color parsing

* separate UI and Theme color schemes

* update

* enable test

* multiple themes, one per color scheme

* theme overrides as a separate type

* rename

---------

Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
2024-05-08 15:36:20 +01:00
spaced4ndy
7567791866 core: enable PQ encryption for contacts (#4049)
* wip

* migration

* remove migration

* remove flag wip

* Revert "remove migration"

This reverts commit 9e64663f9d.

* wip

* remove vrange parameterization

* tests mostly pass

* more tests pass

* enable for upgraded contacts

* remove migration

* core: test large messages (#4061)

* update simplexmq, fix tests

* test test

* another test

* enable tests

* empty

* empty
2024-04-22 17:46:48 +01:00
spaced4ndy
648884044f core: prohibit forwarding file if it's not found (#4047) 2024-04-19 11:31:44 +04:00
Evgeny Poberezkin
b3a4ea8e57 core: api to update user network state (#3998)
* core: api to update user network state

* simplexmq

* update simplexmq

* simplexmq
2024-04-10 23:32:55 +01:00
Evgeny Poberezkin
72611084d3 core: debug events (#4006) 2024-04-09 17:31:52 +01:00
Evgeny Poberezkin
a5db36469d core: api to forward messages (#3968)
* wip

* wip

* test

* mute

* tests

* simplify (only bool flag)

* re-encrypt file

* tests

* more tests (wip)

* fix relative paths, refactor

* more tests

* more locks

* fix, tests

* more tests

* rework (revert from bool to ids)

* update schema

* more tests

* add to info

* ForwardedMsg container

* Revert "ForwardedMsg container"

This reverts commit bb57f12151.

* parser

* more tests

* rework api

* more locks

* test

* move

* remove from

* view

* prohibit editing

* item info view

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2024-04-09 16:02:59 +04:00
Evgeny Poberezkin
18efc28d16 core: additional group preferences: prohibit SimpleX links, restrict some features to specific roles (#3964)
* core: additional group preferences: prohibit SimpleX links, restrict some features to specific roles

* add role to group preference items, tests
2024-04-04 20:41:56 +01:00
spaced4ndy
069395c2a0 core: entity locks (#3962)
* core: entity locks

* more locks

* update sha256map

* add delay

* clean up

* empty

* fix tests

* empty

* empty

* more delays

* empty

* comment delays

* Revert "comment delays"

This reverts commit 4245b545fb.

* Revert "Revert "comment delays""

This reverts commit f803386945.

* take lock in the beginning of processing loop

* empty

* empty

* remove lock

* rework file locks

* empty

* fix

* empty

* add connection locks

* empty

* fix test

* empty

* remove commented delays

* add to debug locks

* update

* refactor

* refactor

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-04-04 19:24:42 +01:00
Evgeny Poberezkin
d90e2f4436 core: remove mtl typeclasses to reduce overhead (#3975)
* core: remove mtl typeclasses to reduce overhead

* strict data, optimization

* update simplexmq, clean up

* un-unlift attachRevHTTP2Client

* remote

---------

Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com>
2024-04-01 13:34:45 +01:00
Evgeny Poberezkin
86fe28f1ed core: chat hooks allowing to extend or customize chat core (#3953)
* core: chat hooks allowing to extend or customize chat core

* update

* json

* custom response

* user in db queries
2024-03-29 18:30:17 +00:00
spaced4ndy
240ca30f91 core: remove withStoreCtx (#3903) 2024-03-13 13:57:17 +04:00
Alexander Bondarenko
7fa2f2f72e core: organize withAckMessage (#3889)
* core: organize withAckMessage

* mark critical sections

* differentiate DB internal error from chat

* throw CRITICALs

* only CRIT on SEDatabaseError

* normalize errors

* shift MonadError into ExceptT

* simplify

* split critical handlers

* names, CRITICAL error in withAckMessage, comments

* only show critical alerts when database was locked or busy and message failed to process

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-03-12 17:47:38 +00:00
Alexander Bondarenko
4a404f14d9 core: add error message to CRSndFileError (#3894)
* core: add error message to CRSndFileError

* show snd errors
2024-03-12 14:19:40 +00:00
Evgeny Poberezkin
60a73a539e core: add agreed connection version field (#3881)
* core: add agreed connection version field

* fix

* progress

* use pqSupport and version to decide compression in messages

* pass version to encodeConnInfoPQ

* update pq enable/disable api

* remove TestConfig

* update nix dependencies

* update texts

* corrections

* create e2ee info items when connection switches from off to on first time

* corrections

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* comment

* increase test timeout

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2024-03-10 11:31:14 +00:00
Evgeny Poberezkin
b86b5578de Merge branch 'master' into pq 2024-03-08 13:47:10 +00:00
Evgeny Poberezkin
435ea9a453 core: api to pass additional information with standalone file URI (#3873)
* xftp: redirect for descriptions with more than one chunk

* handle errors

* core: api to pass additional information with standalone file URI

* cleanup

* test info with large file

* Apply suggestions from code review

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>

* remove db-mediated client data

* refactor

* fix

---------

Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com>
2024-03-08 13:38:48 +00:00
spaced4ndy
bc2b135880 core (pq): update types (#3872)
* core (pq): update types

* imports

* encode / max msg size types

* integrate new types

* update types/pq support

* tests compile

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-03-07 17:39:09 +04:00
spaced4ndy
61a3eb32ee core (pq): global flag only affects new connections; api to allow PQ in old contacts (#3869) 2024-03-06 19:06:01 +04:00
Alexander Bondarenko
64dc758ffd core: compressed message encoding, variable vrange (#3844) 2024-03-06 18:02:19 +04:00
spaced4ndy
eebf014ff7 core (pq): integrate agent api, create e2ee info items (#3859) 2024-03-05 20:27:00 +04:00
spaced4ndy
2155060ad0 core: groundwork for post-quantum encryption support (#3845) 2024-03-03 17:51:42 +04:00
spaced4ndy
51a2e09714 core: batch db operations for group leave and delete (#3807)
* core: batch db operations for group leave and delete

* remove comment

* batch delete files

* cleanup

* rename

* use new agent api

* refactor

* refactor, catch error

* refactor

* update simplexmq

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-02-26 15:36:42 +04:00
Evgeny Poberezkin
e37654772f core: api to save/get app settings to migrate them as part of the database (#3824)
* rfc: migrate app settings as part of export/import/migration

* export/import app settings

* test, fix

* chat: store app settings in db (#3834)

* chat: store app settings in db

* add combining with app-defaults

* commit schema

* test with tweaked settings

* remove unused error

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>

* remove app settings from export/import

* test, more settings

---------

Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com>
2024-02-24 15:00:16 +00:00
spaced4ndy
b0b249a56a Merge branch 'stable' 2024-02-22 12:11:23 +04:00
spaced4ndy
c544a636f6 core, ui: remove usage of inline files (send only xftp files) (#3823) 2024-02-20 13:56:31 +04:00
Alexander Bondarenko
daf67c0456 core: add direct xftp upload/download commands (#3781)
* chat: add direct xftp upload/download commands

* adapt to FileDescriptionURI record

* bump simplexmq

* add description uploading

* filter URIs by size

* cleanup

* add file meta to events

* remove focus

* auto-redirect when no URI fits

* send "upload complete" event with the original file id

* remove description upload command

* add index

* refactor

* update simplexmq

* Apply suggestions from code review

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* fix /fc command for non-chat uploads

* fix

* rename (tests fail)

* num recipients

* update messages

* split "file complete" events for chats and standalone

* restore xftpSndFileRedirect

* remove unused store error

* add send/cancel test

* untangle standalone views

* fix confused id

* fix /fc and /fs

* resolve comments

* misc fixes

* bump simplexmq

* fix build

* handle redirect errors independently

* fix missing file status in tests

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-02-19 10:21:32 +00:00
Alexander Bondarenko
364b62320b controller: add db passphrase test command (#3788)
* controller: add passphrase test

* refactor

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-02-18 13:28:24 +00:00
spaced4ndy
e39544dd24 core: return ntf server in APIGetNtfToken (#3797) 2024-02-12 21:21:20 +04:00