diff --git a/README.md b/README.md index c4d452f..cf33d93 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ better RAC client - gtk4 modern GUI - RACv1.99.x and RACv2.0 compatible -- WRAC compatible (can be enabled in the settings) +- WRAC compatible ([docs](docs/wrac.md)) - chat commands (type /help) - no ip and date visible for anyone - uses TOR proxy server by default (meex.lol:11234) @@ -90,6 +90,7 @@ messages starting with a slash are sent to chat only if the `--disable-commands` ## see also - [RAC-Hub - all about RAC protocol](https://the-stratosphere-solutions.github.io/RAC-Hub/) +- [WRAC protocol (v2.0)](docs/wrac.md) - [RAC protocol (v2.0)](https://gitea.bedohswe.eu.org/pixtaded/crab#rac-protocol) - [CRAB - client & server for RAC](https://gitea.bedohswe.eu.org/pixtaded/crab) - [Mefidroniy - client for RAC](https://github.com/OctoBanon-Main/mefedroniy-client) diff --git a/docs/cross_compile.md b/docs/cross_compile.md deleted file mode 100644 index 73c5eb5..0000000 --- a/docs/cross_compile.md +++ /dev/null @@ -1,15 +0,0 @@ -# Cross-compile on Linux to Windows - -## Install dev packages - -on Nix: - -```bash -nix-shell -p pkgsCross.mingwW64.stdenv.cc pkgsCross.mingwW64.windows.pthreads pkgsCross.mingwW64.gtk4 -``` - -## Build - -```bash -build build/windows-x86_64 -``` \ No newline at end of file diff --git a/docs/wrac.md b/docs/wrac.md new file mode 100644 index 0000000..454b01e --- /dev/null +++ b/docs/wrac.md @@ -0,0 +1,84 @@ +# WRACv2.0 Protocol + +Uses websocket for connections, and sends binary data only (works in packet-way manner) + +Totally inherits all packets of RACv2, except of reading messages + +## Sending messages + +Client sends: + +- Byte `0x01` +- Message text + +## Sending authorized messages + +Client sends: + +- Byte `0x02` +- Username +- `\n` +- Password +- `\n` +- Message + +Server sends: + +- nothing if message was sent successfully +- `0x01` if the user does not exists +- `0x02` if the password is incorrect + +## Registration users + +Client sends: + +- Byte `0x03` +- Username +- `\n` +- Password + +Server sends: + +- nothing if user was registered successfully +- `0x01` if the username is already taken + +## Reading messages + +### Getting message length + +Client sends: + +- Byte `0x00` + +Server sends: + +- Size of all messages in ASCII (data_size) + +### Normal reading + +This packet is independent from getting message length packet. + +Client sends: + +- Byte `0x00` +- Byte `0x01` + +Server sends: + +- All messages + +### Chunked reading + +This packet is independent from getting message length packet. + +Client sends: + +- Byte `0x00` +- Byte `0x02` +- Size of messages you have in ASCII (last_size) + +Server sends: + +- All new messages + +*for example: if you want to read last N bytes, last_size = data_size - N* \ No newline at end of file