Files
softlan-vpn/Cargo.toml
T
ddidderr 879cb689a4 feat(ctrl): add control stream frame codec
Add the framing layer that turns typed control messages into bytes for reliable
QUIC streams. This keeps the codec next to the control schema while leaving the
actual QUIC read/write loops for a later relay/client/gateway slice.

The codec uses a four-byte big-endian length prefix followed by JSON. JSON is a
phase-1 choice for inspectability during manual tunnel bring-up; the explicit
length prefix keeps stream parsing deterministic and the 64 KiB cap prevents a
peer from announcing unbounded control payloads. Decoding validates the message
after deserialization so forged stream bytes cannot bypass constructor checks.

The next networking slice can use complete_control_frame_len to split a stream
buffer and decode_control_frame once a complete frame is available.

Test Plan:
- cargo fmt --check
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings

Refs: PLAN.md reliable QUIC control stream requirements
2026-05-21 17:25:26 +02:00

24 lines
445 B
TOML

[workspace]
resolver = "3"
members = [
"crates/lanparty-client-core",
"crates/lanparty-client-win",
"crates/lanparty-ctrl",
"crates/lanparty-gateway",
"crates/lanparty-obs",
"crates/lanparty-proto",
"crates/lanparty-relay",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
[workspace.dependencies]
anyhow = "1"
bytes = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
tracing = "0.1"