Relay server for sechat: presence signaling, an offline-message mailbox, a UDP STUN responder, and TURN-style relaying of P2P connections. It only ever moves ciphertext addressed to identity hashes, never plaintext.
# production (wss:// — requires a TLS cert/key)
TLS_CERT=./cert.pem TLS_KEY=./key.pem cargo run
# local dev (plain ws://, no TLS — must match the client's SECHAT_DEV_INSECURE)
SECHAT_DEV_INSECURE=1 cargo run| Variable | Meaning |
|---|---|
TLS_CERT / TLS_KEY |
PEM cert chain / private key (required for wss) |
SECHAT_DEV_INSECURE |
Serve plain ws:// instead of wss:// |
STUN_PORT |
UDP STUN responder port (default 3478) |
SECHAT_DEBUG |
Verbose tracing output |
Listens on 0.0.0.0:3000 (WebSocket) and 0.0.0.0:$STUN_PORT (UDP).
cargo testSee the client repo for protocol details, threat model, and architecture diagrams.