48 lines
2.1 KiB
Markdown
48 lines
2.1 KiB
Markdown
# EchoionProtocol
|
||
|
||
A native C++ implementation of the TeamSpeak 3/6 **full-client voice protocol**,
|
||
so Echoion can connect to a TeamSpeak server as its own client — no TeamSpeak
|
||
client and no plugin required. Ported from
|
||
[ts6-manager](https://github.com/clusterzx/ts6-manager)'s `tslib` (MIT) and
|
||
cross-checked against ReSpeak's protocol documentation.
|
||
|
||
TeamSpeak 6 has **no WebRTC voice** — its voice is still the legacy TS3 UDP
|
||
protocol on port 9987, which this library speaks.
|
||
|
||
## Modules
|
||
|
||
| Module | Purpose |
|
||
|--------|---------|
|
||
| `Crypto` | AES-128-EAX (composed from AES-CTR + CMAC/OMAC1), per-packet key/nonce derivation, SHA hashes. **Byte-verified against RFC 4493 (CMAC) and the EAX spec test vectors.** |
|
||
| `Identity` | ECDSA P-256 identity, libtomcrypt public-key export ("omega"), uid, hashcash security-level. OpenSSL. |
|
||
| `License` | TS6 `initivexpand2` license chain — Ed25519 point arithmetic via libsodium. |
|
||
| `Command` | TS3 escaped `key=value` command serialization + notify parsing. |
|
||
| `QuickLz` | QuickLZ level-1 decompression for compressed command packets. |
|
||
| `TsClient` | UDP socket, handshake (`init0`–`init4` + RSA puzzle, `clientinitiv`, `initivexpand`/`initivexpand2`), per-packet crypto, ack/resend, keepalive, voice/whisper send, event callbacks. |
|
||
|
||
## Dependencies
|
||
|
||
OpenSSL (crypto), libsodium (Ed25519), libopus (only consumed by the host's
|
||
audio encoder, not this library). No Boost, no Void, no reflection — plain C++20,
|
||
independently buildable and testable.
|
||
|
||
## Build & test standalone
|
||
|
||
```bash
|
||
cmake -S . -B build -DECHOIONPROTOCOL_BUILD_TESTS=ON
|
||
cmake --build build
|
||
./build/tests/echoion_protocol_tests
|
||
```
|
||
|
||
## Verified
|
||
|
||
- Unit tests: CMAC (RFC 4493), EAX (spec vectors), SHA-1, base64, command
|
||
escaping, QuickLZ, identity uid/security-level/sign, save/load.
|
||
- **Live handshake**: connects to a real TeamSpeak 3 server (Docker) through the
|
||
full handshake and appears in the server's client list.
|
||
|
||
## Not yet integration-tested against a live server
|
||
|
||
Audio audibility to a second client, whisper targeting, and inbound-command
|
||
event mapping are implemented but need a full end-to-end run with Core.
|