mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-29 14:30:22 +00:00
c53cbac8d25c8ee5fbbcd18f86eb8f8bc5c1f6a6
simplex-messaging
SMP server demo
This is a demo implementation of SMP (simplex messaging protocol) server.
It has a very limited utility (if any) for real applications, as it lacks the following protocol features:
- cryptographic signature verification, instead it simply compares provided "signature" with stored "public key", effectively treating them as plain text passwords.
- there is no transport encryption
Because of these limitations, it is easy to experiment with the protocol logic via telnet.
You can either run it locally or try with the deployed demo server:
telnet smp.simplex.im 5223
Run locally
Install stack and stack run.
Usage example
Lines you should send are prefixed with > character, you should not type them.
Comments are prefixed with --, they are not part of transmissions.
> on its own means you need to press return - telnet should be configured to send it as CRLF.
- Create simplex message queue:
>
>
> NEW 1234 -- 1234 is recipient's key
IDS QuCLU4YxgS7wcPFA YB4CCATREHkaQcEh -- recipient and sender IDs for the queue
- Sender can send their "key" to the queue:
> -- no signature (just press enter)
> YB4CCATREHkaQcEh -- sender ID for the queue
> SEND :key abcd
YB4CCATREHkaQcEh
OK
- Secure queue with sender's "key"
> 1234 -- recipient's "signature" - same as "key" in the demo
> QuCLU4YxgS7wcPFA -- recipient ID
> KEY abcd -- "key" provided by sender
QuCLU4YxgS7wcPFA
OK
- Sender can now send messages to the queue
> abcd -- sender's "signature" - same as "key" in the demo
> YB4CCATREHkaQcEh -- sender ID
> SEND :hello
YB4CCATREHkaQcEh
OK
- Recipient recieves the message and acknowledges it to receive further messages
QuCLU4YxgS7wcPFA
MSG ECA3w3ID 2020-10-18T20:19:36.874Z 5
hello
> 1234
> QuCLU4YxgS7wcPFA
> ACK
QuCLU4YxgS7wcPFA
OK
Design
Languages
Haskell
90.7%
HTML
3.4%
Shell
2.5%
CSS
1.7%
C
0.8%
Other
0.8%