VNOX-Server/dev/README.md
loki5512344 c18ccadf99
chore(server): checkpoint deployed services and unfinished forums
User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
2026-11-01 15:31:20 +01:00

101 lines
2.7 KiB
Markdown

# Local development configuration
This directory holds the default config for running VNOX on your machine.
## File: `config.toml`
```toml
[node]
name = "dev-node"
address = "127.0.0.1"
[gateway]
bind = "127.0.0.1:7600"
max_connections = 100
session_timeout = 600
[voice]
bind = "127.0.0.1:7700"
[storage]
data_dir = "./dev/data"
backend = "sqlite"
sqlite_path = "./dev/data/vnox.db"
```
### Sections
**`[node]`**
- `name` - shown to clients after connect (HELLO / session UI).
- `address` - public node address for future federation; local dev uses loopback.
**`[gateway]`**
- `bind` - TCP listen address for client connections. Default dev port: `7600`.
- `max_connections` - connection cap (not enforced in all code paths yet).
- `session_timeout` - session lifetime in seconds; sent to clients as `expires_at`.
**`[voice]`**
- `bind` - UDP listen address for voice relay. Default dev port: `7700`.
- Sent to clients as `voice_endpoint` when they join a channel.
**`[storage]`**
- `data_dir` - gateway data directory; stores SQLite DB and `server_identity.json`.
- `sqlite_path` - SQLite database file for chat history and user records.
## First run
Run from `VNOX-Server/`:
```sh
mkdir -p dev/data
cargo run -p vnox-serverd -- --config dev/config.toml
```
`vnox-serverd` runs the TCP gateway and UDP relay together and passes voice
credentials through their in-process bridge. Separate gateway and voice-node
processes do not yet exchange credentials; the standalone relay rejects voice
traffic.
In another terminal, run from `VNOX-Client/`:
```sh
cargo run --bin vnox-client
```
Connect to `127.0.0.1:7600`. The gateway generates a self-signed TLS certificate
for local development and prints its SPKI SHA-256 fingerprint. Compare it with
the client's first-use trust prompt before accepting.
On first gateway start, `dev/data/server_identity.json` is created automatically.
Back it up if you care about a stable server identity across reinstalls.
## E2E voice test
With `vnox-serverd` running, execute from `VNOX-Client/` using the fingerprint
printed by the gateway (replace `HEX`):
```sh
cargo run --bin vnox-e2e-voice -- --fingerprint HEX
```
For a disposable loopback test, `--trust-first-use` can replace `--fingerprint HEX`.
The headless test keeps certificate trust in memory only.
This headless test connects two TCP clients, joins the `voice` channel, sends UDP packets, and verifies the voice-node relays between them. Exit code 0 means pass.
## Logs
Set log level via environment variable:
```sh
VNOX_LOG=debug cargo run -p vnox-serverd -- --config dev/config.toml
```
## Full reference
Production-oriented options: [docs/03-server/configuration.md](../docs/03-server/configuration.md).