Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ jobs:
- "rs/moq-archive/**"
- "rs/moq-auth/**"
- "rs/moq-cli/**"
- "rs/moq-clock/**"
- "rs/moq-congestion/**"
- "rs/moq-hls/**"
- "rs/moq-ice/**"
Expand Down
2 changes: 1 addition & 1 deletion .oss-scanner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN rustup show active-toolchain || rustup toolchain install \
&& curl -LsSf "https://get.nexte.st/latest/$nextest" | tar zxf - -C "$CARGO_HOME/bin" \
&& cargo nextest --version

ARG CRATES="kio hang moq-auth moq-clock moq-e2ee moq-hls moq-ice moq-json moq-loc moq-msf moq-mux moq-net moq-pattern moq-quic moq-relay moq-rtc moq-rtmp moq-rtsp moq-sock moq-srt moq-stats moq-tokio moq-uring moq-cli"
ARG CRATES="kio hang moq-auth moq-e2ee moq-hls moq-ice moq-json moq-loc moq-msf moq-mux moq-net moq-pattern moq-quic moq-relay moq-rtc moq-rtmp moq-rtsp moq-sock moq-srt moq-stats moq-tokio moq-uring moq-cli"

# Path specs, because the lockfile also has published copies of some workspace crates.
# io-uring compiles the relay's io_uring QUIC workers (`--runtime-io-uring`), which the default features leave out.
Expand Down
4 changes: 2 additions & 2 deletions .oss-scanner/threat_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Most important, in this order:
2. Authorization: a session publishing, subscribing, or seeing announcements outside its grant, or reaching another root (tenant) through path tricks, revalidation, mounts, or cluster links.
3. `rs/moq-mux` and `rs/hang`: container, codec, and catalog parsing of publisher-controlled bytes.
4. The ingest gateways: `rs/moq-rtmp`, `rs/moq-rtsp`, `rs/moq-srt`, `rs/moq-rtc`, `rs/moq-ice`, `rs/moq-hls`.
5. `rs/moq-e2ee`, `rs/moq-cli`, `rs/moq-json`, `rs/moq-stats`, `rs/kio`, `rs/moq-clock`.
5. `rs/moq-e2ee`, `rs/moq-cli`, `rs/moq-json`, `rs/moq-stats`, `rs/kio`.

`unsafe` is rare and worth reading closely where it appears: `rs/moq-quic`, `rs/moq-net/src/model`, `rs/moq-net/src/util/cell.rs`, `rs/moq-net/src/transport.rs`, and `rs/moq-relay/src/uring.rs`.

Expand All @@ -45,7 +45,7 @@ Out of scope: `js/` and the other language bindings (`py/`, `swift/`, `kt/`, `go

The image is offline, with every crate fetched and `CARGO_NET_OFFLINE` set. The debug build of the in-scope crates, their test binaries, and the `moq-relay` and `moq` binaries are already built in `/src/target/debug`. Debug builds keep overflow checks on.

- **Tests**: `cargo nextest run -p path+file:///src/rs/moq-net` (or any in-scope crate; the path spec is needed because the lockfile also has published copies of some crates). Use nextest as CI does: some tests install process-global state and fail under plain `cargo test`. Add `--features moq-relay/io-uring` for the relay and `moq-uring` so the io\_uring backend's tests run (they skip on a kernel without io\_uring support). Unit tests use the deterministic clock in `moq-clock` rather than wall time, so they are fast and reproducible.
- **Tests**: `cargo nextest run -p path+file:///src/rs/moq-net` (or any in-scope crate; the path spec is needed because the lockfile also has published copies of some crates). Use nextest as CI does: some tests install process-global state and fail under plain `cargo test`. Add `--features moq-relay/io-uring` for the relay and `moq-uring` so the io\_uring backend's tests run (they skip on a kernel without io\_uring support). Unit tests use the deterministic clock in `kio::clock` rather than wall time, so they are fast and reproducible.
- **A relay to attack**: `./target/debug/moq-relay demo/relay/localhost.toml` listens on UDP and TCP `[::]:4443` with a self-signed certificate and anonymous access to every path. The binary is built with io\_uring support; pass `--runtime-io-uring` to serve QUIC from the io\_uring workers in `rs/moq-uring` and `rs/moq-relay/src/uring.rs` instead of tokio. For authorization testing, grant a narrow anonymous pattern with `[auth] public_subscribe` / `public_publish`, or run the reference auth server (`moq auth generate`, `moq auth sign`, `moq auth serve`, then `[auth] url`; see `doc/bin/cli.md`) and try to escape a signed token's root and patterns. `doc/bin/relay/` documents the config, auth, cluster, and HTTP endpoints.
- **A client**: `./target/debug/moq --help` publishes, subscribes, fetches, and lists announcements against a relay. `curl http://localhost:4443/announced/` and `curl http://localhost:4443/fetch/<broadcast>/<track>` hit the HTTP endpoints.
- **Fuzz harnesses**: `rs/moq-net/fuzz` and `rs/moq-quic/fuzz` hold cargo-fuzz targets for the wire codecs and the QUIC state machine. cargo-fuzz and a nightly toolchain are not in the image, but the targets show the parser entry points.
Expand Down
69 changes: 18 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[workspace]
# Keep source-only members discoverable in Maturin's dependency-pruned archive,
# including the separately packaged UniFFI generator.
members = ["demo/carla/bridge", "rs/*", "rs/kio/macros", "rs/moq-clock/macros", "rs/moq-net/fuzz", "rs/moq-quic/fuzz"]
members = ["demo/carla/bridge", "rs/*", "rs/kio/macros", "rs/moq-net/fuzz", "rs/moq-quic/fuzz"]
default-members = [
"rs/bench-harness",
"rs/kio",
"rs/kio/macros",
"rs/hang",
# "rs/moq-c", # requires C toolchain
"rs/moq-clock",
"rs/moq-clock/macros",
"rs/moq-congestion",
"rs/moq-archive",
"rs/moq-auth",
Expand Down Expand Up @@ -129,8 +127,6 @@ mdns-sd = { version = "0.21", features = ["async"] }
moq-archive = { version = "0.0.11", path = "rs/moq-archive" }
moq-audio = { version = "0.1.10", path = "rs/moq-audio", default-features = false }
moq-auth = { version = "0.2.1", path = "rs/moq-auth" }
moq-clock = { version = "0.11.0", path = "rs/moq-clock" }
moq-clock-macros = { version = "0.1.0", path = "rs/moq-clock/macros" }
moq-congestion = { version = "0.1.0", path = "rs/moq-congestion" }
moq-hls = { version = "0.5.11", path = "rs/moq-hls", default-features = false }
moq-ice = { version = "0.1.0", path = "rs/moq-ice" }
Expand Down
Loading