Commit Graph

18 Commits

Author SHA1 Message Date
Efim Poberezkin dca1bee926 chat: fix welcome line (#51) 2021-02-26 18:17:29 +04:00
Evgeny Poberezkin 1f38beb23d add mutex to prevent ansi codes appearing in the output (#50) 2021-02-26 18:17:29 +04:00
Evgeny Poberezkin 1251caa4e8 terminal UI (#44)
* separate terminal IO to separate thread via queues

* terminal input arithmetics (WIP)

* editable multiline terminal input

* print messages above input area

* support Up/Down arrows

* terminal chat: move by word, move to the beginning/end of input

* insert active contact when typing starts

* refactor inserting active contact

* highlight "to contact"

* add username to prompt

* change beginning/end of line keys to shoft-arrow

* remove unused code

* add ctrl arrow key bindings

* add comment for debugging keys in terminal

Co-authored-by: Efim Poberezkin <efim.poberezkin@gmail.com>
2021-02-26 18:17:29 +04:00
Efim Poberezkin 033af51d6d add instructions on how to run chat client to README (#43)
* add instructions on how to run chat client to README

* wording

* wording

* corrections to the manual

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2021-02-26 18:17:29 +04:00
Efim Poberezkin f3840928e0 dog-food: distinguish self from contacts (#42)
* dog-food: distinguish self from contacts

* add missing space

* rename tty functions

* return indents

* remove indentation in sent messages

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2021-02-26 18:17:29 +04:00
Evgeny Poberezkin 0fe41dbf16 Sign / verify SMP commands (#37)
* generate key pair

* crypto: sign/verify functions

* remove extension

* parse/serialize keys

* use RSA recipient/sender keys (TODO sign/verify)

* make PublicKey newtype, assign 0s to private_p & private_q

* replace SMP command parsing with Attoparsec

* rename types: Signed->Transmission, Transmission->SignedTransmission

* sign and verify commands (server tests skipped, agent tests pass)

* SMP client: avoid seralizing transmission twice when sending commands

* update SMP server tests to use command signatures

* remove support for "SEND :msg" syntax from SMP server protocol

* rename RSA module name to R to avoid confusion with C used for S.M.Crypto

* update key sizes to use bits `div` 8

* tidy up
2021-02-26 18:14:22 +04:00
Evgeny Poberezkin 1f61267308 chat prototype (#35)
* chat prototype

* chat prototype now compiles

* chat prototype works

* agent: respond SENT mId to SEND (instead of OK), ne repsonse to chat message in terminal

* chat prototype help, update commands

* chat CLI options

* add active contact to ChatClient (not used yet)

* refactor agentTransmission

* InviteContact -> AddContact

* automatically insert active contact

* highlight contact in chat

* name for invitations

* do not ask name on start

* change default server to smp.simplex.im
2021-02-26 18:13:04 +04:00
Evgeny Poberezkin d82c286a54 Logging (#24)
* logging with simple-logger

* refactor Agent.Client

* move logging to Agent.Client

* clean up

* log command name only
2021-02-26 18:11:22 +04:00
Evgeny Poberezkin 2e6ba85308 SMP client library (#9)
* functions to send SMP commands and receive responses

* refactor agent: use SMPClient

* fix tests, remove ServerClient.hs

* refactor processCommand

* fix Agent.hs

* fix SMPClient, tests

* "forever" to SMPClient process
2021-02-26 18:09:26 +04:00
Evgeny Poberezkin d260a464d6 add error handling, function to process SMP responses 2021-01-03 10:42:41 +00:00
Evgeny Poberezkin cdf8695bef send NEW command to SMP server (response is not received for some reason...) 2020-12-29 20:51:09 +00:00
Evgeny Poberezkin a3b53f68c5 empty database schema 2020-12-26 21:22:17 +00:00
Evgeny Poberezkin 501e8a140a rename Env.hs -> Env/SQLite.hs 2020-12-26 13:01:57 +00:00
Evgeny Poberezkin b234c0afee started SMP agent 2020-12-25 16:46:18 +00:00
Evgeny Poberezkin 2ed24e683e rename Config to ServerConfig 2020-12-25 16:46:17 +00:00
Evgeny Poberezkin 3cb2421373 move modules to folder Simplex.Messaging.Server 2020-11-22 18:22:20 +00:00
Evgeny Poberezkin 35f83b604a rename "connection" to "queue" 2020-10-22 12:50:55 +01:00
Evgeny Poberezkin 480ff86907 move Main to apps/smp-server 2020-10-21 19:04:15 +01:00