From 8bbc7ac4433d8b87588d474b13b31101a4d8f51c Mon Sep 17 00:00:00 2001 From: mp0rta <3p0rta26@gmail.com> Date: Thu, 8 Oct 2026 03:36:17 +0900 Subject: [PATCH] chore: add SPDX license headers to every source file Apache-2.0 SPDX identifier plus the copyright line on all .rs, .sh, .py, .c and .h files outside third_party/ and website/ (after the shebang where there is one). update-xquic-bindings.sh emits the header through bindgen --raw-line, so regenerating bindings.rs keeps it. A fmt-clippy step fails CI when a tracked source file lacks the header. --- .github/workflows/rust.yml | 4 ++++ crates/mq-h3/src/conn.rs | 2 ++ crates/mq-h3/src/lib.rs | 2 ++ crates/mq-h3/src/queue.rs | 2 ++ crates/mq-h3/src/recv.rs | 2 ++ crates/mq-h3/src/req.rs | 2 ++ crates/mq-h3/src/send.rs | 2 ++ crates/mq-h3/tests/common/mod.rs | 2 ++ crates/mq-h3/tests/lifecycle.rs | 2 ++ crates/mq-h3/tests/props.rs | 2 ++ crates/mq-h3/tests/recv.rs | 2 ++ crates/mq-h3/tests/send.rs | 2 ++ crates/mq-h3/tests/setup.rs | 2 ++ crates/mq-h3/tests/stats.rs | 2 ++ crates/mq-http/fuzz/fuzz_targets/format_req.rs | 2 ++ crates/mq-http/fuzz/fuzz_targets/h1_head.rs | 2 ++ crates/mq-http/fuzz/fuzz_targets/parse_target.rs | 2 ++ crates/mq-http/src/h1.rs | 2 ++ crates/mq-http/src/headers.rs | 2 ++ crates/mq-http/src/lib.rs | 2 ++ crates/mq-http/src/limits.rs | 2 ++ crates/mq-http/src/metrics.rs | 2 ++ crates/mq-integration/src/browser.rs | 2 ++ crates/mq-integration/src/driver_harness.rs | 2 ++ crates/mq-integration/src/h3_apps.rs | 2 ++ crates/mq-integration/src/lib.rs | 2 ++ crates/mq-integration/src/log_tap.rs | 2 ++ crates/mq-integration/src/loopback.rs | 2 ++ crates/mq-integration/src/origin_loop.rs | 2 ++ crates/mq-integration/src/origin_server.rs | 2 ++ crates/mq-integration/src/raw_h3.rs | 2 ++ crates/mq-integration/src/shard_pair.rs | 2 ++ crates/mq-integration/tests/common/mod.rs | 2 ++ crates/mq-integration/tests/driver_client_relay.rs | 2 ++ crates/mq-integration/tests/driver_emfile.rs | 2 ++ crates/mq-integration/tests/driver_loopback.rs | 2 ++ crates/mq-integration/tests/driver_server_dial.rs | 2 ++ crates/mq-integration/tests/driver_socks5_listener.rs | 2 ++ crates/mq-integration/tests/loop_e2e_single_path.rs | 2 ++ crates/mq-integration/tests/loop_engine_boot.rs | 2 ++ crates/mq-integration/tests/origin_h1.rs | 2 ++ crates/mq-integration/tests/origin_h2.rs | 2 ++ crates/mq-integration/tests/pair_cs.rs | 2 ++ crates/mq-integration/tests/pair_failures.rs | 2 ++ crates/mq-integration/tests/pair_gateway.rs | 2 ++ crates/mq-integration/tests/pair_h3.rs | 2 ++ crates/mq-integration/tests/pair_max_conns.rs | 2 ++ crates/mq-integration/tests/pair_metrics.rs | 2 ++ crates/mq-integration/tests/pair_mitm.rs | 2 ++ crates/mq-integration/tests/pair_rc.rs | 2 ++ crates/mq-integration/tests/pair_reconnect.rs | 2 ++ crates/mq-integration/tests/pair_relay.rs | 2 ++ crates/mq-integration/tests/pair_udp.rs | 2 ++ crates/mq-linux/src/lib.rs | 2 ++ crates/mq-linux/src/listener.rs | 2 ++ crates/mq-linux/src/process.rs | 2 ++ crates/mq-linux/src/sockopt.rs | 2 ++ crates/mq-linux/src/timerfd.rs | 2 ++ crates/mq-linux/src/udp.rs | 2 ++ crates/mq-linux/tests/listener.rs | 2 ++ crates/mq-linux/tests/timerfd.rs | 2 ++ crates/mq-linux/tests/udp.rs | 2 ++ crates/mq-proxy/fuzz/fuzz_targets/http_connect.rs | 2 ++ crates/mq-proxy/fuzz/fuzz_targets/socks5.rs | 2 ++ crates/mq-proxy/fuzz/fuzz_targets/socks5_udp_hdr.rs | 2 ++ crates/mq-proxy/src/app_stream.rs | 2 ++ crates/mq-proxy/src/client/backoff.rs | 2 ++ crates/mq-proxy/src/client/exchange/mod.rs | 2 ++ crates/mq-proxy/src/client/exchange/resp.rs | 2 ++ crates/mq-proxy/src/client/exchange/wire.rs | 2 ++ crates/mq-proxy/src/client/gateway/download.rs | 2 ++ crates/mq-proxy/src/client/gateway/head.rs | 2 ++ crates/mq-proxy/src/client/gateway/mod.rs | 2 ++ crates/mq-proxy/src/client/ingress_glue.rs | 2 ++ crates/mq-proxy/src/client/mitm/ca.rs | 2 ++ crates/mq-proxy/src/client/mitm/conn.rs | 2 ++ crates/mq-proxy/src/client/mitm/head.rs | 2 ++ crates/mq-proxy/src/client/mitm/host.rs | 2 ++ crates/mq-proxy/src/client/mitm/leaf.rs | 2 ++ crates/mq-proxy/src/client/mitm/mod.rs | 2 ++ crates/mq-proxy/src/client/mitm/policy.rs | 2 ++ crates/mq-proxy/src/client/mitm/stream.rs | 2 ++ crates/mq-proxy/src/client/mod.rs | 2 ++ crates/mq-proxy/src/client/paths.rs | 2 ++ crates/mq-proxy/src/client/pending.rs | 2 ++ crates/mq-proxy/src/client/tunnel_h3.rs | 2 ++ crates/mq-proxy/src/client/udp_assoc.rs | 2 ++ crates/mq-proxy/src/client/udp_session.rs | 2 ++ crates/mq-proxy/src/config.rs | 2 ++ crates/mq-proxy/src/ingress/http_connect.rs | 2 ++ crates/mq-proxy/src/ingress/mod.rs | 2 ++ crates/mq-proxy/src/ingress/request.rs | 2 ++ crates/mq-proxy/src/ingress/socks5.rs | 2 ++ crates/mq-proxy/src/ingress/transparent.rs | 2 ++ crates/mq-proxy/src/lib.rs | 2 ++ crates/mq-proxy/src/metrics.rs | 2 ++ crates/mq-proxy/src/server/gateway/intake.rs | 2 ++ crates/mq-proxy/src/server/gateway/mod.rs | 2 ++ crates/mq-proxy/src/server/mod.rs | 2 ++ crates/mq-proxy/src/server/origin/accounting.rs | 2 ++ crates/mq-proxy/src/server/origin/body.rs | 2 ++ crates/mq-proxy/src/server/origin/errors.rs | 2 ++ crates/mq-proxy/src/server/origin/events.rs | 2 ++ crates/mq-proxy/src/server/origin/host.rs | 2 ++ crates/mq-proxy/src/server/origin/key.rs | 2 ++ crates/mq-proxy/src/server/origin/mod.rs | 2 ++ crates/mq-proxy/src/server/origin/pump.rs | 2 ++ crates/mq-proxy/src/server/origin/request.rs | 2 ++ crates/mq-proxy/src/server/origin/response.rs | 2 ++ crates/mq-proxy/src/server/origin/tls.rs | 2 ++ crates/mq-proxy/src/server/udp_session.rs | 2 ++ crates/mq-proxy/src/tls_pipe/exec.rs | 2 ++ crates/mq-proxy/src/tls_pipe/mod.rs | 2 ++ crates/mq-proxy/src/tls_pipe/pipe.rs | 2 ++ crates/mq-proxy/src/tls_pipe/tls_io.rs | 2 ++ crates/mq-proxy/src/udp/defrag.rs | 2 ++ crates/mq-proxy/src/udp/mod.rs | 2 ++ crates/mq-proxy/src/udp/preopen.rs | 2 ++ crates/mq-proxy/src/udp/send.rs | 2 ++ crates/mq-proxy/src/udp/socks5udp.rs | 2 ++ crates/mq-proxy/tests/backoff.rs | 2 ++ crates/mq-proxy/tests/client_auth.rs | 2 ++ crates/mq-proxy/tests/client_exchange.rs | 2 ++ crates/mq-proxy/tests/client_gateway_download.rs | 2 ++ crates/mq-proxy/tests/client_gateway_ends.rs | 2 ++ crates/mq-proxy/tests/client_gateway_head.rs | 2 ++ crates/mq-proxy/tests/client_gateway_tunnel.rs | 2 ++ crates/mq-proxy/tests/client_gateway_upload.rs | 2 ++ crates/mq-proxy/tests/client_lifecycle.rs | 2 ++ crates/mq-proxy/tests/client_mitm_conn.rs | 2 ++ crates/mq-proxy/tests/client_mitm_stream.rs | 2 ++ crates/mq-proxy/tests/client_mitm_wiring.rs | 2 ++ crates/mq-proxy/tests/client_open.rs | 2 ++ crates/mq-proxy/tests/client_paths.rs | 2 ++ crates/mq-proxy/tests/client_udp_assoc.rs | 2 ++ crates/mq-proxy/tests/client_udp_session.rs | 2 ++ crates/mq-proxy/tests/common/mod.rs | 2 ++ crates/mq-proxy/tests/http_connect.rs | 2 ++ crates/mq-proxy/tests/ingress_glue.rs | 2 ++ crates/mq-proxy/tests/metrics_format.rs | 2 ++ crates/mq-proxy/tests/mitm_harness/mod.rs | 2 ++ crates/mq-proxy/tests/origdst.rs | 2 ++ crates/mq-proxy/tests/origin_harness/mod.rs | 2 ++ crates/mq-proxy/tests/pending.rs | 2 ++ crates/mq-proxy/tests/server_auth.rs | 2 ++ crates/mq-proxy/tests/server_dial.rs | 2 ++ crates/mq-proxy/tests/server_gateway_conn.rs | 2 ++ crates/mq-proxy/tests/server_gateway_intake.rs | 2 ++ crates/mq-proxy/tests/server_gateway_metrics.rs | 2 ++ crates/mq-proxy/tests/server_gateway_relay.rs | 2 ++ crates/mq-proxy/tests/server_harness/mod.rs | 2 ++ crates/mq-proxy/tests/server_lifecycle.rs | 2 ++ crates/mq-proxy/tests/server_origin_connect.rs | 2 ++ crates/mq-proxy/tests/server_origin_pool_h1.rs | 2 ++ crates/mq-proxy/tests/server_origin_pump.rs | 2 ++ crates/mq-proxy/tests/server_origin_records.rs | 2 ++ crates/mq-proxy/tests/server_request.rs | 2 ++ crates/mq-proxy/tests/server_udp_open.rs | 2 ++ crates/mq-proxy/tests/server_udp_relay.rs | 2 ++ crates/mq-proxy/tests/socks5.rs | 2 ++ crates/mq-proxy/tests/udp_defrag.rs | 2 ++ crates/mq-proxy/tests/udp_preopen.rs | 2 ++ crates/mq-proxy/tests/udp_send.rs | 2 ++ crates/mq-proxy/tests/udp_socks5udp.rs | 2 ++ crates/mq-runtime/src/app.rs | 2 ++ crates/mq-runtime/src/driver/core.rs | 2 ++ crates/mq-runtime/src/driver/deadlines.rs | 2 ++ crates/mq-runtime/src/driver/driver.rs | 2 ++ crates/mq-runtime/src/driver/io.rs | 2 ++ crates/mq-runtime/src/driver/mio_io.rs | 2 ++ crates/mq-runtime/src/driver/mod.rs | 2 ++ crates/mq-runtime/src/driver/resolver.rs | 2 ++ crates/mq-runtime/src/ids.rs | 2 ++ crates/mq-runtime/src/lib.rs | 2 ++ crates/mq-runtime/src/shard/inputs.rs | 2 ++ crates/mq-runtime/src/shard/mod.rs | 2 ++ crates/mq-runtime/src/shard/relay.rs | 2 ++ crates/mq-runtime/src/shard/rng.rs | 2 ++ crates/mq-runtime/src/shard/routing.rs | 2 ++ crates/mq-runtime/src/shard/tcp.rs | 2 ++ crates/mq-runtime/src/shard/timers.rs | 2 ++ crates/mq-runtime/src/shard/tx_ring.rs | 2 ++ crates/mq-runtime/src/testing/fake_io.rs | 2 ++ crates/mq-runtime/src/testing/log_capture.rs | 2 ++ crates/mq-runtime/src/testing/mod.rs | 2 ++ crates/mq-runtime/src/testing/recording_app.rs | 2 ++ crates/mq-runtime/src/testing/scripted.rs | 2 ++ crates/mq-runtime/tests/app.rs | 2 ++ crates/mq-runtime/tests/loop_core.rs | 2 ++ crates/mq-runtime/tests/relay.rs | 2 ++ crates/mq-runtime/tests/scripted.rs | 2 ++ crates/mq-runtime/tests/shard.rs | 2 ++ crates/mq-transport-api/src/config.rs | 2 ++ crates/mq-transport-api/src/error.rs | 2 ++ crates/mq-transport-api/src/event.rs | 2 ++ crates/mq-transport-api/src/fabric.rs | 2 ++ crates/mq-transport-api/src/ids.rs | 2 ++ crates/mq-transport-api/src/lib.rs | 2 ++ crates/mq-transport-api/src/ops.rs | 2 ++ crates/mq-transport-api/src/ringbuf.rs | 2 ++ crates/mq-transport-api/src/time.rs | 2 ++ crates/mq-transport-api/tests/fabric.rs | 2 ++ crates/mq-transport-api/tests/ids.rs | 2 ++ crates/mq-transport-api/tests/ops.rs | 2 ++ crates/mq-transport/src/clock.rs | 2 ++ crates/mq-transport/src/conn.rs | 2 ++ crates/mq-transport/src/datagram.rs | 2 ++ crates/mq-transport/src/engine.rs | 2 ++ crates/mq-transport/src/events.rs | 2 ++ crates/mq-transport/src/ffi/mod.rs | 2 ++ crates/mq-transport/src/ffi/trampolines.rs | 2 ++ crates/mq-transport/src/lib.rs | 2 ++ crates/mq-transport/src/slots.rs | 2 ++ crates/mq-transport/src/stream.rs | 2 ++ crates/mq-transport/src/txq.rs | 2 ++ crates/mq-transport/tests/common/initial.rs | 2 ++ crates/mq-transport/tests/common/lockstep.rs | 2 ++ crates/mq-transport/tests/common/mod.rs | 2 ++ crates/mq-transport/tests/common/pair.rs | 2 ++ crates/mq-transport/tests/common/xfer.rs | 2 ++ crates/mq-transport/tests/engine.rs | 2 ++ crates/mq-transport/tests/fabric_abandoned.rs | 2 ++ crates/mq-transport/tests/fabric_basic.rs | 2 ++ crates/mq-transport/tests/fabric_conn_cap.rs | 2 ++ crates/mq-transport/tests/fabric_datagram.rs | 2 ++ crates/mq-transport/tests/fabric_h3raw.rs | 2 ++ crates/mq-transport/tests/fabric_keepalive.rs | 2 ++ crates/mq-transport/tests/fabric_path_blackhole.rs | 2 ++ crates/mq-transport/tests/fabric_probe.rs | 2 ++ crates/mq-transport/tests/fabric_provisional.rs | 2 ++ crates/mq-transport/tests/fabric_qlog.rs | 2 ++ crates/mq-transport/tests/fabric_sparse_ids.rs | 2 ++ crates/mq-transport/tests/fabric_stale.rs | 2 ++ crates/mq-transport/tests/fabric_stream_ceiling.rs | 2 ++ crates/mq-transport/tests/fabric_stream_echo.rs | 2 ++ crates/mq-transport/tests/fabric_timer.rs | 2 ++ crates/mq-transport/tests/fabric_transport_fabric.rs | 2 ++ crates/mq-transport/tests/fabric_two_blocked_paths.rs | 2 ++ crates/mq-transport/tests/fabric_two_paths.rs | 2 ++ crates/mq-transport/tests/fabric_txq.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/auth_req.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/auth_resp.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/connect_tcp_req.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/connect_tcp_resp.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/udp_msg_hdr.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/udp_session_open.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/udp_session_resp.rs | 2 ++ crates/mq-wire/fuzz/fuzz_targets/varint.rs | 2 ++ crates/mq-wire/src/frames.rs | 2 ++ crates/mq-wire/src/lib.rs | 2 ++ crates/mq-wire/src/udp_msg.rs | 2 ++ crates/mq-wire/src/varint.rs | 2 ++ crates/mq-wire/tests/c_golden.rs | 2 ++ crates/mq-wire/tests/frames.rs | 2 ++ crates/mq-wire/tests/udp_msg.rs | 2 ++ crates/mq-wire/tests/varint.rs | 2 ++ crates/mqproxy/examples/udp_echo.rs | 2 ++ crates/mqproxy/examples/udpsocks.rs | 2 ++ crates/mqproxy/src/cli.rs | 2 ++ crates/mqproxy/src/config.rs | 2 ++ crates/mqproxy/src/ini.rs | 2 ++ crates/mqproxy/src/lib.rs | 2 ++ crates/mqproxy/src/logger.rs | 2 ++ crates/mqproxy/src/main.rs | 2 ++ crates/mqproxy/src/run.rs | 2 ++ crates/mqproxy/src/setup_redirect.rs | 2 ++ crates/mqproxy/tests/cli.rs | 2 ++ crates/mqproxy/tests/common/mod.rs | 2 ++ crates/mqproxy/tests/config.rs | 2 ++ crates/mqproxy/tests/smoke.rs | 2 ++ crates/xquic-sys/build.rs | 2 ++ crates/xquic-sys/csrc/sizes.c | 2 ++ crates/xquic-sys/src/bindings.rs | 2 ++ crates/xquic-sys/src/lib.rs | 2 ++ crates/xquic-sys/tests/engine.rs | 2 ++ crates/xquic-sys/tests/layout.rs | 2 ++ crates/xquic-sys/wrapper.h | 2 ++ packaging/build.py | 2 ++ scripts/build-xquic.sh | 2 ++ scripts/ci_benchmarks/ci_bench_env.sh | 2 ++ scripts/ci_benchmarks/ci_bench_gateway.sh | 2 ++ scripts/ci_benchmarks/ci_bench_idle.sh | 2 ++ scripts/ci_benchmarks/ci_bench_mitm.sh | 2 ++ scripts/ci_benchmarks/ci_bench_multi_stream.sh | 2 ++ scripts/ci_benchmarks/ci_bench_tcp_proxy.sh | 2 ++ scripts/ci_benchmarks/ci_bench_unshaped.sh | 2 ++ scripts/ci_benchmarks/plot_single_tcp.py | 2 ++ scripts/ci_benchmarks/plot_single_tcp_simple.py | 2 ++ scripts/ci_benchmarks/test_gateway_summary.py | 2 ++ scripts/ci_publish/publish_to_r2.sh | 2 ++ scripts/ci_publish/update_perf_index.py | 2 ++ scripts/rust-asan.sh | 2 ++ scripts/update-xquic-bindings.sh | 2 ++ tests/certs/generate-mitm.sh | 2 ++ tests/certs/rust-mitm/gen.sh | 2 ++ tests/integration/bench_ab_lanes.sh | 2 ++ tests/integration/bench_single_tcp_aggregation.sh | 2 ++ tests/integration/e2e_gateway.sh | 2 ++ tests/integration/e2e_mitm_h2.sh | 2 ++ tests/integration/e2e_mitm_smoke.sh | 2 ++ tests/integration/e2e_multipath.sh | 2 ++ tests/integration/e2e_path_recovery.sh | 2 ++ tests/integration/e2e_tproxy.sh | 2 ++ tests/integration/e2e_udp.sh | 2 ++ tests/packaging/smoke_deb.sh | 2 ++ tests/packaging/verify_archives.py | 2 ++ tests/packaging/verify_install.sh | 2 ++ tests/test_cli_help.sh | 2 ++ 308 files changed, 618 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8bfd4a76..932feb47 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,6 +16,10 @@ jobs: with: submodules: recursive - run: python3 scripts/ci_benchmarks/test_gateway_summary.py + - name: SPDX license headers + run: | + missing="$(git ls-files '*.rs' '*.sh' '*.py' '*.c' '*.h' ':!third_party' ':!website' | xargs grep -L 'SPDX-License-Identifier: Apache-2.0' || true)" + [ -z "$missing" ] || { echo "missing SPDX header:"; echo "$missing"; exit 1; } - run: cargo fmt --check - run: cargo clippy --workspace --all-targets -- -D warnings diff --git a/crates/mq-h3/src/conn.rs b/crates/mq-h3/src/conn.rs index 27f551f9..bb1b0c23 100644 --- a/crates/mq-h3/src/conn.rs +++ b/crates/mq-h3/src/conn.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! One `h3wire::Connection` per H3 conn, and the raw events it consumes (adoption spec §4.2, //! §4.4). diff --git a/crates/mq-h3/src/lib.rs b/crates/mq-h3/src/lib.rs index d1619402..b38e1a96 100644 --- a/crates/mq-h3/src/lib.rs +++ b/crates/mq-h3/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `H3Wire`: a `TransportOps` decorator serving HTTP/3 from h3wire (adoption spec §4.1). //! //! Runs one h3wire `Connection` per H3 conn and serves the diff --git a/crates/mq-h3/src/queue.rs b/crates/mq-h3/src/queue.rs index f45e151b..3b5e71b1 100644 --- a/crates/mq-h3/src/queue.rs +++ b/crates/mq-h3/src/queue.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Outer event queue (adoption spec §4.1): level events coalesce, stale ones drop on pop. use mq_transport_api::{Event, SlotId}; diff --git a/crates/mq-h3/src/recv.rs b/crates/mq-h3/src/recv.rs index 96a9221d..f935e2a8 100644 --- a/crates/mq-h3/src/recv.rs +++ b/crates/mq-h3/src/recv.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Request receive: HEADERS bootstrap, header delivery, body pull and the request-stream //! transport events (adoption spec §4.3, §4.4). diff --git a/crates/mq-h3/src/req.rs b/crates/mq-h3/src/req.rs index 180a8237..f8bdc81a 100644 --- a/crates/mq-h3/src/req.rs +++ b/crates/mq-h3/src/req.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Per-request state (adoption spec §4.3). use crate::queue::OutQueue; diff --git a/crates/mq-h3/src/send.rs b/crates/mq-h3/src/send.rs index cce0663d..07e30cdd 100644 --- a/crates/mq-h3/src/send.rs +++ b/crates/mq-h3/src/send.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! h3wire actions and core bytes on the transport (adoption spec §4.5). use crate::H3Wire; diff --git a/crates/mq-h3/tests/common/mod.rs b/crates/mq-h3/tests/common/mod.rs index ac48484d..af0541b5 100644 --- a/crates/mq-h3/tests/common/mod.rs +++ b/crates/mq-h3/tests/common/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `Rig`: an `H3Wire` joined to a real `h3wire::Connection` peer. #![allow(dead_code)] diff --git a/crates/mq-h3/tests/lifecycle.rs b/crates/mq-h3/tests/lifecycle.rs index e343301b..84368cee 100644 --- a/crates/mq-h3/tests/lifecycle.rs +++ b/crates/mq-h3/tests/lifecycle.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Request lifecycle: closure conditions, `h3_reset`, the connection-close fan-out with //! client-side retention, and stale ids after close (adoption spec §4.3, §5.1, §5.2). diff --git a/crates/mq-h3/tests/props.rs b/crates/mq-h3/tests/props.rs index aa979998..59dabc6a 100644 --- a/crates/mq-h3/tests/props.rs +++ b/crates/mq-h3/tests/props.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Property test (adoption spec §6.1, §5.4, §4.3): random peer, gateway and transport steps //! over a `Rig`, both roles. //! diff --git a/crates/mq-h3/tests/recv.rs b/crates/mq-h3/tests/recv.rs index edbd9aaa..66426b31 100644 --- a/crates/mq-h3/tests/recv.rs +++ b/crates/mq-h3/tests/recv.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Request receive: HEADERS bootstrap, `h3_recv_headers`, body pull, carry and //! "reset, code pending" (adoption spec §4.3 "Start", §4.4, §5.3 (2), (3), (6)). diff --git a/crates/mq-h3/tests/send.rs b/crates/mq-h3/tests/send.rs index 495da96f..d149b372 100644 --- a/crates/mq-h3/tests/send.rs +++ b/crates/mq-h3/tests/send.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Request send: client start, DATA framing with partial writes, the finish latch, the //! pending FIN, `SendStopped` per role and GOAWAY (adoption spec §4.3 "Start", §4.4, §4.5). diff --git a/crates/mq-h3/tests/setup.rs b/crates/mq-h3/tests/setup.rs index afab55b0..fafa403c 100644 --- a/crates/mq-h3/tests/setup.rs +++ b/crates/mq-h3/tests/setup.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! H3 connection setup over the `Rig` (adoption spec §4.2, §4.4, §4.5). mod common; diff --git a/crates/mq-h3/tests/stats.rs b/crates/mq-h3/tests/stats.rs index 80e5a429..51e75d8d 100644 --- a/crates/mq-h3/tests/stats.rs +++ b/crates/mq-h3/tests/stats.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Request metrics: the `H3ReqStats` of `H3Closed` (adoption spec §4.6). mod common; diff --git a/crates/mq-http/fuzz/fuzz_targets/format_req.rs b/crates/mq-http/fuzz/fuzz_targets/format_req.rs index 4a61ac03..b991aa97 100644 --- a/crates/mq-http/fuzz/fuzz_targets/format_req.rs +++ b/crates/mq-http/fuzz/fuzz_targets/format_req.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_http::metrics::{ReqLine, format_req}; diff --git a/crates/mq-http/fuzz/fuzz_targets/h1_head.rs b/crates/mq-http/fuzz/fuzz_targets/h1_head.rs index 360ed598..811177ee 100644 --- a/crates/mq-http/fuzz/fuzz_targets/h1_head.rs +++ b/crates/mq-http/fuzz/fuzz_targets/h1_head.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; diff --git a/crates/mq-http/fuzz/fuzz_targets/parse_target.rs b/crates/mq-http/fuzz/fuzz_targets/parse_target.rs index 115a9f54..2ad3e0a5 100644 --- a/crates/mq-http/fuzz/fuzz_targets/parse_target.rs +++ b/crates/mq-http/fuzz/fuzz_targets/parse_target.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; diff --git a/crates/mq-http/src/h1.rs b/crates/mq-http/src/h1.rs index fc57636e..300dced6 100644 --- a/crates/mq-http/src/h1.rs +++ b/crates/mq-http/src/h1.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! HTTP/1.1 request head parser (spec §2.1). pub const HEAD_MAX: usize = 16 * 1024; diff --git a/crates/mq-http/src/headers.rs b/crates/mq-http/src/headers.rs index a2e027d8..a76f5850 100644 --- a/crates/mq-http/src/headers.rs +++ b/crates/mq-http/src/headers.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Gateway header rules (spec §2.3). use crate::h1::is_tchar; diff --git a/crates/mq-http/src/lib.rs b/crates/mq-http/src/lib.rs index 0f8d3284..b7fdefba 100644 --- a/crates/mq-http/src/lib.rs +++ b/crates/mq-http/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Pure HTTP/1.1 helpers for the gateway (spec §2). No I/O. #![forbid(unsafe_code)] pub mod h1; diff --git a/crates/mq-http/src/limits.rs b/crates/mq-http/src/limits.rs index 41c9d6ca..3f6eab51 100644 --- a/crates/mq-http/src/limits.rs +++ b/crates/mq-http/src/limits.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Shared nginx-like header limits for both gateway ends (SP4 spec §5). /// One header field: name + value bytes. diff --git a/crates/mq-http/src/metrics.rs b/crates/mq-http/src/metrics.rs index 4fa5de3b..19e85333 100644 --- a/crates/mq-http/src/metrics.rs +++ b/crates/mq-http/src/metrics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `mq.req` log-line formatter (spec §2.4). //! Works on bytes: no `String`, truncation is bytewise. use std::io::Write; diff --git a/crates/mq-integration/src/browser.rs b/crates/mq-integration/src/browser.rs index ca8bdc8b..b0e523c2 100644 --- a/crates/mq-integration/src/browser.rs +++ b/crates/mq-integration/src/browser.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `TestBrowser` (SP4 spec §11.3): a browser stand-in for the MITM pair tests. It speaks //! rustls (client) + `h2::client` on a tokio current_thread runtime, driven by the calling //! thread (`block_on`), over TCP to the proxy's `TRANSPARENT` listener only. TLS uses SNI diff --git a/crates/mq-integration/src/driver_harness.rs b/crates/mq-integration/src/driver_harness.rs index 5030984f..67b8b00d 100644 --- a/crates/mq-integration/src/driver_harness.rs +++ b/crates/mq-integration/src/driver_harness.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The driver harness (spec §8.1 "Driver"): the production `Driver` on its //! own thread over a `ScriptedTransport` and a `RecordingApp`, real loopback //! sockets, and a resolver the test answers on command. `DriverThread` is diff --git a/crates/mq-integration/src/h3_apps.rs b/crates/mq-integration/src/h3_apps.rs index 206cc7af..27aaadc5 100644 --- a/crates/mq-integration/src/h3_apps.rs +++ b/crates/mq-integration/src/h3_apps.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! H3 test apps (spec §10.3): an echo server with fault modes and a scripted client. Both run //! on a `DriverThread`, where an app can be neither commanded nor inspected, so their scripts //! are fixed at spawn and their observations come back through an `H3Handle`. diff --git a/crates/mq-integration/src/lib.rs b/crates/mq-integration/src/lib.rs index 62c76bab..8feccc1d 100644 --- a/crates/mq-integration/src/lib.rs +++ b/crates/mq-integration/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §8.1 #![forbid(unsafe_code)] diff --git a/crates/mq-integration/src/log_tap.rs b/crates/mq-integration/src/log_tap.rs index b949b08d..fd107036 100644 --- a/crates/mq-integration/src/log_tap.rs +++ b/crates/mq-integration/src/log_tap.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! A process-global `log::Log`, for shards on other threads (`DriverThread`), where the //! thread-local `mq_runtime::testing::log_capture` cannot see them. Lines accumulate across //! the tests of one binary: each test filters by its own markers. diff --git a/crates/mq-integration/src/loopback.rs b/crates/mq-integration/src/loopback.rs index a3e6ece6..5b85abe4 100644 --- a/crates/mq-integration/src/loopback.rs +++ b/crates/mq-integration/src/loopback.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The loopback harness (spec §8.1 "Loopback"): a server side and a client //! side, each a production `Driver` with a shard over the real transport, //! each on its own thread, talking over loopback UDP. The test thread plays diff --git a/crates/mq-integration/src/origin_loop.rs b/crates/mq-integration/src/origin_loop.rs index 1dab7586..516a73de 100644 --- a/crates/mq-integration/src/origin_loop.rs +++ b/crates/mq-integration/src/origin_loop.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `OriginLoop`: the origin bridge (`OriginHost`) on the production loop core //! over real sockets, on the **test thread** — a `DriverThread` can neither be //! commanded nor inspected, and `StartReq` holds `!Send` state (spec §10.3). diff --git a/crates/mq-integration/src/origin_server.rs b/crates/mq-integration/src/origin_server.rs index 69c5de69..27511261 100644 --- a/crates/mq-integration/src/origin_server.rs +++ b/crates/mq-integration/src/origin_server.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `OriginServer`: a real origin for the bridge tests (spec §10.3). The hyper //! modes run a hyper 1.10 **server** on a tokio current_thread runtime on a //! std thread (TLS through tokio-rustls); the raw modes are canned-bytes peers diff --git a/crates/mq-integration/src/raw_h3.rs b/crates/mq-integration/src/raw_h3.rs index 3be31331..062fa5ba 100644 --- a/crates/mq-integration/src/raw_h3.rs +++ b/crates/mq-integration/src/raw_h3.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The raw-H3 peer (adoption spec §6.2): HTTP/3 as fixed bytes on raw streams, for the //! malformed input a compliant H3 send API cannot produce. diff --git a/crates/mq-integration/src/shard_pair.rs b/crates/mq-integration/src/shard_pair.rs index f84d4369..7a37df46 100644 --- a/crates/mq-integration/src/shard_pair.rs +++ b/crates/mq-integration/src/shard_pair.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The shard-pair harness (spec §8.1 "Shard pair"): a server shard and a //! client shard, each with the real xquic `Transport` inside a `LoopCore` //! over a `FakeIo` (auto-advance off) on virtual time, each on its own thread diff --git a/crates/mq-integration/tests/common/mod.rs b/crates/mq-integration/tests/common/mod.rs index 02bada31..eea86a1e 100644 --- a/crates/mq-integration/tests/common/mod.rs +++ b/crates/mq-integration/tests/common/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Rigs for the driver tests with the real apps (spec §8.1 "Driver", rerun //! with the real `Client`/`Server`): the production `Driver` on its own //! thread, a `ScriptedTransport` in polling mode (so events the test injects diff --git a/crates/mq-integration/tests/driver_client_relay.rs b/crates/mq-integration/tests/driver_client_relay.rs index 4148a1f1..8870ec28 100644 --- a/crates/mq-integration/tests/driver_client_relay.rs +++ b/crates/mq-integration/tests/driver_client_relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Driver tests with the real `Client` (spec §8.1, §8.4, §6.2): a SOCKS5 //! request through the production driver, the scripted transport answering //! the open, then the relay. diff --git a/crates/mq-integration/tests/driver_emfile.rs b/crates/mq-integration/tests/driver_emfile.rs index 7568840c..15da9d3f 100644 --- a/crates/mq-integration/tests/driver_emfile.rs +++ b/crates/mq-integration/tests/driver_emfile.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.3 `EMFILE` retry, alone in its binary: it lowers the //! process-wide `RLIMIT_NOFILE`. diff --git a/crates/mq-integration/tests/driver_loopback.rs b/crates/mq-integration/tests/driver_loopback.rs index f73d0f3c..20a2f734 100644 --- a/crates/mq-integration/tests/driver_loopback.rs +++ b/crates/mq-integration/tests/driver_loopback.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Driver tests (spec §8.1 "Driver"): the production driver over real //! loopback sockets with a `RecordingApp`. diff --git a/crates/mq-integration/tests/driver_server_dial.rs b/crates/mq-integration/tests/driver_server_dial.rs index 583e27ff..94f71659 100644 --- a/crates/mq-integration/tests/driver_server_dial.rs +++ b/crates/mq-integration/tests/driver_server_dial.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Driver tests with the real `Server` (spec §8.1, §8.4, §6.3): the dial of a //! data stream's `CONNECT_TCP_REQUEST` through the production driver — its //! resolver, connect deadline and late answers — with the transport scripted. diff --git a/crates/mq-integration/tests/driver_socks5_listener.rs b/crates/mq-integration/tests/driver_socks5_listener.rs index 4becf6f4..70a86524 100644 --- a/crates/mq-integration/tests/driver_socks5_listener.rs +++ b/crates/mq-integration/tests/driver_socks5_listener.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Spec §8.1, §6.1: the real `Client`'s SOCKS5 and HTTP CONNECT listeners //! under the production driver; the test is the ingress client, and the //! scripted transport stands in for the server (AUTH answered by the rig, diff --git a/crates/mq-integration/tests/loop_e2e_single_path.rs b/crates/mq-integration/tests/loop_e2e_single_path.rs index 409dfd89..d9746b23 100644 --- a/crates/mq-integration/tests/loop_e2e_single_path.rs +++ b/crates/mq-integration/tests/loop_e2e_single_path.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Single-path cases on the loopback harness (spec §8.1 "Loopback"): the real `Server` and `Client` on real transports, //! each on its own production driver thread, over loopback UDP. The test //! thread plays the origin (`TcpListener`) and the application (`TcpStream` diff --git a/crates/mq-integration/tests/loop_engine_boot.rs b/crates/mq-integration/tests/loop_engine_boot.rs index 1ee78d14..9d1f7a4f 100644 --- a/crates/mq-integration/tests/loop_engine_boot.rs +++ b/crates/mq-integration/tests/loop_engine_boot.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Engine boot on the loopback harness (spec §8.1 "Loopback"): both sides //! boot (real xquic engine, production driver, each on its own thread) on //! `127.0.0.1:0`, the client completes a handshake with the server, and each diff --git a/crates/mq-integration/tests/origin_h1.rs b/crates/mq-integration/tests/origin_h1.rs index b1e0f7db..1830e3e6 100644 --- a/crates/mq-integration/tests/origin_h1.rs +++ b/crates/mq-integration/tests/origin_h1.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The origin bridge against a real hyper h1 origin (spec §7.7 "h1 conns", //! §10.3), on the `OriginLoop` / `OriginServer` harness. diff --git a/crates/mq-integration/tests/origin_h2.rs b/crates/mq-integration/tests/origin_h2.rs index c8cad282..faff3c9b 100644 --- a/crates/mq-integration/tests/origin_h2.rs +++ b/crates/mq-integration/tests/origin_h2.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The origin bridge against a real hyper h2 origin (spec §7.7 "h2 conns", //! "Idle sweep", §10.3), on the `OriginLoop` / `OriginServer` harness. diff --git a/crates/mq-integration/tests/pair_cs.rs b/crates/mq-integration/tests/pair_cs.rs index 5f7728b1..2af377ed 100644 --- a/crates/mq-integration/tests/pair_cs.rs +++ b/crates/mq-integration/tests/pair_cs.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Client↔server cases on the shard pair (spec §8.1 "Shard pair"): //! //! | case | test | client side | diff --git a/crates/mq-integration/tests/pair_failures.rs b/crates/mq-integration/tests/pair_failures.rs index e4fbaf81..cfbf92c1 100644 --- a/crates/mq-integration/tests/pair_failures.rs +++ b/crates/mq-integration/tests/pair_failures.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Shard-pair failure injection (spec §8.4, the "shard pair" rows; §6.3 //! server streams and auth; §5.6 relay ends). #![forbid(unsafe_code)] diff --git a/crates/mq-integration/tests/pair_gateway.rs b/crates/mq-integration/tests/pair_gateway.rs index 4dd7158f..9e7eee6c 100644 --- a/crates/mq-integration/tests/pair_gateway.rs +++ b/crates/mq-integration/tests/pair_gateway.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §10.3 (H3 pair, gateway items): the fetch client and the gateway server on two //! production drivers over loopback UDP, real xquic, against real origins. The test thread //! plays the local fetch caller (HTTP/1.1 over `std::net`) and, for the direct-H3 cases, an diff --git a/crates/mq-integration/tests/pair_h3.rs b/crates/mq-integration/tests/pair_h3.rs index 45eb4e87..b931fb19 100644 --- a/crates/mq-integration/tests/pair_h3.rs +++ b/crates/mq-integration/tests/pair_h3.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §10.3 (H3 pair, §3.7): the H3 test apps on two production drivers over loopback UDP, //! real xquic on both sides. #![forbid(unsafe_code)] diff --git a/crates/mq-integration/tests/pair_max_conns.rs b/crates/mq-integration/tests/pair_max_conns.rs index 7dd7e01c..dda5cc83 100644 --- a/crates/mq-integration/tests/pair_max_conns.rs +++ b/crates/mq-integration/tests/pair_max_conns.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `max_conns` on the shard pair (spec §8.1 "Shard pair", §4.7 `max_conns`): //! clients A, B and C are three connections of one `RawClient` (each sends the //! `AUTH_REQUEST`), counted by `Transport::conn_count`. diff --git a/crates/mq-integration/tests/pair_metrics.rs b/crates/mq-integration/tests/pair_metrics.rs index ea6c8a7a..ded373c8 100644 --- a/crates/mq-integration/tests/pair_metrics.rs +++ b/crates/mq-integration/tests/pair_metrics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Active-connection metrics on the shard pair (spec §8.1 "Shard pair", //! §6.5: the server reports the most recently *accepted* connection — set at //! `NewConn`, before auth — and clears it only when that same connection diff --git a/crates/mq-integration/tests/pair_mitm.rs b/crates/mq-integration/tests/pair_mitm.rs index 46cb8dc6..ebe48ac1 100644 --- a/crates/mq-integration/tests/pair_mitm.rs +++ b/crates/mq-integration/tests/pair_mitm.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §11.3: the MITM client and the gateway server on two production drivers over //! loopback UDP, real xquic, against real origins. The test thread plays the browser //! (`TestBrowser`: rustls + `h2::client`), connecting only to the client's `TRANSPARENT` diff --git a/crates/mq-integration/tests/pair_rc.rs b/crates/mq-integration/tests/pair_rc.rs index 5bbee0aa..5f4b8fa2 100644 --- a/crates/mq-integration/tests/pair_rc.rs +++ b/crates/mq-integration/tests/pair_rc.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Client reconnect on the shard pair (spec §8.1 "Shard pair", §6.2 //! reconnect), real `Client` and `Server`. Case 3 covers the TCP half only //! (UDP reconnect is SP2). diff --git a/crates/mq-integration/tests/pair_reconnect.rs b/crates/mq-integration/tests/pair_reconnect.rs index 2b92577d..2509c504 100644 --- a/crates/mq-integration/tests/pair_reconnect.rs +++ b/crates/mq-integration/tests/pair_reconnect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Shard-pair reconnect tests (spec §8.4 "QUIC connection lost", "Accept //! during reconnect"; §6.2 Backoff and pending requests). #![forbid(unsafe_code)] diff --git a/crates/mq-integration/tests/pair_relay.rs b/crates/mq-integration/tests/pair_relay.rs index 410666a9..73eeb266 100644 --- a/crates/mq-integration/tests/pair_relay.rs +++ b/crates/mq-integration/tests/pair_relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Shard-pair tests (spec §8.1 "Shard pair", §8.4): the real `Client` and //! `Server` relaying end to end below the syscall layer, on one and two paths. #![forbid(unsafe_code)] diff --git a/crates/mq-integration/tests/pair_udp.rs b/crates/mq-integration/tests/pair_udp.rs index ae8eae19..4c60e80c 100644 --- a/crates/mq-integration/tests/pair_udp.rs +++ b/crates/mq-integration/tests/pair_udp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP2 spec §10.3: the UDP relay on the shard pair — the real `Client` and //! `Server` over the real xquic pair, with the SOCKS5 UDP app played on the //! client's `FakeIo` and the UDP target (an echo) on the server's. Then the diff --git a/crates/mq-linux/src/lib.rs b/crates/mq-linux/src/lib.rs index cf6ccfc9..98125680 100644 --- a/crates/mq-linux/src/lib.rs +++ b/crates/mq-linux/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §2.2 pub mod listener; diff --git a/crates/mq-linux/src/listener.rs b/crates/mq-linux/src/listener.rs index 1a397be3..83c3e724 100644 --- a/crates/mq-linux/src/listener.rs +++ b/crates/mq-linux/src/listener.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! IPv4 TCP listener construction. spec §2.2 / §5.3: `SO_REUSEADDR` and //! optional `IP_TRANSPARENT` are set before `bind`; backlog 64; non-blocking. diff --git a/crates/mq-linux/src/process.rs b/crates/mq-linux/src/process.rs index 52d6d005..3f8ab9d4 100644 --- a/crates/mq-linux/src/process.rs +++ b/crates/mq-linux/src/process.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Process helpers. spec §2.2. use crate::sockopt::cvt; diff --git a/crates/mq-linux/src/sockopt.rs b/crates/mq-linux/src/sockopt.rs index 60bc65a1..c8d67700 100644 --- a/crates/mq-linux/src/sockopt.rs +++ b/crates/mq-linux/src/sockopt.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Socket options and sockaddr conversion. spec §2.2. //! //! `original_dst` reads the pre-NAT destination of a REDIRECTed TCP flow; diff --git a/crates/mq-linux/src/timerfd.rs b/crates/mq-linux/src/timerfd.rs index 9f10885b..bcd22888 100644 --- a/crates/mq-linux/src/timerfd.rs +++ b/crates/mq-linux/src/timerfd.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Non-blocking `CLOCK_MONOTONIC` timerfd armed at absolute deadlines. //! spec §2.2. diff --git a/crates/mq-linux/src/udp.rs b/crates/mq-linux/src/udp.rs index 1c7fa41a..c88de031 100644 --- a/crates/mq-linux/src/udp.rs +++ b/crates/mq-linux/src/udp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! UDP sockets with GSO (`UDP_SEGMENT`) send and GRO (`UDP_GRO`) batched //! receive. spec §2.2. IPv4 or IPv6 by the bind address. An IPv6 socket is //! dual-stack (`IPV6_V6ONLY` = 0): it sends to IPv4 destinations as v4-mapped diff --git a/crates/mq-linux/tests/listener.rs b/crates/mq-linux/tests/listener.rs index 9528aa0d..50bdc8c6 100644 --- a/crates/mq-linux/tests/listener.rs +++ b/crates/mq-linux/tests/listener.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.2 / §5.2 / §5.3: listener construction and socket options. use mq_linux::{TcpListenerBuilder, geteuid, original_dst, set_linger_zero, so_error}; use std::io::{ErrorKind, Read}; diff --git a/crates/mq-linux/tests/timerfd.rs b/crates/mq-linux/tests/timerfd.rs index ed6452d5..65520b2e 100644 --- a/crates/mq-linux/tests/timerfd.rs +++ b/crates/mq-linux/tests/timerfd.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.2: timerfd armed at an absolute CLOCK_MONOTONIC deadline. use mq_linux::{TimerFd, now_monotonic_micros}; use std::io::ErrorKind; diff --git a/crates/mq-linux/tests/udp.rs b/crates/mq-linux/tests/udp.rs index 2fef31e4..cc28e800 100644 --- a/crates/mq-linux/tests/udp.rs +++ b/crates/mq-linux/tests/udp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.2: UDP GSO/GRO sockets on loopback. use mq_linux::{MAX_GSO_BYTES, RecvMeta, UdpSocket}; use std::io::ErrorKind; diff --git a/crates/mq-proxy/fuzz/fuzz_targets/http_connect.rs b/crates/mq-proxy/fuzz/fuzz_targets/http_connect.rs index b8a176db..3a8ab0f9 100644 --- a/crates/mq-proxy/fuzz/fuzz_targets/http_connect.rs +++ b/crates/mq-proxy/fuzz/fuzz_targets/http_connect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] //! spec §6.1: the HTTP CONNECT parser driven as the app would, whole and in data-sized chunks. use libfuzzer_sys::fuzz_target; diff --git a/crates/mq-proxy/fuzz/fuzz_targets/socks5.rs b/crates/mq-proxy/fuzz/fuzz_targets/socks5.rs index 4b271a26..29d194b7 100644 --- a/crates/mq-proxy/fuzz/fuzz_targets/socks5.rs +++ b/crates/mq-proxy/fuzz/fuzz_targets/socks5.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] //! spec §6.1: the SOCKS5 parser driven as the app would, whole and in data-sized chunks. use libfuzzer_sys::fuzz_target; diff --git a/crates/mq-proxy/fuzz/fuzz_targets/socks5_udp_hdr.rs b/crates/mq-proxy/fuzz/fuzz_targets/socks5_udp_hdr.rs index 0c17fc8d..9887fb39 100644 --- a/crates/mq-proxy/fuzz/fuzz_targets/socks5_udp_hdr.rs +++ b/crates/mq-proxy/fuzz/fuzz_targets/socks5_udp_hdr.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] //! spec §5: any accepted header rebuilds byte for byte and parses back to itself. use libfuzzer_sys::fuzz_target; diff --git a/crates/mq-proxy/src/app_stream.rs b/crates/mq-proxy/src/app_stream.rs index 1cdd5a94..654b84b9 100644 --- a/crates/mq-proxy/src/app_stream.rs +++ b/crates/mq-proxy/src/app_stream.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.4 "App-owned streams": every `StreamReadable` on a stream the app holds //! is answered with `stream_recv`, in every phase, so xquic can retire a reset //! stream (§4.2). Shared by the client (§6.2) and the server (§6.3). diff --git a/crates/mq-proxy/src/client/backoff.rs b/crates/mq-proxy/src/client/backoff.rs index 80ede5ae..54edde4d 100644 --- a/crates/mq-proxy/src/client/backoff.rs +++ b/crates/mq-proxy/src/client/backoff.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Reconnect": exponential backoff, base 250 ms, multiplier 2, jitter into `[d/2, d]`. use mq_transport_api::Time; diff --git a/crates/mq-proxy/src/client/exchange/mod.rs b/crates/mq-proxy/src/client/exchange/mod.rs index 103f4c8c..307ebcd0 100644 --- a/crates/mq-proxy/src/client/exchange/mod.rs +++ b/crates/mq-proxy/src/client/exchange/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §4: the pull-based H3 exchange core shared by the fetch front and //! the MITM front. Nothing is buffered here: QUIC flow control is the buffer, //! and fronts read only what they can take. diff --git a/crates/mq-proxy/src/client/exchange/resp.rs b/crates/mq-proxy/src/client/exchange/resp.rs index acbe69fd..93b0e72f 100644 --- a/crates/mq-proxy/src/client/exchange/resp.rs +++ b/crates/mq-proxy/src/client/exchange/resp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The collected H3 response head (SP4 spec §4.2 / §5; moved from the SP3 //! fetch download). No `fin`: the end is always reported by `read_body`. diff --git a/crates/mq-proxy/src/client/exchange/wire.rs b/crates/mq-proxy/src/client/exchange/wire.rs index e0da150c..fd385c26 100644 --- a/crates/mq-proxy/src/client/exchange/wire.rs +++ b/crates/mq-proxy/src/client/exchange/wire.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §4.4: the request head on the wire. `WireHead` exists only after //! the complete list (pseudo and control headers included) passed the shared //! limits; this is the single place where request sizes are checked. diff --git a/crates/mq-proxy/src/client/gateway/download.rs b/crates/mq-proxy/src/client/gateway/download.rs index e9084425..0a84849c 100644 --- a/crates/mq-proxy/src/client/gateway/download.rs +++ b/crates/mq-proxy/src/client/gateway/download.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.4: the fetch download's response head — collected from the H3 //! header section under the shared limits (SP4 spec §5), rendered as the local //! HTTP/1.1 head (`adp_resp_head`). diff --git a/crates/mq-proxy/src/client/gateway/head.rs b/crates/mq-proxy/src/client/gateway/head.rs index f8e622ba..81f60352 100644 --- a/crates/mq-proxy/src/client/gateway/head.rs +++ b/crates/mq-proxy/src/client/gateway/head.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.2: the fetch request head — the gateway reject sequence (steps //! 1–8) building the front-neutral `ReqHead` (SP4 spec §6.2); §5.6 the //! synthesised error reply. diff --git a/crates/mq-proxy/src/client/gateway/mod.rs b/crates/mq-proxy/src/client/gateway/mod.rs index f63b21d0..478d87b8 100644 --- a/crates/mq-proxy/src/client/gateway/mod.rs +++ b/crates/mq-proxy/src/client/gateway/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5: the client gateway — the fetch listener's requests, composed //! into `Client` (§5.8). SP4 spec §6: the fetch front (①) — H1 parse and //! render, the TCP side only; the H3 request goes through the exchange core. diff --git a/crates/mq-proxy/src/client/ingress_glue.rs b/crates/mq-proxy/src/client/ingress_glue.rs index 9518afd0..e15d9bbf 100644 --- a/crates/mq-proxy/src/client/ingress_glue.rs +++ b/crates/mq-proxy/src/client/ingress_glue.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: per accepted socket, feed the listener's parser from `tcp_rx`, //! write its replies with `tcp_write`, and turn read interest off once the //! request is complete (bytes behind it stay as the prebuffer). diff --git a/crates/mq-proxy/src/client/mitm/ca.rs b/crates/mq-proxy/src/client/mitm/ca.rs index 85cb5fa8..048d0966 100644 --- a/crates/mq-proxy/src/client/mitm/ca.rs +++ b/crates/mq-proxy/src/client/mitm/ca.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.1: load and check the MITM CA. use super::policy::{CaScope, DnsSubtree, Sni}; diff --git a/crates/mq-proxy/src/client/mitm/conn.rs b/crates/mq-proxy/src/client/mitm/conn.rs index 2c6aee28..6727a376 100644 --- a/crates/mq-proxy/src/client/mitm/conn.rs +++ b/crates/mq-proxy/src/client/mitm/conn.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.3 / §7.4 / §7.8: one browser conn — the ClientHello peek, //! the TLS + h2 pump with its streams, idle and the open-stream watchdog, //! and the `Closing` drain. diff --git a/crates/mq-proxy/src/client/mitm/head.rs b/crates/mq-proxy/src/client/mitm/head.rs index fe59c5cf..5683407b 100644 --- a/crates/mq-proxy/src/client/mitm/head.rs +++ b/crates/mq-proxy/src/client/mitm/head.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.5 / §7.7: the browser's h2 request head → the exchange core's //! `ReqHead`, and the core's `RespHead` → an h2 response head. diff --git a/crates/mq-proxy/src/client/mitm/host.rs b/crates/mq-proxy/src/client/mitm/host.rs index c497683f..6c77d532 100644 --- a/crates/mq-proxy/src/client/mitm/host.rs +++ b/crates/mq-proxy/src/client/mitm/host.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `MitmHost` (test-support): an `App` holding `Exchanges` and a //! `Mitm`, routing its sockets' TCP events, its timers and the H3 events of //! its exchanges to the front, as `Client` does. Every `Handoff` diff --git a/crates/mq-proxy/src/client/mitm/leaf.rs b/crates/mq-proxy/src/client/mitm/leaf.rs index 19bedb41..451a90a0 100644 --- a/crates/mq-proxy/src/client/mitm/leaf.rs +++ b/crates/mq-proxy/src/client/mitm/leaf.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.2: per-SNI forged leaves and their rustls `ServerConfig`s. use super::ca::Ca; diff --git a/crates/mq-proxy/src/client/mitm/mod.rs b/crates/mq-proxy/src/client/mitm/mod.rs index e075a6c6..e67ffe6b 100644 --- a/crates/mq-proxy/src/client/mitm/mod.rs +++ b/crates/mq-proxy/src/client/mitm/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7: the MITM front. pub mod ca; diff --git a/crates/mq-proxy/src/client/mitm/policy.rs b/crates/mq-proxy/src/client/mitm/policy.rs index 3059415d..745b37b0 100644 --- a/crates/mq-proxy/src/client/mitm/policy.rs +++ b/crates/mq-proxy/src/client/mitm/policy.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.3: routing — MITM or opaque relay for one captured TLS flow. use std::borrow::Borrow; diff --git a/crates/mq-proxy/src/client/mitm/stream.rs b/crates/mq-proxy/src/client/mitm/stream.rs index fb582143..9210c8ee 100644 --- a/crates/mq-proxy/src/client/mitm/stream.rs +++ b/crates/mq-proxy/src/client/mitm/stream.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.5 / §7.6: `MStream` — one h2 stream ⇄ one H3 exchange. The //! settlement table is the only place a stream's state ends. diff --git a/crates/mq-proxy/src/client/mod.rs b/crates/mq-proxy/src/client/mod.rs index 1ae7c5e0..72cfb7a7 100644 --- a/crates/mq-proxy/src/client/mod.rs +++ b/crates/mq-proxy/src/client/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2: the client — one tunnel connection with its control stream, //! ingress glue, data-stream opens, paths, reconnect, metrics and shutdown. //! diff --git a/crates/mq-proxy/src/client/paths.rs b/crates/mq-proxy/src/client/paths.rs index 86eba89a..c0a06ec6 100644 --- a/crates/mq-proxy/src/client/paths.rs +++ b/crates/mq-proxy/src/client/paths.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Paths": the `--path` entries after the first, each brought up as an //! extra multipath path on its own ephemeral UDP socket; and the primary path. //! diff --git a/crates/mq-proxy/src/client/pending.rs b/crates/mq-proxy/src/client/pending.rs index 2e6be4ac..112d082a 100644 --- a/crates/mq-proxy/src/client/pending.rs +++ b/crates/mq-proxy/src/client/pending.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Pending requests (before auth)": at most 256, kept across reconnects, //! 30 s deadline. diff --git a/crates/mq-proxy/src/client/tunnel_h3.rs b/crates/mq-proxy/src/client/tunnel_h3.rs index d459039f..39d23dbb 100644 --- a/crates/mq-proxy/src/client/tunnel_h3.rs +++ b/crates/mq-proxy/src/client/tunnel_h3.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §3 (layer ③): the H3 tunnel connection shared by the client's H3 //! fronts — connect, reconnect with backoff, extra paths, metrics, shutdown. //! Extracted from SP3's gateway (SP3 spec §5.7); log lines are unchanged. diff --git a/crates/mq-proxy/src/client/udp_assoc.rs b/crates/mq-proxy/src/client/udp_assoc.rs index 58f32942..aa7983f8 100644 --- a/crates/mq-proxy/src/client/udp_assoc.rs +++ b/crates/mq-proxy/src/client/udp_assoc.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1/§6.3: a UDP association — its app UDP socket, the source lock, //! and the table of DSTs it has sent to. diff --git a/crates/mq-proxy/src/client/udp_session.rs b/crates/mq-proxy/src/client/udp_session.rs index 5f175253..e661929e 100644 --- a/crates/mq-proxy/src/client/udp_session.rs +++ b/crates/mq-proxy/src/client/udp_session.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3: the client's UDP sessions — sid allocation, the 1024 cap, the //! `PendingAuth` queue, the optimistic OPEN and both datagram paths; spec §6.4 //! the session stream's RESP and every session end. diff --git a/crates/mq-proxy/src/config.rs b/crates/mq-proxy/src/config.rs index 7d42a96a..bdc1d0c5 100644 --- a/crates/mq-proxy/src/config.rs +++ b/crates/mq-proxy/src/config.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2, §6.3, §6.5: client and server settings; the CLI maps onto these (Task 9.1). use crate::client::mitm::MitmTuning; diff --git a/crates/mq-proxy/src/ingress/http_connect.rs b/crates/mq-proxy/src/ingress/http_connect.rs index 50925273..745e59b6 100644 --- a/crates/mq-proxy/src/ingress/http_connect.rs +++ b/crates/mq-proxy/src/ingress/http_connect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: HTTP CONNECT (authority-form) parser and its replies. use super::Progress; diff --git a/crates/mq-proxy/src/ingress/mod.rs b/crates/mq-proxy/src/ingress/mod.rs index bbeba3d9..99a1f2a0 100644 --- a/crates/mq-proxy/src/ingress/mod.rs +++ b/crates/mq-proxy/src/ingress/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: ingress parsers (SOCKS5, HTTP CONNECT) and transparent capture. mod http_connect; diff --git a/crates/mq-proxy/src/ingress/request.rs b/crates/mq-proxy/src/ingress/request.rs index fd016576..a31c18ee 100644 --- a/crates/mq-proxy/src/ingress/request.rs +++ b/crates/mq-proxy/src/ingress/request.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: the parser result and the 8 KiB ingress input cap shared by both parsers. use mq_runtime::Target; diff --git a/crates/mq-proxy/src/ingress/socks5.rs b/crates/mq-proxy/src/ingress/socks5.rs index 51ba6449..d7a9e7a2 100644 --- a/crates/mq-proxy/src/ingress/socks5.rs +++ b/crates/mq-proxy/src/ingress/socks5.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: SOCKS5 (RFC 1928, no-auth, CONNECT and UDP ASSOCIATE) parser //! and its replies. diff --git a/crates/mq-proxy/src/ingress/transparent.rs b/crates/mq-proxy/src/ingress/transparent.rs index 0adae699..0bb75476 100644 --- a/crates/mq-proxy/src/ingress/transparent.rs +++ b/crates/mq-proxy/src/ingress/transparent.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: transparent capture takes its target from `AcceptMeta.original_dst`. use mq_runtime::{AcceptMeta, Host, Target}; diff --git a/crates/mq-proxy/src/lib.rs b/crates/mq-proxy/src/lib.rs index 693d4f74..c19de09f 100644 --- a/crates/mq-proxy/src/lib.rs +++ b/crates/mq-proxy/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6 #![forbid(unsafe_code)] diff --git a/crates/mq-proxy/src/metrics.rs b/crates/mq-proxy/src/metrics.rs index fa50b96e..8cbdd11c 100644 --- a/crates/mq-proxy/src/metrics.rs +++ b/crates/mq-proxy/src/metrics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.5: `mq.conn` / `mq.path` lines. use mq_transport_api::{ConnStats, PathStats}; diff --git a/crates/mq-proxy/src/server/gateway/intake.rs b/crates/mq-proxy/src/server/gateway/intake.rs index b615f41e..04619dd8 100644 --- a/crates/mq-proxy/src/server/gateway/intake.rs +++ b/crates/mq-proxy/src/server/gateway/intake.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6.2: an H3 request's header section — captured header by //! header (`Capture::each`), then judged in the spec's order (`decide`, //! steps 2–8). Step 1 (the recv error) and step 9 (`origin.start`) are the diff --git a/crates/mq-proxy/src/server/gateway/mod.rs b/crates/mq-proxy/src/server/gateway/mod.rs index dc6bc590..c086cf34 100644 --- a/crates/mq-proxy/src/server/gateway/mod.rs +++ b/crates/mq-proxy/src/server/gateway/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6: the server gateway — H3 requests authenticated per request //! and replayed to the origin through the bridge (§7), composed into //! `Server` (§6.7). `Gateway { origin, core }`: the bridge reports into diff --git a/crates/mq-proxy/src/server/mod.rs b/crates/mq-proxy/src/server/mod.rs index c785e7a3..c47c6b46 100644 --- a/crates/mq-proxy/src/server/mod.rs +++ b/crates/mq-proxy/src/server/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3: the server — per connection a control stream (auth), then data //! streams that each carry one `CONNECT_TCP_REQUEST`, dial the origin and hand //! off to a relay. Every stream the app holds follows the app-owned stream diff --git a/crates/mq-proxy/src/server/origin/accounting.rs b/crates/mq-proxy/src/server/origin/accounting.rs index d285602b..87b8a1fd 100644 --- a/crates/mq-proxy/src/server/origin/accounting.rs +++ b/crates/mq-proxy/src/server/origin/accounting.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.7: an origin conn's record accounting and the pure decisions //! taken from it — the h2 pool-hit rule, `draining`, retirement and the idle //! sweep's verdict. No hyper here; the settling feeds the counters. diff --git a/crates/mq-proxy/src/server/origin/body.rs b/crates/mq-proxy/src/server/origin/body.rs index 20e0d7fd..88349bd0 100644 --- a/crates/mq-proxy/src/server/origin/body.rs +++ b/crates/mq-proxy/src/server/origin/body.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.4: the request body hyper polls. The gateway fills the shared //! `UploadBuf` from `h3_recv_body` (§6.3); hyper owns the `UploadBody`. diff --git a/crates/mq-proxy/src/server/origin/errors.rs b/crates/mq-proxy/src/server/origin/errors.rs index 81a75693..9b28e511 100644 --- a/crates/mq-proxy/src/server/origin/errors.rs +++ b/crates/mq-proxy/src/server/origin/errors.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.6: hyper errors → `curl:`, status and `origin_tls`. use super::response::HeadError; diff --git a/crates/mq-proxy/src/server/origin/events.rs b/crates/mq-proxy/src/server/origin/events.rs index 15b071f3..12435838 100644 --- a/crates/mq-proxy/src/server/origin/events.rs +++ b/crates/mq-proxy/src/server/origin/events.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6.4/§7.5: what the bridge reports to the gateway. Every entry //! point that can complete an exchange takes the sink as a parameter, so //! `Gateway { origin, core }` calls `self.origin.pump(cx, &mut self.core)` diff --git a/crates/mq-proxy/src/server/origin/host.rs b/crates/mq-proxy/src/server/origin/host.rs index bf6fa2db..18743caa 100644 --- a/crates/mq-proxy/src/server/origin/host.rs +++ b/crates/mq-proxy/src/server/origin/host.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `OriginHost` (test-support): an `App` that owns an `Origin` and a recording //! `BridgeEvents` sink, so tests drive the bridge as the gateway would — every //! routed callback, `start` and `cancel` pump afterwards (spec §6.7). diff --git a/crates/mq-proxy/src/server/origin/key.rs b/crates/mq-proxy/src/server/origin/key.rs index 9e135c0d..558b0d94 100644 --- a/crates/mq-proxy/src/server/origin/key.rs +++ b/crates/mq-proxy/src/server/origin/key.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.2 step 1: the bridge's own authority split (`http::uri::Authority` //! accepts `user@host` and answers `None` for `host:99999`), the request's //! acceptable protocols and its ALPN list. diff --git a/crates/mq-proxy/src/server/origin/mod.rs b/crates/mq-proxy/src/server/origin/mod.rs index 24a2bbe0..4c0cfff4 100644 --- a/crates/mq-proxy/src/server/origin/mod.rs +++ b/crates/mq-proxy/src/server/origin/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7: the origin bridge — hyper 1.x client `conn` API + rustls, //! polled from the shard with the `Dirty` waker and `ShardExec` (§7.1); no //! tokio task or channel on the data path. diff --git a/crates/mq-proxy/src/server/origin/pump.rs b/crates/mq-proxy/src/server/origin/pump.rs index e208b56f..e34246ef 100644 --- a/crates/mq-proxy/src/server/origin/pump.rs +++ b/crates/mq-proxy/src/server/origin/pump.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.3–§7.5: the pump — TCP ↔ pipe ↔ rustls, hyper polled with //! the `Dirty` waker and `ShardExec`, the `PUMP_CAP` budget, EOF ordering — //! request assignment and send, and response delivery to `BridgeEvents`. diff --git a/crates/mq-proxy/src/server/origin/request.rs b/crates/mq-proxy/src/server/origin/request.rs index fc70afc8..b5d1a8e7 100644 --- a/crates/mq-proxy/src/server/origin/request.rs +++ b/crates/mq-proxy/src/server/origin/request.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.4: the `http::Request` hyper sends, built at assignment time //! from the stored request in the conn's URI form. diff --git a/crates/mq-proxy/src/server/origin/response.rs b/crates/mq-proxy/src/server/origin/response.rs index 1b545e62..40b87ee7 100644 --- a/crates/mq-proxy/src/server/origin/response.rs +++ b/crates/mq-proxy/src/server/origin/response.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.5 / §6.4: the origin's response head, normalised for the //! gateway — or the reason it cannot be relayed (502 `upstream-protocol`). diff --git a/crates/mq-proxy/src/server/origin/tls.rs b/crates/mq-proxy/src/server/origin/tls.rs index f21ddf3a..e7d3eaff 100644 --- a/crates/mq-proxy/src/server/origin/tls.rs +++ b/crates/mq-proxy/src/server/origin/tls.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.8: the origin client's TLS configuration — ring only, roots //! from the native store or, with `--origin-ca`, from that PEM file **only**. diff --git a/crates/mq-proxy/src/server/udp_session.rs b/crates/mq-proxy/src/server/udp_session.rs index 31732f7f..9b41a7c5 100644 --- a/crates/mq-proxy/src/server/udp_session.rs +++ b/crates/mq-proxy/src/server/udp_session.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.1: the server's UDP sessions — the OPEN's admission gates, the //! resolve, the app socket and the RESP; spec §7.2 the datagram paths, the //! pre-OPEN buffer, the idle timer and `end_session`. diff --git a/crates/mq-proxy/src/tls_pipe/exec.rs b/crates/mq-proxy/src/tls_pipe/exec.rs index 116ac688..bf2d3c0f 100644 --- a/crates/mq-proxy/src/tls_pipe/exec.rs +++ b/crates/mq-proxy/src/tls_pipe/exec.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.1 / SP4 spec §2.1: hyper (and h2, rustls) is polled from the shard — one `Dirty` waker per //! `Origin` and a single-thread executor; no tokio task or channel. diff --git a/crates/mq-proxy/src/tls_pipe/mod.rs b/crates/mq-proxy/src/tls_pipe/mod.rs index e4001c06..171771b2 100644 --- a/crates/mq-proxy/src/tls_pipe/mod.rs +++ b/crates/mq-proxy/src/tls_pipe/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §2.1: the in-shard pipe and executor shared by the SP3 origin //! bridge and the MITM front — hyper, h2 and rustls are polled by hand with //! the `Dirty` waker; no tokio task or channel on the data path. diff --git a/crates/mq-proxy/src/tls_pipe/pipe.rs b/crates/mq-proxy/src/tls_pipe/pipe.rs index 9f29e0f8..aebf2487 100644 --- a/crates/mq-proxy/src/tls_pipe/pipe.rs +++ b/crates/mq-proxy/src/tls_pipe/pipe.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §7.1: the pipe between an origin socket and hyper. hyper's //! `Connection` owns its IO object, so the state is shared: `PipeIo` is //! hyper's end, `PipeHandle` (kept in `OriginConn`) the pump's. diff --git a/crates/mq-proxy/src/tls_pipe/tls_io.rs b/crates/mq-proxy/src/tls_pipe/tls_io.rs index 90c7840e..5d2ab6be 100644 --- a/crates/mq-proxy/src/tls_pipe/tls_io.rs +++ b/crates/mq-proxy/src/tls_pipe/tls_io.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §2.1: the rustls ⇄ pipe ⇄ TCP pump, generic over the rustls side //! (client for the origin bridge, server for the MITM conn). The origin //! pump's TLS logic, moved; one change: ciphertext staging is capped. diff --git a/crates/mq-proxy/src/udp/defrag.rs b/crates/mq-proxy/src/udp/defrag.rs index 69937391..f21d536c 100644 --- a/crates/mq-proxy/src/udp/defrag.rs +++ b/crates/mq-proxy/src/udp/defrag.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §2.3: 4-slot LRU datagram defragmenter. use mq_wire::udp_msg::UdpMsgHdr; diff --git a/crates/mq-proxy/src/udp/mod.rs b/crates/mq-proxy/src/udp/mod.rs index 6478ab2c..60c2947f 100644 --- a/crates/mq-proxy/src/udp/mod.rs +++ b/crates/mq-proxy/src/udp/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5: shared UDP lane pieces — constants, `SessionEnd`, `Counters`. pub mod defrag; diff --git a/crates/mq-proxy/src/udp/preopen.rs b/crates/mq-proxy/src/udp/preopen.rs index 52789e8d..e47366a4 100644 --- a/crates/mq-proxy/src/udp/preopen.rs +++ b/crates/mq-proxy/src/udp/preopen.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.2: per-connection pre-OPEN datagram buffer. use super::{PREOPEN_BYTES, PREOPEN_DGRAMS, PREOPEN_TTL}; diff --git a/crates/mq-proxy/src/udp/send.rs b/crates/mq-proxy/src/udp/send.rs index 8acc449e..ec7ef9ef 100644 --- a/crates/mq-proxy/src/udp/send.rs +++ b/crates/mq-proxy/src/udp/send.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5: the per-connection datagram MSS cache and the fragment send policy, //! shared by both roles. diff --git a/crates/mq-proxy/src/udp/socks5udp.rs b/crates/mq-proxy/src/udp/socks5udp.rs index ce4eb2ee..eac0a9db 100644 --- a/crates/mq-proxy/src/udp/socks5udp.rs +++ b/crates/mq-proxy/src/udp/socks5udp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5: SOCKS5 UDP encapsulation header (RFC 1928 §7). use mq_runtime::Target; diff --git a/crates/mq-proxy/tests/backoff.rs b/crates/mq-proxy/tests/backoff.rs index a9efa3d1..13192da4 100644 --- a/crates/mq-proxy/tests/backoff.rs +++ b/crates/mq-proxy/tests/backoff.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2: reconnect backoff schedule. use mq_proxy::client::backoff::{Backoff, backoff_ms}; diff --git a/crates/mq-proxy/tests/client_auth.rs b/crates/mq-proxy/tests/client_auth.rs index f7a8d9e8..7a8a33c2 100644 --- a/crates/mq-proxy/tests/client_auth.rs +++ b/crates/mq-proxy/tests/client_auth.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 Connecting → Authing → Serving: the control stream, the auth //! deadline, auth refusal, control-stream loss and handshake write retries. diff --git a/crates/mq-proxy/tests/client_exchange.rs b/crates/mq-proxy/tests/client_exchange.rs index a77feb14..aadee64a 100644 --- a/crates/mq-proxy/tests/client_exchange.rs +++ b/crates/mq-proxy/tests/client_exchange.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §4.2/§4.3: the H3 exchange core — open, the upload send rules, //! the upload EOF rule, reset, event routing, the pull reads, the `H3Closed` //! close handling, the end rule and failure settlement — on a diff --git a/crates/mq-proxy/tests/client_gateway_download.rs b/crates/mq-proxy/tests/client_gateway_download.rs index 1acf1d70..812490fb 100644 --- a/crates/mq-proxy/tests/client_gateway_download.rs +++ b/crates/mq-proxy/tests/client_gateway_download.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.4: the fetch download (H3 → local TCP) — the rendered head, //! 16 KiB reads written raw or chunk-framed, `SendBufFull` backpressure, the //! malformed-head 502, and the abort paths (§5.5). The body check is the diff --git a/crates/mq-proxy/tests/client_gateway_ends.rs b/crates/mq-proxy/tests/client_gateway_ends.rs index 8b9549f3..2638c441 100644 --- a/crates/mq-proxy/tests/client_gateway_ends.rs +++ b/crates/mq-proxy/tests/client_gateway_ends.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.5 the fetch request's ends (the finish write order with //! pending output, `H3Closed` after `ConnClosed`, abort), §5.9 shutdown, //! and §5.7 the metrics tick's two blocks. The stale readiness, diff --git a/crates/mq-proxy/tests/client_gateway_head.rs b/crates/mq-proxy/tests/client_gateway_head.rs index baddff66..4611c57b 100644 --- a/crates/mq-proxy/tests/client_gateway_head.rs +++ b/crates/mq-proxy/tests/client_gateway_head.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.2: the fetch request head — listener replies, the head deadline, //! the reject sequence, steps 9–10 (tunnel, open, send headers) and the hand-off //! to the upload. diff --git a/crates/mq-proxy/tests/client_gateway_tunnel.rs b/crates/mq-proxy/tests/client_gateway_tunnel.rs index 8a84d582..6c4d3f76 100644 --- a/crates/mq-proxy/tests/client_gateway_tunnel.rs +++ b/crates/mq-proxy/tests/client_gateway_tunnel.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.7 the gateway's H3 tunnel (eager connect, establish, loss, backoff, //! `--no-reconnect`), §5.8 routing inside `Client`, §5.9 the joint shutdown exit. diff --git a/crates/mq-proxy/tests/client_gateway_upload.rs b/crates/mq-proxy/tests/client_gateway_upload.rs index 37723e4a..58ecca73 100644 --- a/crates/mq-proxy/tests/client_gateway_upload.rs +++ b/crates/mq-proxy/tests/client_gateway_upload.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §5.3: the fetch upload (local TCP → H3) — 16 KiB chunks with the //! FIN on the last byte, H3 backpressure, the EOF rule, bytes beyond //! `Content-Length`, and the abort paths (§5.5). diff --git a/crates/mq-proxy/tests/client_lifecycle.rs b/crates/mq-proxy/tests/client_lifecycle.rs index a18bc5ca..e7ed2644 100644 --- a/crates/mq-proxy/tests/client_lifecycle.rs +++ b/crates/mq-proxy/tests/client_lifecycle.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 tunnel loss / reconnect / `--no-reconnect`, §6.5 metrics, §6.6 shutdown. mod common; diff --git a/crates/mq-proxy/tests/client_mitm_conn.rs b/crates/mq-proxy/tests/client_mitm_conn.rs index da1a7810..0e3b776b 100644 --- a/crates/mq-proxy/tests/client_mitm_conn.rs +++ b/crates/mq-proxy/tests/client_mitm_conn.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.3 / §7.4 / §7.8: the MITM conn — peek and routing, the TLS //! and h2 handshakes, idle, and the `Closing` drain. Streams are the Task //! 7.2 stub: every request is answered 502 `tunnel-unavailable`. diff --git a/crates/mq-proxy/tests/client_mitm_stream.rs b/crates/mq-proxy/tests/client_mitm_stream.rs index 566eceda..6ef748fc 100644 --- a/crates/mq-proxy/tests/client_mitm_stream.rs +++ b/crates/mq-proxy/tests/client_mitm_stream.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §7.5–§7.8: `MStream` — one h2 stream ⇄ one H3 exchange. The //! upload and its backpressure, the download's §7.6 gates, the settlement //! table, admission, and open-stream liveness. The H3 side is scripted. diff --git a/crates/mq-proxy/tests/client_mitm_wiring.rs b/crates/mq-proxy/tests/client_mitm_wiring.rs index 5425ef11..6374c4c2 100644 --- a/crates/mq-proxy/tests/client_mitm_wiring.rs +++ b/crates/mq-proxy/tests/client_mitm_wiring.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP4 spec §2.2 / §7.9 / §7.10: the MITM front inside `Client` — the shared //! H3 tunnel, routing by owner, the opaque hand-off to the raw tunnel, the //! `mq.mitm` line and shutdown. diff --git a/crates/mq-proxy/tests/client_open.rs b/crates/mq-proxy/tests/client_open.rs index d64ed0c7..5f01f851 100644 --- a/crates/mq-proxy/tests/client_open.rs +++ b/crates/mq-proxy/tests/client_open.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Open" and §5.4 app-owned streams: CONNECT_TCP on a data stream, //! the response phase, its failure paths and server-initiated streams. diff --git a/crates/mq-proxy/tests/client_paths.rs b/crates/mq-proxy/tests/client_paths.rs index ca7a0295..92de127d 100644 --- a/crates/mq-proxy/tests/client_paths.rs +++ b/crates/mq-proxy/tests/client_paths.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Paths": candidates, `MpReady`, socket opens, `add_path` outcomes, //! and the reset on `ConnClosed`. diff --git a/crates/mq-proxy/tests/client_udp_assoc.rs b/crates/mq-proxy/tests/client_udp_assoc.rs index 57b2beee..029638db 100644 --- a/crates/mq-proxy/tests/client_udp_assoc.rs +++ b/crates/mq-proxy/tests/client_udp_assoc.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1 UDP ASSOCIATE, §6.2 availability, §6.3 source learning. mod common; diff --git a/crates/mq-proxy/tests/client_udp_session.rs b/crates/mq-proxy/tests/client_udp_session.rs index 69550e24..9f91242d 100644 --- a/crates/mq-proxy/tests/client_udp_session.rs +++ b/crates/mq-proxy/tests/client_udp_session.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3 client UDP sessions: sid, 1024 cap, `PendingAuth`, optimistic //! OPEN with the partial-write retry, outbound and inbound datagram paths; //! spec §6.4 the session stream's RESP, its ends and the negative cache. diff --git a/crates/mq-proxy/tests/common/mod.rs b/crates/mq-proxy/tests/common/mod.rs index 48475579..38409170 100644 --- a/crates/mq-proxy/tests/common/mod.rs +++ b/crates/mq-proxy/tests/common/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Harness for the client tests (spec §6.2): `Shard`, //! driven by hand on the socket side as the driver would. #![allow(dead_code)] diff --git a/crates/mq-proxy/tests/http_connect.rs b/crates/mq-proxy/tests/http_connect.rs index 362ee070..347ea946 100644 --- a/crates/mq-proxy/tests/http_connect.rs +++ b/crates/mq-proxy/tests/http_connect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: HTTP CONNECT ingress parser. use mq_proxy::ingress::{ diff --git a/crates/mq-proxy/tests/ingress_glue.rs b/crates/mq-proxy/tests/ingress_glue.rs index ea1367a0..5a0c13dd 100644 --- a/crates/mq-proxy/tests/ingress_glue.rs +++ b/crates/mq-proxy/tests/ingress_glue.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: the client's ingress glue — parsers fed from `tcp_rx`, replies via //! `tcp_write`, read interest off once complete, the 8 KiB cap and the 10 s deadline. diff --git a/crates/mq-proxy/tests/metrics_format.rs b/crates/mq-proxy/tests/metrics_format.rs index e28d7e6c..7b833b32 100644 --- a/crates/mq-proxy/tests/metrics_format.rs +++ b/crates/mq-proxy/tests/metrics_format.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.5: `mq.conn` / `mq.path` lines. use mq_proxy::metrics::{format_conn_line, format_metrics, format_path_line}; diff --git a/crates/mq-proxy/tests/mitm_harness/mod.rs b/crates/mq-proxy/tests/mitm_harness/mod.rs index ce06027e..b3a34180 100644 --- a/crates/mq-proxy/tests/mitm_harness/mod.rs +++ b/crates/mq-proxy/tests/mitm_harness/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Harness for the MITM front tests (SP4 spec §7): `MH`, a //! `Shard` whose `TRANSPARENT` accepts carry an //! original destination, and `Browser`, a rustls client trusting `ca-p256` diff --git a/crates/mq-proxy/tests/origdst.rs b/crates/mq-proxy/tests/origdst.rs index 38ca47c1..dd6293c8 100644 --- a/crates/mq-proxy/tests/origdst.rs +++ b/crates/mq-proxy/tests/origdst.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: transparent capture target. //! `unsupported_family` is covered by mq-linux's `sockaddr_conversion_rejects_unix_family`; //! `short_buffer` has no equivalent (owned `SocketAddr`, no caller buffer). diff --git a/crates/mq-proxy/tests/origin_harness/mod.rs b/crates/mq-proxy/tests/origin_harness/mod.rs index 51d50888..42e30f28 100644 --- a/crates/mq-proxy/tests/origin_harness/mod.rs +++ b/crates/mq-proxy/tests/origin_harness/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Harness for the origin bridge tests (spec §7): `Shard`, with dial results and socket bytes fed by hand as the driver //! would, and `TlsPeer`, a hand-driven rustls server playing the origin. diff --git a/crates/mq-proxy/tests/pending.rs b/crates/mq-proxy/tests/pending.rs index a55ee930..704b0f15 100644 --- a/crates/mq-proxy/tests/pending.rs +++ b/crates/mq-proxy/tests/pending.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.2 "Pending requests (before auth)". use mq_proxy::client::pending::{Full, IngressKind, MAX_PENDING, Pending, PendingOpen}; diff --git a/crates/mq-proxy/tests/server_auth.rs b/crates/mq-proxy/tests/server_auth.rs index 61e3ca44..5d4ee304 100644 --- a/crates/mq-proxy/tests/server_auth.rs +++ b/crates/mq-proxy/tests/server_auth.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3 Auth: the control stream, the token compare, refusal, the auth //! deadline, and the streams that are reset before or without auth. diff --git a/crates/mq-proxy/tests/server_dial.rs b/crates/mq-proxy/tests/server_dial.rs index 118b2892..763f6ab6 100644 --- a/crates/mq-proxy/tests/server_dial.rs +++ b/crates/mq-proxy/tests/server_dial.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3 "Data streams": the dial, its result, the response, the relay //! hand-off, and the app-owned stream rule (§5.4) while dialling and retiring. diff --git a/crates/mq-proxy/tests/server_gateway_conn.rs b/crates/mq-proxy/tests/server_gateway_conn.rs index e7424d50..2af2722f 100644 --- a/crates/mq-proxy/tests/server_gateway_conn.rs +++ b/crates/mq-proxy/tests/server_gateway_conn.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6 intro, §6.7: H3 connections in the server's tables, composed //! with the gateway. diff --git a/crates/mq-proxy/tests/server_gateway_intake.rs b/crates/mq-proxy/tests/server_gateway_intake.rs index 3151706d..677fe65a 100644 --- a/crates/mq-proxy/tests/server_gateway_intake.rs +++ b/crates/mq-proxy/tests/server_gateway_intake.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6.2, §6.3 (drain), §6.5: H3 intake on the composed server. mod server_harness; diff --git a/crates/mq-proxy/tests/server_gateway_metrics.rs b/crates/mq-proxy/tests/server_gateway_metrics.rs index d5a49fe9..d7ece515 100644 --- a/crates/mq-proxy/tests/server_gateway_metrics.rs +++ b/crates/mq-proxy/tests/server_gateway_metrics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6.6: `mq.req` per request (formatted by `mq_http::metrics`), //! request ends, cancellation and shutdown on the composed server. diff --git a/crates/mq-proxy/tests/server_gateway_relay.rs b/crates/mq-proxy/tests/server_gateway_relay.rs index 52a8a6ac..5c7c3f63 100644 --- a/crates/mq-proxy/tests/server_gateway_relay.rs +++ b/crates/mq-proxy/tests/server_gateway_relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP3 spec §6.3–§6.5, §10.2 (server): the relay — upload H3 → origin, //! download origin → H3, the body checks — first with `BridgeEvents` driven //! directly through `gw_core_mut()`, then on the composed server against a diff --git a/crates/mq-proxy/tests/server_harness/mod.rs b/crates/mq-proxy/tests/server_harness/mod.rs index 49ab9f07..676efef9 100644 --- a/crates/mq-proxy/tests/server_harness/mod.rs +++ b/crates/mq-proxy/tests/server_harness/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Harness for the server tests (spec §6.3): `Shard`, //! with dial completions fed by hand as the driver would. #![allow(dead_code)] diff --git a/crates/mq-proxy/tests/server_lifecycle.rs b/crates/mq-proxy/tests/server_lifecycle.rs index bb54fb6c..d7a2ea19 100644 --- a/crates/mq-proxy/tests/server_lifecycle.rs +++ b/crates/mq-proxy/tests/server_lifecycle.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.5 metrics for the most recently accepted connection and §6.6 shutdown. mod server_harness; diff --git a/crates/mq-proxy/tests/server_origin_connect.rs b/crates/mq-proxy/tests/server_origin_connect.rs index a63c871a..9813b16e 100644 --- a/crates/mq-proxy/tests/server_origin_connect.rs +++ b/crates/mq-proxy/tests/server_origin_connect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.2/§7.3/§7.6/§7.7: the origin bridge's dial, TLS handshake and //! connect deadline, driven through `OriginHost` on a scripted shard. diff --git a/crates/mq-proxy/tests/server_origin_pool_h1.rs b/crates/mq-proxy/tests/server_origin_pool_h1.rs index a14e43d8..1d13eb68 100644 --- a/crates/mq-proxy/tests/server_origin_pool_h1.rs +++ b/crates/mq-proxy/tests/server_origin_pool_h1.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.7 "h1 conns", §7.2 step 2: the h1 pool hit, idleness, the class //! B / C / E decisions at the settling and the one retry, driven through //! `OriginHost` with plain HTTP/1.1 bytes played by the test. diff --git a/crates/mq-proxy/tests/server_origin_pump.rs b/crates/mq-proxy/tests/server_origin_pump.rs index 5ed79c7c..d2f392f7 100644 --- a/crates/mq-proxy/tests/server_origin_pump.rs +++ b/crates/mq-proxy/tests/server_origin_pump.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.3–§7.6: the origin pump (TCP ↔ pipe ↔ rustls, budget, EOF //! ordering), request send and response delivery, driven through //! `OriginHost` with raw HTTP/1.1 bytes played by the test. diff --git a/crates/mq-proxy/tests/server_origin_records.rs b/crates/mq-proxy/tests/server_origin_records.rs index 9bc996a0..8a17dc0e 100644 --- a/crates/mq-proxy/tests/server_origin_records.rs +++ b/crates/mq-proxy/tests/server_origin_records.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.7: request records, the settling point, the removal classes A, D, //! E and E′, `closing`, `by_h3` upkeep, the idle sweep and shutdown, driven //! through `OriginHost` with plain HTTP/1.1 bytes (B and C: diff --git a/crates/mq-proxy/tests/server_request.rs b/crates/mq-proxy/tests/server_request.rs index e2e40f66..522213d7 100644 --- a/crates/mq-proxy/tests/server_request.rs +++ b/crates/mq-proxy/tests/server_request.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.3 "Other streams" / "Data streams": the stream type, the //! `CONNECT_TCP_REQUEST`, its 10 s deadline and 1 KiB buffer, and the //! 4096-stream budget. diff --git a/crates/mq-proxy/tests/server_udp_open.rs b/crates/mq-proxy/tests/server_udp_open.rs index 3348670c..07bd63be 100644 --- a/crates/mq-proxy/tests/server_udp_open.rs +++ b/crates/mq-proxy/tests/server_udp_open.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.1: UDP session streams — the `UDP_SESSION_OPEN`, the admission //! gates, the resolve and the app socket, the RESP, and a FIN in every phase. diff --git a/crates/mq-proxy/tests/server_udp_relay.rs b/crates/mq-proxy/tests/server_udp_relay.rs index a82eb63b..daa1f624 100644 --- a/crates/mq-proxy/tests/server_udp_relay.rs +++ b/crates/mq-proxy/tests/server_udp_relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.2: the server's datagram paths — the auth gate, the pre-OPEN //! buffer and its flush, client → target with reassembly, target → client //! with the peer check and the fragment send policy, the idle timer, and diff --git a/crates/mq-proxy/tests/socks5.rs b/crates/mq-proxy/tests/socks5.rs index 70399adb..5ad2f566 100644 --- a/crates/mq-proxy/tests/socks5.rs +++ b/crates/mq-proxy/tests/socks5.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.1: SOCKS5 ingress parser. use mq_proxy::ingress::{Progress, Socks5Parser, socks5_error_reply, socks5_success_reply}; diff --git a/crates/mq-proxy/tests/udp_defrag.rs b/crates/mq-proxy/tests/udp_defrag.rs index f1a88387..2c3146bf 100644 --- a/crates/mq-proxy/tests/udp_defrag.rs +++ b/crates/mq-proxy/tests/udp_defrag.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §2.3: 4-slot LRU datagram defragmenter. use mq_proxy::udp::defrag::{Defrag, Feed}; diff --git a/crates/mq-proxy/tests/udp_preopen.rs b/crates/mq-proxy/tests/udp_preopen.rs index 4d39c3e0..e8986424 100644 --- a/crates/mq-proxy/tests/udp_preopen.rs +++ b/crates/mq-proxy/tests/udp_preopen.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7.2: server pre-OPEN datagram buffer. use mq_proxy::udp::preopen::PreOpen; diff --git a/crates/mq-proxy/tests/udp_send.rs b/crates/mq-proxy/tests/udp_send.rs index c5c3f786..9644ab79 100644 --- a/crates/mq-proxy/tests/udp_send.rs +++ b/crates/mq-proxy/tests/udp_send.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5: datagram MSS cache and the fragment send policy (`send_packet`). mod common; diff --git a/crates/mq-proxy/tests/udp_socks5udp.rs b/crates/mq-proxy/tests/udp_socks5udp.rs index 3d5f65cf..3335bfb1 100644 --- a/crates/mq-proxy/tests/udp_socks5udp.rs +++ b/crates/mq-proxy/tests/udp_socks5udp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5: SOCKS5 UDP encapsulation header (RFC 1928 §7). use mq_proxy::udp::socks5udp::{Dst, build, parse, target_of}; diff --git a/crates/mq-runtime/src/app.rs b/crates/mq-runtime/src/app.rs index 3ebedc6e..d4c37ed8 100644 --- a/crates/mq-runtime/src/app.rs +++ b/crates/mq-runtime/src/app.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The app interface (spec §5.4) and the shard's request/result types (spec §5.2, §5.3). use crate::ids::{DialOpId, SocketOpId, TcpId, TimerId, UdpSocketId}; diff --git a/crates/mq-runtime/src/driver/core.rs b/crates/mq-runtime/src/driver/core.rs index a430e5af..88d15ec3 100644 --- a/crates/mq-runtime/src/driver/core.rs +++ b/crates/mq-runtime/src/driver/core.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The loop core (spec §5.3 "Loop core and `Io`", §5.5 "One loop iteration"): //! the synchronous sequencing shared by the production driver and the fakes. //! It owns the per-socket latches, the driver deadlines, the resolver queue, diff --git a/crates/mq-runtime/src/driver/deadlines.rs b/crates/mq-runtime/src/driver/deadlines.rs index 160cd3ba..32ce6c6a 100644 --- a/crates/mq-runtime/src/driver/deadlines.rs +++ b/crates/mq-runtime/src/driver/deadlines.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The driver's own deadline set (spec §5.3 "Driver deadlines"): dial //! deadlines, the listener retry after `EMFILE`, and the shutdown cap. diff --git a/crates/mq-runtime/src/driver/driver.rs b/crates/mq-runtime/src/driver/driver.rs index 7b46a29c..9542d323 100644 --- a/crates/mq-runtime/src/driver/driver.rs +++ b/crates/mq-runtime/src/driver/driver.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `Driver`: the setup API around `LoopCore` (spec §5.3 "Setup"). use super::core::{LoopConfig, LoopCore}; diff --git a/crates/mq-runtime/src/driver/io.rs b/crates/mq-runtime/src/driver/io.rs index e07f9422..d5dc1e20 100644 --- a/crates/mq-runtime/src/driver/io.rs +++ b/crates/mq-runtime/src/driver/io.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The `Io` trait (spec §5.3 "Loop core and `Io`"). Handles are opaque keys //! owned by the `Io` implementation. diff --git a/crates/mq-runtime/src/driver/mio_io.rs b/crates/mq-runtime/src/driver/mio_io.rs index 56a81070..aaa8837a 100644 --- a/crates/mq-runtime/src/driver/mio_io.rs +++ b/crates/mq-runtime/src/driver/mio_io.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `MioIo`: the production `Io` (spec §5.3) — an edge-triggered `mio::Poll` //! waited on through a `current_thread` tokio runtime, a `timerfd` for //! microsecond deadlines, the resolver on the runtime's blocking pool, and diff --git a/crates/mq-runtime/src/driver/mod.rs b/crates/mq-runtime/src/driver/mod.rs index dd29c30f..b53e2af9 100644 --- a/crates/mq-runtime/src/driver/mod.rs +++ b/crates/mq-runtime/src/driver/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The driver (spec §5.3): the loop core over an `Io` trait. mod core; diff --git a/crates/mq-runtime/src/driver/resolver.rs b/crates/mq-runtime/src/driver/resolver.rs index e99d5dee..fa1a0e52 100644 --- a/crates/mq-runtime/src/driver/resolver.rs +++ b/crates/mq-runtime/src/driver/resolver.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Resolver queue accounting (spec §5.3): at most 64 resolutions run; further //! dials wait FIFO. A queued dial can be cancelled; a running resolution keeps //! its slot until its result returns, and that result is then dropped. diff --git a/crates/mq-runtime/src/ids.rs b/crates/mq-runtime/src/ids.rs index 83a2b548..96c313ac 100644 --- a/crates/mq-runtime/src/ids.rs +++ b/crates/mq-runtime/src/ids.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Shard-allocated generational ids (spec §5.2 "Identities"). //! //! Same shape as `mq_transport_api::ConnId`: `{ index, generation }` with a diff --git a/crates/mq-runtime/src/lib.rs b/crates/mq-runtime/src/lib.rs index c77beba7..d50cd3a5 100644 --- a/crates/mq-runtime/src/lib.rs +++ b/crates/mq-runtime/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The shard runtime (spec §5). #![forbid(unsafe_code)] diff --git a/crates/mq-runtime/src/shard/inputs.rs b/crates/mq-runtime/src/shard/inputs.rs index 7f0192ab..f9d7ab8d 100644 --- a/crates/mq-runtime/src/shard/inputs.rs +++ b/crates/mq-runtime/src/shard/inputs.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The shard's inputs, called by the driver (spec §5.2 "Inputs"). use super::tcp::TcpEntry; diff --git a/crates/mq-runtime/src/shard/mod.rs b/crates/mq-runtime/src/shard/mod.rs index a6d13ceb..b1e520ad 100644 --- a/crates/mq-runtime/src/shard/mod.rs +++ b/crates/mq-runtime/src/shard/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The shard (spec §5.2): a synchronous state machine that owns the transport, //! the `App`, the TCP socket table, relays, app timers and the UDP socket map. //! It performs no syscalls; a driver feeds it and carries out its requests. diff --git a/crates/mq-runtime/src/shard/relay.rs b/crates/mq-runtime/src/shard/relay.rs index f0431b58..36120ccf 100644 --- a/crates/mq-runtime/src/shard/relay.rs +++ b/crates/mq-runtime/src/shard/relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The flow relay (spec §5.6): one QUIC stream bound to one TCP socket. use super::ringbuf::RingBuf; diff --git a/crates/mq-runtime/src/shard/rng.rs b/crates/mq-runtime/src/shard/rng.rs index 977147ac..d5b5d34b 100644 --- a/crates/mq-runtime/src/shard/rng.rs +++ b/crates/mq-runtime/src/shard/rng.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The shard's seeded RNG (spec §5.2), reached by the app via `Cx::rng()`. /// spec §5.2: xorshift64*; reproducible for a given seed. diff --git a/crates/mq-runtime/src/shard/routing.rs b/crates/mq-runtime/src/shard/routing.rs index e2d10d1d..520e2c54 100644 --- a/crates/mq-runtime/src/shard/routing.rs +++ b/crates/mq-runtime/src/shard/routing.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Event routing (spec §5.2 `drive` step 3, §5.4 "Event routing") and UDP //! socket selection (spec §5.2 "UDP socket selection"). diff --git a/crates/mq-runtime/src/shard/tcp.rs b/crates/mq-runtime/src/shard/tcp.rs index 76a8e25a..4daea565 100644 --- a/crates/mq-runtime/src/shard/tcp.rs +++ b/crates/mq-runtime/src/shard/tcp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The TCP socket table (spec §5.2, §5.4): app-owned sockets and relays. use super::{RELAY_BUF, Relay, ShardState, TCP_BUF}; diff --git a/crates/mq-runtime/src/shard/timers.rs b/crates/mq-runtime/src/shard/timers.rs index 950b73c3..e0731f53 100644 --- a/crates/mq-runtime/src/shard/timers.rs +++ b/crates/mq-runtime/src/shard/timers.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! App timers (spec §5.2 `drive` step 1, §5.4 `set_timer`/`cancel_timer`). use super::{Shard, ShardState}; diff --git a/crates/mq-runtime/src/shard/tx_ring.rs b/crates/mq-runtime/src/shard/tx_ring.rs index 35aed898..78671928 100644 --- a/crates/mq-runtime/src/shard/tx_ring.rs +++ b/crates/mq-runtime/src/shard/tx_ring.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! An app-owned UDP socket's send ring (SP2 spec §4.1): one record per //! datagram, `dst || u16 len || bytes`, in a `RingBuf`. diff --git a/crates/mq-runtime/src/testing/fake_io.rs b/crates/mq-runtime/src/testing/fake_io.rs index 235fd3ce..4311ad01 100644 --- a/crates/mq-runtime/src/testing/fake_io.rs +++ b/crates/mq-runtime/src/testing/fake_io.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `FakeIo`: an `Io` on virtual time with scripted sockets, resolutions and //! connects (spec §8.1 "Scripted"). Never sleeps: with `auto_advance` on, a //! `wait(Until(t))` with nothing pending moves the clock to `t`. diff --git a/crates/mq-runtime/src/testing/log_capture.rs b/crates/mq-runtime/src/testing/log_capture.rs index b66604a7..5a40ca4c 100644 --- a/crates/mq-runtime/src/testing/log_capture.rs +++ b/crates/mq-runtime/src/testing/log_capture.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! A `log::Log` that appends formatted records to a thread-local buffer, so a //! test can assert the log lines its own thread produced (spec §8.1). diff --git a/crates/mq-runtime/src/testing/mod.rs b/crates/mq-runtime/src/testing/mod.rs index 1c780931..129222f1 100644 --- a/crates/mq-runtime/src/testing/mod.rs +++ b/crates/mq-runtime/src/testing/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Test harness support (spec §8.1), behind the `test-support` feature. mod fake_io; diff --git a/crates/mq-runtime/src/testing/recording_app.rs b/crates/mq-runtime/src/testing/recording_app.rs index 5a6de078..213a8d59 100644 --- a/crates/mq-runtime/src/testing/recording_app.rs +++ b/crates/mq-runtime/src/testing/recording_app.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `RecordingApp`: an `App` that records every callback and runs test //! closures against `Cx` from inside callbacks (spec §8.1). diff --git a/crates/mq-runtime/src/testing/scripted.rs b/crates/mq-runtime/src/testing/scripted.rs index 5fd43f7a..7ecd2b21 100644 --- a/crates/mq-runtime/src/testing/scripted.rs +++ b/crates/mq-runtime/src/testing/scripted.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! `ScriptedTransport`: a `TransportOps` without xquic whose every result can //! be scripted (spec §5.1, §8.1). diff --git a/crates/mq-runtime/tests/app.rs b/crates/mq-runtime/tests/app.rs index 4a142314..5fd1a0f9 100644 --- a/crates/mq-runtime/tests/app.rs +++ b/crates/mq-runtime/tests/app.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.4: a toy `App` builds against the trait, and `Cx` records onto `ShardState`. use mq_runtime::{ diff --git a/crates/mq-runtime/tests/loop_core.rs b/crates/mq-runtime/tests/loop_core.rs index 75b7cd30..fcb38c5c 100644 --- a/crates/mq-runtime/tests/loop_core.rs +++ b/crates/mq-runtime/tests/loop_core.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.3 loop core, §5.5 one loop iteration: `LoopCore` over `FakeIo` //! (virtual time), with a `ScriptedTransport` and a `RecordingApp`. diff --git a/crates/mq-runtime/tests/relay.rs b/crates/mq-runtime/tests/relay.rs index edc6ab6e..c8c30ae3 100644 --- a/crates/mq-runtime/tests/relay.rs +++ b/crates/mq-runtime/tests/relay.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.6: the flow relay, driven by `ScriptedTransport` on the QUIC side //! and `FakeTcp` (which applies commits the way the driver does) on the TCP side. //! diff --git a/crates/mq-runtime/tests/scripted.rs b/crates/mq-runtime/tests/scripted.rs index 19c443a8..2e19e4b8 100644 --- a/crates/mq-runtime/tests/scripted.rs +++ b/crates/mq-runtime/tests/scripted.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.1, §8.1: `ScriptedTransport` scripts every `TransportOps` result. use mq_runtime::testing::{Call, ScriptedTransport}; diff --git a/crates/mq-runtime/tests/shard.rs b/crates/mq-runtime/tests/shard.rs index 384a1ac6..f0fb4b0e 100644 --- a/crates/mq-runtime/tests/shard.rs +++ b/crates/mq-runtime/tests/shard.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.2 Shard, §5.4 app interface: the shard driven by a `ScriptedTransport` //! on the QUIC side and by hand (as the driver would) on the socket side. diff --git a/crates/mq-transport-api/src/config.rs b/crates/mq-transport-api/src/config.rs index ece1731e..3994f54f 100644 --- a/crates/mq-transport-api/src/config.rs +++ b/crates/mq-transport-api/src/config.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Transport and connection configuration, stats (spec §4.2, §6.5). use std::net::SocketAddr; diff --git a/crates/mq-transport-api/src/error.rs b/crates/mq-transport-api/src/error.rs index 0d948a3f..31126221 100644 --- a/crates/mq-transport-api/src/error.rs +++ b/crates/mq-transport-api/src/error.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Error types (spec §4.2). Plain enums; this crate has no dependencies. /// Stream operation failure (spec §4.2). diff --git a/crates/mq-transport-api/src/event.rs b/crates/mq-transport-api/src/event.rs index c77c5138..62eae99c 100644 --- a/crates/mq-transport-api/src/event.rs +++ b/crates/mq-transport-api/src/event.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Events and transmit view (spec §4.2). use crate::config::ConnProto; diff --git a/crates/mq-transport-api/src/fabric.rs b/crates/mq-transport-api/src/fabric.rs index 104beb6a..14f8da1b 100644 --- a/crates/mq-transport-api/src/fabric.rs +++ b/crates/mq-transport-api/src/fabric.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! In-memory packet network between two transports: drop, delay, reorder (spec §8.1). use std::collections::BTreeMap; diff --git a/crates/mq-transport-api/src/ids.rs b/crates/mq-transport-api/src/ids.rs index 5cb8c5ee..25688cb9 100644 --- a/crates/mq-transport-api/src/ids.rs +++ b/crates/mq-transport-api/src/ids.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Generational facade ids (spec §4.1, §4.8). use std::num::NonZeroU32; diff --git a/crates/mq-transport-api/src/lib.rs b/crates/mq-transport-api/src/lib.rs index 056efb2b..f63558f9 100644 --- a/crates/mq-transport-api/src/lib.rs +++ b/crates/mq-transport-api/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The sans-I/O transport contract seen by the shard and apps (spec §4, §5.1). #![forbid(unsafe_code)] diff --git a/crates/mq-transport-api/src/ops.rs b/crates/mq-transport-api/src/ops.rs index 63c599d8..a1ca1183 100644 --- a/crates/mq-transport-api/src/ops.rs +++ b/crates/mq-transport-api/src/ops.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The transport seam (spec §5.1): §4.2 minus `new`/`close`. //! Object-safe, so `Cx` can hold `&mut dyn TransportOps`. diff --git a/crates/mq-transport-api/src/ringbuf.rs b/crates/mq-transport-api/src/ringbuf.rs index 8af993c5..b160c1c5 100644 --- a/crates/mq-transport-api/src/ringbuf.rs +++ b/crates/mq-transport-api/src/ringbuf.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! The relay's byte buffer (SP0/SP1 spec §5.6), also the transport's datagram receive ring //! (SP2 spec §3.2). //! diff --git a/crates/mq-transport-api/src/time.rs b/crates/mq-transport-api/src/time.rs index d89784c4..c388e0b9 100644 --- a/crates/mq-transport-api/src/time.rs +++ b/crates/mq-transport-api/src/time.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Caller-supplied monotonic time (spec §4.1, §4.3). use std::ops::{Add, Sub}; diff --git a/crates/mq-transport-api/tests/fabric.rs b/crates/mq-transport-api/tests/fabric.rs index ef699589..a61e5602 100644 --- a/crates/mq-transport-api/tests/fabric.rs +++ b/crates/mq-transport-api/tests/fabric.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! In-memory fabric tests (spec §8.1). use mq_transport_api::Time; use mq_transport_api::fabric::{Fabric, Packet, Rule}; diff --git a/crates/mq-transport-api/tests/ids.rs b/crates/mq-transport-api/tests/ids.rs index 9b42e1a8..f2aada29 100644 --- a/crates/mq-transport-api/tests/ids.rs +++ b/crates/mq-transport-api/tests/ids.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors use mq_transport_api::{ConnId, SlotId, StreamId, Time}; use std::time::Duration; diff --git a/crates/mq-transport-api/tests/ops.rs b/crates/mq-transport-api/tests/ops.rs index e6c67425..6ae8c498 100644 --- a/crates/mq-transport-api/tests/ops.rs +++ b/crates/mq-transport-api/tests/ops.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors use mq_transport_api::{ CloseReason, ConnId, ErrType, Event, PathId, SlotId, StreamInfo, StreamKind, TransportOps, TxKey, diff --git a/crates/mq-transport/src/clock.rs b/crates/mq-transport/src/clock.rs index d68de42c..e2ada1bf 100644 --- a/crates/mq-transport/src/clock.rs +++ b/crates/mq-transport/src/clock.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §4.3 and §4.8 use crate::{Error, Inner}; use core::{cell::Cell, ptr}; diff --git a/crates/mq-transport/src/conn.rs b/crates/mq-transport/src/conn.rs index f2aa2dd6..c0cb2c80 100644 --- a/crates/mq-transport/src/conn.rs +++ b/crates/mq-transport/src/conn.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Connections: connect, close, stats, paths, packet input, `drive` (spec §4.2–§4.4, §4.7). use crate::engine::conn_settings; diff --git a/crates/mq-transport/src/datagram.rs b/crates/mq-transport/src/datagram.rs index 01067b40..c8cea0c9 100644 --- a/crates/mq-transport/src/datagram.rs +++ b/crates/mq-transport/src/datagram.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! QUIC DATAGRAMs: send, mss and the per-connection receive ring (SP2 spec §3.1–§3.2). use crate::slots::ConnSlot; diff --git a/crates/mq-transport/src/engine.rs b/crates/mq-transport/src/engine.rs index 022fb9d0..85f0cb37 100644 --- a/crates/mq-transport/src/engine.rs +++ b/crates/mq-transport/src/engine.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Engine creation, connection settings, logs and qlog (spec §4.9). use crate::ffi::{app_proto_callbacks, guard, transport_callbacks}; diff --git a/crates/mq-transport/src/events.rs b/crates/mq-transport/src/events.rs index 20bd44a3..8da94991 100644 --- a/crates/mq-transport/src/events.rs +++ b/crates/mq-transport/src/events.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Coalescing event queue (spec §4.2 "Event coalescing"). //! //! `StreamReadable`/`StreamWritable`/`MpReady`/`DatagramReadable` are diff --git a/crates/mq-transport/src/ffi/mod.rs b/crates/mq-transport/src/ffi/mod.rs index b46e43e7..60e8f2e9 100644 --- a/crates/mq-transport/src/ffi/mod.rs +++ b/crates/mq-transport/src/ffi/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Callback tables (spec §4.8, §4.9). Every xquic user-data slot holds a `SlotId` or 0 ("none"). //! The bodies that touch transport state live in `trampolines`. diff --git a/crates/mq-transport/src/ffi/trampolines.rs b/crates/mq-transport/src/ffi/trampolines.rs index 88fb2e22..8de77a29 100644 --- a/crates/mq-transport/src/ffi/trampolines.rs +++ b/crates/mq-transport/src/ffi/trampolines.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Transport and ALPN callbacks (spec §4.4, §4.7, §4.8; plan Task 4.6 table). //! //! Every trampoline runs inside `guard` (a panic aborts) and reaches `Inner` only through diff --git a/crates/mq-transport/src/lib.rs b/crates/mq-transport/src/lib.rs index c0b6049f..4a0429f9 100644 --- a/crates/mq-transport/src/lib.rs +++ b/crates/mq-transport/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4 //! //! Rules (spec §4.8): methods copy `inner.engine` before calling xquic and hold no `&`/`&mut` into diff --git a/crates/mq-transport/src/slots.rs b/crates/mq-transport/src/slots.rs index 328fbeed..a387fdfc 100644 --- a/crates/mq-transport/src/slots.rs +++ b/crates/mq-transport/src/slots.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Generational slot tables (spec §4.8): ids handed across the FFI boundary are //! `(index, generation)`; a stale id never resolves to a reused slot. diff --git a/crates/mq-transport/src/stream.rs b/crates/mq-transport/src/stream.rs index e3dfe4ea..988d5390 100644 --- a/crates/mq-transport/src/stream.rs +++ b/crates/mq-transport/src/stream.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Streams: open, send, recv, reset, info, and the abandoned drain (spec §4.2, §4.8). use crate::ffi::trampolines::{STREAM_CEILING, ud_of}; diff --git a/crates/mq-transport/src/txq.rs b/crates/mq-transport/src/txq.rs index 7c6b7843..d3c8dd32 100644 --- a/crates/mq-transport/src/txq.rs +++ b/crates/mq-transport/src/txq.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors use std::collections::{HashMap, VecDeque}; use std::net::SocketAddr; diff --git a/crates/mq-transport/tests/common/initial.rs b/crates/mq-transport/tests/common/initial.rs index 9678f3ff..6df26c7c 100644 --- a/crates/mq-transport/tests/common/initial.rs +++ b/crates/mq-transport/tests/common/initial.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Hand-built QUIC v1 client Initial packets (RFC 9001 §5) carrying a ClientHello that never //! completes: no real client sends one, so the provisional-connection test builds them. //! Crypto comes from the BoringSSL that xquic-sys links statically. diff --git a/crates/mq-transport/tests/common/lockstep.rs b/crates/mq-transport/tests/common/lockstep.rs index e52cebb1..67d90540 100644 --- a/crates/mq-transport/tests/common/lockstep.rs +++ b/crates/mq-transport/tests/common/lockstep.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Lockstep fabric harness (spec §8.1 "Fabric"): one `Transport` per thread (spec §4.6). The //! test sends one command at a time and waits for the reply, so only one side runs at a time. //! Each command carries `now`; there is no shared clock. Path k sends from `local_addrs[k]` diff --git a/crates/mq-transport/tests/common/mod.rs b/crates/mq-transport/tests/common/mod.rs index f01c6754..8bd9a297 100644 --- a/crates/mq-transport/tests/common/mod.rs +++ b/crates/mq-transport/tests/common/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // Shared by several test binaries; each uses a subset. #![allow(dead_code)] pub mod initial; diff --git a/crates/mq-transport/tests/common/pair.rs b/crates/mq-transport/tests/common/pair.rs index 9e711c8e..27091662 100644 --- a/crates/mq-transport/tests/common/pair.rs +++ b/crates/mq-transport/tests/common/pair.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! A connected client/server pair over the lockstep harness, with virtual-time stepping and //! an event log per side. diff --git a/crates/mq-transport/tests/common/xfer.rs b/crates/mq-transport/tests/common/xfer.rs index b90d76f2..3132c2fe 100644 --- a/crates/mq-transport/tests/common/xfer.rs +++ b/crates/mq-transport/tests/common/xfer.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! A one-way client→server stream transfer stepped from `Pair::pump_until`. use super::pair::{Pair, new_streams, read_all, send}; diff --git a/crates/mq-transport/tests/engine.rs b/crates/mq-transport/tests/engine.rs index 8785dd5c..5fb728ee 100644 --- a/crates/mq-transport/tests/engine.rs +++ b/crates/mq-transport/tests/engine.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.6, §4.9: engine creation, threading rule, destroy-once, qlog. use mq_transport::{Error, Transport}; use mq_transport_api::{CongestionControl, Role, Scheduler, Time, TransportConfig}; diff --git a/crates/mq-transport/tests/fabric_abandoned.rs b/crates/mq-transport/tests/fabric_abandoned.rs index 63a6a035..ac4afa3b 100644 --- a/crates/mq-transport/tests/fabric_abandoned.rs +++ b/crates/mq-transport/tests/fabric_abandoned.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.8 "Abandoned streams are drained by the transport": resets from either side, //! before and after the peer's FIN, release every slot on both sides. mod common; diff --git a/crates/mq-transport/tests/fabric_basic.rs b/crates/mq-transport/tests/fabric_basic.rs index 7f327b8e..4d181988 100644 --- a/crates/mq-transport/tests/fabric_basic.rs +++ b/crates/mq-transport/tests/fabric_basic.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.2, §4.8: a client and a server complete the handshake over the lockstep harness. mod common; diff --git a/crates/mq-transport/tests/fabric_conn_cap.rs b/crates/mq-transport/tests/fabric_conn_cap.rs index c6485623..3bd0769c 100644 --- a/crates/mq-transport/tests/fabric_conn_cap.rs +++ b/crates/mq-transport/tests/fabric_conn_cap.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Spec §8.3, §4.7: with `max_conns = 1` a second client is refused //! in `server_accept`; after the first connection is destroyed a third client connects; //! `conn_count()` follows. diff --git a/crates/mq-transport/tests/fabric_datagram.rs b/crates/mq-transport/tests/fabric_datagram.rs index 912eac5c..b5241e3a 100644 --- a/crates/mq-transport/tests/fabric_datagram.rs +++ b/crates/mq-transport/tests/fabric_datagram.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SP2 spec §3.1–§3.2: the datagram lane over real xquic — send, the receive ring, //! `DatagramReadable` coalescing, drop counting and the multipath-aware mss. //! diff --git a/crates/mq-transport/tests/fabric_h3raw.rs b/crates/mq-transport/tests/fabric_h3raw.rs index 0662b113..c272fc31 100644 --- a/crates/mq-transport/tests/fabric_h3raw.rs +++ b/crates/mq-transport/tests/fabric_h3raw.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! adoption spec §3 "Raw-H3 backend": ALPN `h3` over raw xquic streams. mod common; diff --git a/crates/mq-transport/tests/fabric_keepalive.rs b/crates/mq-transport/tests/fabric_keepalive.rs index 2d59ec38..5a797b37 100644 --- a/crates/mq-transport/tests/fabric_keepalive.rs +++ b/crates/mq-transport/tests/fabric_keepalive.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §8.4 (end): keepalive in virtual time — an idle tunnel with keepalive on survives //! past its idle timeout, and a peer that stops answering is detected and the connection //! closes. diff --git a/crates/mq-transport/tests/fabric_path_blackhole.rs b/crates/mq-transport/tests/fabric_path_blackhole.rs index 78657136..d86a22dd 100644 --- a/crates/mq-transport/tests/fabric_path_blackhole.rs +++ b/crates/mq-transport/tests/fabric_path_blackhole.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! One path of two black-holed in both directions while the other keeps carrying traffic: //! xquic closes the dead path after the idle timeout (its path idle timer is the //! connection's), raises `PathRemoved`, the connection lives on, and a path added afresh diff --git a/crates/mq-transport/tests/fabric_probe.rs b/crates/mq-transport/tests/fabric_probe.rs index dbdeef60..39a4d0e6 100644 --- a/crates/mq-transport/tests/fabric_probe.rs +++ b/crates/mq-transport/tests/fabric_probe.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.2: a zero-capacity `stream_recv` is a probe — it reports a reset and otherwise //! consumes nothing. mod common; diff --git a/crates/mq-transport/tests/fabric_provisional.rs b/crates/mq-transport/tests/fabric_provisional.rs index 03f8e158..48762d5f 100644 --- a/crates/mq-transport/tests/fabric_provisional.rs +++ b/crates/mq-transport/tests/fabric_provisional.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.7, §8.4 "Incomplete ClientHello flood": provisional connections are refused at //! the provisional cap; closing starts exactly 10 s after acceptance (the transport's //! deadline, not xquic's re-armed idle timer); every slot is released exactly once after diff --git a/crates/mq-transport/tests/fabric_qlog.rs b/crates/mq-transport/tests/fabric_qlog.rs index 013aa8da..8566e5bc 100644 --- a/crates/mq-transport/tests/fabric_qlog.rs +++ b/crates/mq-transport/tests/fabric_qlog.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Spec §8.3, §4.9: a handshake plus an unblocked download; //! `/client.qlog` holds frame events and no DATA_BLOCKED / STREAM_DATA_BLOCKED frames. mod common; diff --git a/crates/mq-transport/tests/fabric_sparse_ids.rs b/crates/mq-transport/tests/fabric_sparse_ids.rs index 214df302..ea130736 100644 --- a/crates/mq-transport/tests/fabric_sparse_ids.rs +++ b/crates/mq-transport/tests/fabric_sparse_ids.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §7, §8.4: sparse stream ids. A peer stream id makes xquic hold an entry for every //! lower id it skipped; the fork's implicit-stream cap (`max_implicit_streams`, 16384 live //! entries) closes the connection with `TRA_STREAM_LIMIT_ERROR` before it would grow past it. diff --git a/crates/mq-transport/tests/fabric_stale.rs b/crates/mq-transport/tests/fabric_stale.rs index 4b5800dc..8d0147b2 100644 --- a/crates/mq-transport/tests/fabric_stale.rs +++ b/crates/mq-transport/tests/fabric_stale.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.2, §4.8: a released id is stale — every call on it fails with `Stale` or is a //! no-op, and it never resolves to the slot's next occupant. mod common; diff --git a/crates/mq-transport/tests/fabric_stream_ceiling.rs b/crates/mq-transport/tests/fabric_stream_ceiling.rs index e66b4d4d..35cbe204 100644 --- a/crates/mq-transport/tests/fabric_stream_ceiling.rs +++ b/crates/mq-transport/tests/fabric_stream_ceiling.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.2, §4.8: at most 8192 stream slots per connection. A peer stream over the //! ceiling gets no slot and no event, and closes the connection with application error //! `0x1001`; the client's own `open_stream` refuses at the ceiling. diff --git a/crates/mq-transport/tests/fabric_stream_echo.rs b/crates/mq-transport/tests/fabric_stream_echo.rs index 7f2047ee..9e679f62 100644 --- a/crates/mq-transport/tests/fabric_stream_echo.rs +++ b/crates/mq-transport/tests/fabric_stream_echo.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.2 stream semantics over the lockstep fabric. mod common; diff --git a/crates/mq-transport/tests/fabric_timer.rs b/crates/mq-transport/tests/fabric_timer.rs index a78e68c8..4a59ea65 100644 --- a/crates/mq-transport/tests/fabric_timer.rs +++ b/crates/mq-transport/tests/fabric_timer.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.3, §8.4 "Timer hygiene": a deadline set during `connect` is visible at once; after //! `drive` on an idle connection `next_timeout()` is not in the past. mod common; diff --git a/crates/mq-transport/tests/fabric_transport_fabric.rs b/crates/mq-transport/tests/fabric_transport_fabric.rs index 7410b421..6de2c3f1 100644 --- a/crates/mq-transport/tests/fabric_transport_fabric.rs +++ b/crates/mq-transport/tests/fabric_transport_fabric.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Spec §8.3: a full handshake and a stream echo with FIN both ways, entirely in memory; //! per-connection `MpReady` with two connections on one client transport, one of which then //! closes. There is no mp-ready subscriber table; `MpReady` carries the connection id. diff --git a/crates/mq-transport/tests/fabric_two_blocked_paths.rs b/crates/mq-transport/tests/fabric_two_blocked_paths.rs index c65c4081..9b0492cc 100644 --- a/crates/mq-transport/tests/fabric_two_blocked_paths.rs +++ b/crates/mq-transport/tests/fabric_two_blocked_paths.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.4, §8.4 "Two paths blocked, one drains": `resume_pending` becomes true at once, //! without any timer. mod common; diff --git a/crates/mq-transport/tests/fabric_two_paths.rs b/crates/mq-transport/tests/fabric_two_paths.rs index 172322ad..b088a93c 100644 --- a/crates/mq-transport/tests/fabric_two_paths.rs +++ b/crates/mq-transport/tests/fabric_two_paths.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Two paths and their per-path addresses (spec §8.3), plus spec §4.2 "MpReady may repeat". mod common; diff --git a/crates/mq-transport/tests/fabric_txq.rs b/crates/mq-transport/tests/fabric_txq.rs index 1b026192..fb92cde9 100644 --- a/crates/mq-transport/tests/fabric_txq.rs +++ b/crates/mq-transport/tests/fabric_txq.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §4.4, §8.4 "Transmit queue full, then drained". mod common; diff --git a/crates/mq-wire/fuzz/fuzz_targets/auth_req.rs b/crates/mq-wire/fuzz/fuzz_targets/auth_req.rs index 98fd1609..70619353 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/auth_req.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/auth_req.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::AuthReq; diff --git a/crates/mq-wire/fuzz/fuzz_targets/auth_resp.rs b/crates/mq-wire/fuzz/fuzz_targets/auth_resp.rs index 3b14e585..f68a827b 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/auth_resp.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/auth_resp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::AuthResp; diff --git a/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_req.rs b/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_req.rs index 5d0ec6fa..64b29ce4 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_req.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_req.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::ConnectTcpReq; diff --git a/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_resp.rs b/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_resp.rs index ea6fccab..09319350 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_resp.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/connect_tcp_resp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::ConnectTcpResp; diff --git a/crates/mq-wire/fuzz/fuzz_targets/udp_msg_hdr.rs b/crates/mq-wire/fuzz/fuzz_targets/udp_msg_hdr.rs index 6e48dc6f..40dc7323 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/udp_msg_hdr.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/udp_msg_hdr.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::udp_msg::{UDP_MSG_HDR, UdpMsgHdr}; diff --git a/crates/mq-wire/fuzz/fuzz_targets/udp_session_open.rs b/crates/mq-wire/fuzz/fuzz_targets/udp_session_open.rs index 9d82c253..da9b6e5d 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/udp_session_open.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/udp_session_open.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::UdpSessionOpen; diff --git a/crates/mq-wire/fuzz/fuzz_targets/udp_session_resp.rs b/crates/mq-wire/fuzz/fuzz_targets/udp_session_resp.rs index fd66c745..ed4f3429 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/udp_session_resp.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/udp_session_resp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::frames::UdpSessionResp; diff --git a/crates/mq-wire/fuzz/fuzz_targets/varint.rs b/crates/mq-wire/fuzz/fuzz_targets/varint.rs index bd344df6..49b288ef 100644 --- a/crates/mq-wire/fuzz/fuzz_targets/varint.rs +++ b/crates/mq-wire/fuzz/fuzz_targets/varint.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #![no_main] use libfuzzer_sys::fuzz_target; use mq_wire::varint; diff --git a/crates/mq-wire/src/frames.rs b/crates/mq-wire/src/frames.rs index e3e13968..b8e6434f 100644 --- a/crates/mq-wire/src/frames.rs +++ b/crates/mq-wire/src/frames.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.3 //! AUTH, CONNECT_TCP and UDP_SESSION control frames. All fixed ints are //! big-endian; a `string` is a varint length + raw bytes. Decoders are strict diff --git a/crates/mq-wire/src/lib.rs b/crates/mq-wire/src/lib.rs index 4a666f08..39adb4f1 100644 --- a/crates/mq-wire/src/lib.rs +++ b/crates/mq-wire/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §2.3 #![no_std] #![forbid(unsafe_code)] diff --git a/crates/mq-wire/src/udp_msg.rs b/crates/mq-wire/src/udp_msg.rs index 9e52b448..672757e6 100644 --- a/crates/mq-wire/src/udp_msg.rs +++ b/crates/mq-wire/src/udp_msg.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.2 //! The fixed 9-byte header that prefixes every UDP payload carried in a QUIC //! DATAGRAM frame (all big-endian) and the pure fragment split. Nothing here diff --git a/crates/mq-wire/src/varint.rs b/crates/mq-wire/src/varint.rs index a7f9a396..2c173b3d 100644 --- a/crates/mq-wire/src/varint.rs +++ b/crates/mq-wire/src/varint.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.3 pub const MAX: u64 = 0x3FFF_FFFF_FFFF_FFFF; diff --git a/crates/mq-wire/tests/c_golden.rs b/crates/mq-wire/tests/c_golden.rs index 77711af0..b014355e 100644 --- a/crates/mq-wire/tests/c_golden.rs +++ b/crates/mq-wire/tests/c_golden.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Frozen at SP5 from C/Rust differential comparisons on cd41d699. //! Every full row passed field, consumed-length and re-encode parity against C. //! Outside C's representable domain only acceptance is frozen (as in the old test). diff --git a/crates/mq-wire/tests/frames.rs b/crates/mq-wire/tests/frames.rs index 6a751f08..6b6a75f6 100644 --- a/crates/mq-wire/tests/frames.rs +++ b/crates/mq-wire/tests/frames.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.3 use mq_wire::frames::*; use mq_wire::varint; diff --git a/crates/mq-wire/tests/udp_msg.rs b/crates/mq-wire/tests/udp_msg.rs index ca49dc33..ab99e439 100644 --- a/crates/mq-wire/tests/udp_msg.rs +++ b/crates/mq-wire/tests/udp_msg.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.2 use mq_wire::udp_msg::*; diff --git a/crates/mq-wire/tests/varint.rs b/crates/mq-wire/tests/varint.rs index 95469b40..67f4f6ec 100644 --- a/crates/mq-wire/tests/varint.rs +++ b/crates/mq-wire/tests/varint.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // spec §2.3 use mq_wire::varint::{Error, MAX, decode, encode, len}; use proptest::prelude::*; diff --git a/crates/mqproxy/examples/udp_echo.rs b/crates/mqproxy/examples/udp_echo.rs index a6a38497..1ecf0dbb 100644 --- a/crates/mqproxy/examples/udp_echo.rs +++ b/crates/mqproxy/examples/udp_echo.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! UDP echo peer for e2e_udp.sh. use clap::Parser; use std::{ diff --git a/crates/mqproxy/examples/udpsocks.rs b/crates/mqproxy/examples/udpsocks.rs index 1b6963ff..09f7ed58 100644 --- a/crates/mqproxy/examples/udpsocks.rs +++ b/crates/mqproxy/examples/udpsocks.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! SOCKS5 UDP echo client and single-peer benchmark forwarder. use clap::Parser; use mq_proxy::udp::socks5udp::{self, Dst}; diff --git a/crates/mqproxy/src/cli.rs b/crates/mqproxy/src/cli.rs index cd85aecf..c4d39f0a 100644 --- a/crates/mqproxy/src/cli.rs +++ b/crates/mqproxy/src/cli.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4: the command line. //! `parse` turns argv into a fully resolved `Resolved` or an `Exit`. diff --git a/crates/mqproxy/src/config.rs b/crates/mqproxy/src/config.rs index ae830879..d0e4a57b 100644 --- a/crates/mqproxy/src/config.rs +++ b/crates/mqproxy/src/config.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 "Config file": the typed values an INI file sets. `cli` layers the command line on top (defaults < file < CLI). Text //! values (`CC`, `Scheduler`, addresses, `[Ingress] Mode`, `Path`) are kept as //! text and validated by `cli` at startup, exactly like the flag values. diff --git a/crates/mqproxy/src/ini.rs b/crates/mqproxy/src/ini.rs index de72140b..c0976542 100644 --- a/crates/mqproxy/src/ini.rs +++ b/crates/mqproxy/src/ini.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4: the INI scanner — `[Section]` headers, //! `Key = Value` lines, `#`/`;` comments, whitespace trimmed. Names are //! returned as written (the caller compares them case-insensitively). diff --git a/crates/mqproxy/src/lib.rs b/crates/mqproxy/src/lib.rs index 09325a33..db1620f2 100644 --- a/crates/mqproxy/src/lib.rs +++ b/crates/mqproxy/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 #![forbid(unsafe_code)] diff --git a/crates/mqproxy/src/logger.rs b/crates/mqproxy/src/logger.rs index 5bf03ea8..c021d096 100644 --- a/crates/mqproxy/src/logger.rs +++ b/crates/mqproxy/src/logger.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.5: `[LEVEL] msg\n` on stderr, no timestamp, level fixed at INFO. use log::{Level, LevelFilter, Log, Metadata, Record}; diff --git a/crates/mqproxy/src/main.rs b/crates/mqproxy/src/main.rs index 1b025dcc..c02aee26 100644 --- a/crates/mqproxy/src/main.rs +++ b/crates/mqproxy/src/main.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 #![forbid(unsafe_code)] diff --git a/crates/mqproxy/src/run.rs b/crates/mqproxy/src/run.rs index 58530c62..859c2dd4 100644 --- a/crates/mqproxy/src/run.rs +++ b/crates/mqproxy/src/run.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §5.3 "Setup", §6.4, §6.6: `run_server` / `run_client` build the //! transport, the driver and the shard, run the loop and return the exit status (1 for cert/bind/qlog/origin-TLS failures). diff --git a/crates/mqproxy/src/setup_redirect.rs b/crates/mqproxy/src/setup_redirect.rs index 966affae..98b3e7b0 100644 --- a/crates/mqproxy/src/setup_redirect.rs +++ b/crates/mqproxy/src/setup_redirect.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 `--setup-redirect`: the nft / ip-rule commands, table //! `mqproxy`. Every invocation goes through `run`: a direct exec with separate //! argv elements, no shell, and the child's `PATH` pinned to diff --git a/crates/mqproxy/tests/cli.rs b/crates/mqproxy/tests/cli.rs index bb9fb7b5..cf8e1a2e 100644 --- a/crates/mqproxy/tests/cli.rs +++ b/crates/mqproxy/tests/cli.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4: the CLI flag table, in process through `cli::parse`; only the last //! three tests spawn the binary. diff --git a/crates/mqproxy/tests/common/mod.rs b/crates/mqproxy/tests/common/mod.rs index 3d9b0092..2e601f8b 100644 --- a/crates/mqproxy/tests/common/mod.rs +++ b/crates/mqproxy/tests/common/mod.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Running-binary helpers: spawn `mqproxy`, watch stderr with a deadline, SIGTERM. #![allow(dead_code)] // each test binary uses a subset diff --git a/crates/mqproxy/tests/config.rs b/crates/mqproxy/tests/config.rs index c5a7ea05..f5720156 100644 --- a/crates/mqproxy/tests/config.rs +++ b/crates/mqproxy/tests/config.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 "Config file": the INI loader, in process through `cli::parse` //! with `--config `. Every row of the SP1 flag table gets //! its INI equivalent. diff --git a/crates/mqproxy/tests/smoke.rs b/crates/mqproxy/tests/smoke.rs index eece0f2d..391e8594 100644 --- a/crates/mqproxy/tests/smoke.rs +++ b/crates/mqproxy/tests/smoke.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §6.4 smoke: server + client binaries on loopback; an in-test SOCKS5 //! client fetches 1 MiB from an in-test origin through the client; bytes equal; //! both processes exit 0 on SIGTERM. diff --git a/crates/xquic-sys/build.rs b/crates/xquic-sys/build.rs index 4002353e..b7071ce9 100644 --- a/crates/xquic-sys/build.rs +++ b/crates/xquic-sys/build.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors // build.rs — spec §2.1: static build of xquic and its nested BoringSSL. use std::{ env, fs, diff --git a/crates/xquic-sys/csrc/sizes.c b/crates/xquic-sys/csrc/sizes.c index 4a66457a..aaf2e8bc 100644 --- a/crates/xquic-sys/csrc/sizes.c +++ b/crates/xquic-sys/csrc/sizes.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors /* sizeof exports for tests/layout.rs: compares C layouts with the bindgen types. */ #include #include diff --git a/crates/xquic-sys/src/bindings.rs b/crates/xquic-sys/src/bindings.rs index 4c287e77..c588b4bb 100644 --- a/crates/xquic-sys/src/bindings.rs +++ b/crates/xquic-sys/src/bindings.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors use libc::{sockaddr, socklen_t, iovec}; pub const XQC_OK: u32 = 0; diff --git a/crates/xquic-sys/src/lib.rs b/crates/xquic-sys/src/lib.rs index e32cd35a..78517e27 100644 --- a/crates/xquic-sys/src/lib.rs +++ b/crates/xquic-sys/src/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! spec §2.1 #![allow( non_camel_case_types, diff --git a/crates/xquic-sys/tests/engine.rs b/crates/xquic-sys/tests/engine.rs index 1749c508..3fd51de7 100644 --- a/crates/xquic-sys/tests/engine.rs +++ b/crates/xquic-sys/tests/engine.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Link smoke test: the statically built xquic + BoringSSL create and destroy a client engine. use core::ffi::{c_char, c_uchar, c_void}; use core::ptr; diff --git a/crates/xquic-sys/tests/layout.rs b/crates/xquic-sys/tests/layout.rs index ad221427..429c855f 100644 --- a/crates/xquic-sys/tests/layout.rs +++ b/crates/xquic-sys/tests/layout.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors //! Cross-safe layout check: bindgen struct sizes against the C compiler's `sizeof`. use core::mem::size_of; use xquic_sys::*; diff --git a/crates/xquic-sys/wrapper.h b/crates/xquic-sys/wrapper.h index d14b1a02..cde6596b 100644 --- a/crates/xquic-sys/wrapper.h +++ b/crates/xquic-sys/wrapper.h @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2026 mp0rta and mqproxy contributors #include #include #include diff --git a/packaging/build.py b/packaging/build.py index 2654efab..2dfdac8c 100644 --- a/packaging/build.py +++ b/packaging/build.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Build native Rust .deb and tar artifacts; run on each target architecture.""" import json import os diff --git a/scripts/build-xquic.sh b/scripts/build-xquic.sh index 0459ceb8..94d2dbf4 100755 --- a/scripts/build-xquic.sh +++ b/scripts/build-xquic.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Build the pinned xquic fork for its standalone CUnit suite and diagnostics. # The Rust application builds its own static xquic/BoringSSL through Cargo. # Requires cmake, make, C/C++, Go and git. Usage: scripts/build-xquic.sh [--clean] diff --git a/scripts/ci_benchmarks/ci_bench_env.sh b/scripts/ci_benchmarks/ci_bench_env.sh index b2971e75..236c9add 100755 --- a/scripts/ci_benchmarks/ci_bench_env.sh +++ b/scripts/ci_benchmarks/ci_bench_env.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_env.sh — Shared CI benchmark environment for mqproxy. # # Source this file from CI benchmark scripts: diff --git a/scripts/ci_benchmarks/ci_bench_gateway.sh b/scripts/ci_benchmarks/ci_bench_gateway.sh index 733e1a8f..f21094c5 100755 --- a/scripts/ci_benchmarks/ci_bench_gateway.sh +++ b/scripts/ci_benchmarks/ci_bench_gateway.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Rust HTTP gateway benchmark: download/upload x P={1,4,16}, unshaped two paths. # Each cell must complete REPEAT positive-throughput runs with no failed transfers. # Reports throughput and bits per CPU-second. C comparison ended with SP5. diff --git a/scripts/ci_benchmarks/ci_bench_idle.sh b/scripts/ci_benchmarks/ci_bench_idle.sh index 68fa8bca..c5b94f0e 100755 --- a/scripts/ci_benchmarks/ci_bench_idle.sh +++ b/scripts/ci_benchmarks/ci_bench_idle.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_idle.sh — Idle CPU benchmark. # # Brings the two-path tunnel up (one short iperf3 transfer through SOCKS5 so diff --git a/scripts/ci_benchmarks/ci_bench_mitm.sh b/scripts/ci_benchmarks/ci_bench_mitm.sh index 8158e16c..829adba9 100755 --- a/scripts/ci_benchmarks/ci_bench_mitm.sh +++ b/scripts/ci_benchmarks/ci_bench_mitm.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_mitm.sh — Per-commit MITM H2 throughput benchmark; Rust vs C when # MQPROXY_BIN_RUST is set (SP4 spec §11.5). # diff --git a/scripts/ci_benchmarks/ci_bench_multi_stream.sh b/scripts/ci_benchmarks/ci_bench_multi_stream.sh index c1b518df..9f5f3fb3 100755 --- a/scripts/ci_benchmarks/ci_bench_multi_stream.sh +++ b/scripts/ci_benchmarks/ci_bench_multi_stream.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_multi_stream.sh — Weekly multi-stream sweep benchmark. # # Sources ci_bench_env.sh for netns topology. diff --git a/scripts/ci_benchmarks/ci_bench_tcp_proxy.sh b/scripts/ci_benchmarks/ci_bench_tcp_proxy.sh index 76276d0d..8085cb75 100755 --- a/scripts/ci_benchmarks/ci_bench_tcp_proxy.sh +++ b/scripts/ci_benchmarks/ci_bench_tcp_proxy.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_tcp_proxy.sh — Per-commit TCP proxy throughput benchmark. # # Measures TCP proxy overhead and multipath aggregation: diff --git a/scripts/ci_benchmarks/ci_bench_unshaped.sh b/scripts/ci_benchmarks/ci_bench_unshaped.sh index fb95c39c..3e05b30b 100755 --- a/scripts/ci_benchmarks/ci_bench_unshaped.sh +++ b/scripts/ci_benchmarks/ci_bench_unshaped.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # ci_bench_unshaped.sh — Unshaped throughput-per-CPU benchmark. # # Two paths, NO netem: the proxy itself is the bottleneck, so the figure of diff --git a/scripts/ci_benchmarks/plot_single_tcp.py b/scripts/ci_benchmarks/plot_single_tcp.py index a9ffe418..3ba9d132 100755 --- a/scripts/ci_benchmarks/plot_single_tcp.py +++ b/scripts/ci_benchmarks/plot_single_tcp.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Plot single-TCP aggregation bench CSV → 2 grouped-bar PNGs. Usage: plot_single_tcp.py diff --git a/scripts/ci_benchmarks/plot_single_tcp_simple.py b/scripts/ci_benchmarks/plot_single_tcp_simple.py index bee4f42b..15f38a26 100644 --- a/scripts/ci_benchmarks/plot_single_tcp_simple.py +++ b/scripts/ci_benchmarks/plot_single_tcp_simple.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Plot a SIMPLIFIED single-TCP aggregation figure for the README. Unlike plot_single_tcp.py (the full 6-variant report figure), this renders just diff --git a/scripts/ci_benchmarks/test_gateway_summary.py b/scripts/ci_benchmarks/test_gateway_summary.py index cfacaa10..1dbf4d92 100644 --- a/scripts/ci_benchmarks/test_gateway_summary.py +++ b/scripts/ci_benchmarks/test_gateway_summary.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Exercise the benchmark's report gate without root, network or a running proxy.""" from pathlib import Path import subprocess diff --git a/scripts/ci_publish/publish_to_r2.sh b/scripts/ci_publish/publish_to_r2.sh index 9ce5806d..c9831847 100755 --- a/scripts/ci_publish/publish_to_r2.sh +++ b/scripts/ci_publish/publish_to_r2.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Publish ci_bench_results/*.json to Cloudflare R2. # # Usage: publish_to_r2.sh diff --git a/scripts/ci_publish/update_perf_index.py b/scripts/ci_publish/update_perf_index.py index d9f30a31..18e2d7d2 100644 --- a/scripts/ci_publish/update_perf_index.py +++ b/scripts/ci_publish/update_perf_index.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Read-modify-write the perf-data index.json on R2. Adds a new entry for newly produced JSON files, caps history to top 100 entries, diff --git a/scripts/rust-asan.sh b/scripts/rust-asan.sh index 1d8c3b72..a7926b22 100755 --- a/scripts/rust-asan.sh +++ b/scripts/rust-asan.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Run the Rust tests under AddressSanitizer. # clang: the C side (xquic + BoringSSL) must link the same ASan runtime as Rust. # rust-src: -Zbuild-std rebuilds std with ASan (needs the nightly rust-src component). diff --git a/scripts/update-xquic-bindings.sh b/scripts/update-xquic-bindings.sh index ee13ab04..70ec348e 100755 --- a/scripts/update-xquic-bindings.sh +++ b/scripts/update-xquic-bindings.sh @@ -11,5 +11,7 @@ bindgen crates/xquic-sys/wrapper.h -o crates/xquic-sys/src/bindings.rs \ --allowlist-function 'xqc_.*' --allowlist-type 'xqc_.*' \ --allowlist-var 'XQC_.*' --allowlist-var 'xqc_.*' \ --blocklist-type 'sockaddr|socklen_t|iovec' \ + --raw-line '// SPDX-License-Identifier: Apache-2.0' \ + --raw-line '// Copyright (c) 2026 mp0rta and mqproxy contributors' \ --raw-line 'use libc::{sockaddr, socklen_t, iovec};' \ -- -I third_party/xquic/include diff --git a/tests/certs/generate-mitm.sh b/tests/certs/generate-mitm.sh index 3fddb587..7d8d7387 100644 --- a/tests/certs/generate-mitm.sh +++ b/tests/certs/generate-mitm.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Disposable test CA; never install it into a machine's trust store. set -euo pipefail cd "$(dirname "$0")" diff --git a/tests/certs/rust-mitm/gen.sh b/tests/certs/rust-mitm/gen.sh index b37c2ebc..b258273c 100755 --- a/tests/certs/rust-mitm/gen.sh +++ b/tests/certs/rust-mitm/gen.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Test-only CA fixtures for crates/mq-proxy/src/client/mitm/ca.rs (SP4 spec §7.1). # Run once (openssl 3); the outputs are committed. Every certificate lasts # 36500 days so tests on the real clock never age out, except ca-expiring. diff --git a/tests/integration/bench_ab_lanes.sh b/tests/integration/bench_ab_lanes.sh index 8ff90a7f..24332992 100755 --- a/tests/integration/bench_ab_lanes.sh +++ b/tests/integration/bench_ab_lanes.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # bench_ab_lanes.sh — block (TCP->STREAM) vs relay (inner H3 -> DATAGRAM) A/B. # Spec: docs/superpowers/specs/2026-06-13-ab-lanes-bench-design.md diff --git a/tests/integration/bench_single_tcp_aggregation.sh b/tests/integration/bench_single_tcp_aggregation.sh index 7c6aae74..9089d9e2 100755 --- a/tests/integration/bench_single_tcp_aggregation.sh +++ b/tests/integration/bench_single_tcp_aggregation.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # bench_single_tcp_aggregation.sh — single-TCP aggregation A/B/C bench. # # THIS FILE IS THE CONTRACT for the bench. The 2-netns direct topology diff --git a/tests/integration/e2e_gateway.sh b/tests/integration/e2e_gateway.sh index 14c6c9f3..c76a86e0 100755 --- a/tests/integration/e2e_gateway.sh +++ b/tests/integration/e2e_gateway.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_gateway.sh — Phase 2 Task 5.1: full-chain HTTP-gateway E2E. # diff --git a/tests/integration/e2e_mitm_h2.sh b/tests/integration/e2e_mitm_h2.sh index 9317c8c7..5cafcba1 100755 --- a/tests/integration/e2e_mitm_h2.sh +++ b/tests/integration/e2e_mitm_h2.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_mitm_h2.sh — Phase 7 MITM Slice 3 Task 16: NET_ADMIN transparent-MITM H2 e2e. # diff --git a/tests/integration/e2e_mitm_smoke.sh b/tests/integration/e2e_mitm_smoke.sh index 695714fb..b04dedc4 100755 --- a/tests/integration/e2e_mitm_smoke.sh +++ b/tests/integration/e2e_mitm_smoke.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Verify the Rust MITM TLS endpoint against openssl s_client over loopback. # Requires root + NET_ADMIN for nft REDIRECT; asserts h2 ALPN and a valid forged chain. # ENV (overridable): diff --git a/tests/integration/e2e_multipath.sh b/tests/integration/e2e_multipath.sh index c18f5a1f..7f4a48b0 100755 --- a/tests/integration/e2e_multipath.sh +++ b/tests/integration/e2e_multipath.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_multipath.sh — Phase 1 milestone 1-B: multipath aggregation benchmark. # diff --git a/tests/integration/e2e_path_recovery.sh b/tests/integration/e2e_path_recovery.sh index 0a8ac20b..0d8bc6a4 100755 --- a/tests/integration/e2e_path_recovery.sh +++ b/tests/integration/e2e_path_recovery.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_path_recovery.sh — a black-holed path is removed and re-added (Rust client). # diff --git a/tests/integration/e2e_tproxy.sh b/tests/integration/e2e_tproxy.sh index db597da4..f296e8f0 100755 --- a/tests/integration/e2e_tproxy.sh +++ b/tests/integration/e2e_tproxy.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_tproxy.sh — Phase 7 MITM Slice 0+1: transparent capture + opaque relay e2e. # diff --git a/tests/integration/e2e_udp.sh b/tests/integration/e2e_udp.sh index cebfcbd5..ea088cda 100755 --- a/tests/integration/e2e_udp.sh +++ b/tests/integration/e2e_udp.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # # e2e_udp.sh — Phase 3 Task 7.2: UDP relay end-to-end scenarios. # diff --git a/tests/packaging/smoke_deb.sh b/tests/packaging/smoke_deb.sh index b1483b4f..eb23fa5c 100644 --- a/tests/packaging/smoke_deb.sh +++ b/tests/packaging/smoke_deb.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Run only on a disposable native systemd CI runner, as root. set -euo pipefail [[ $EUID == 0 ]] || { echo 'run as root on a disposable runner'; exit 1; } diff --git a/tests/packaging/verify_archives.py b/tests/packaging/verify_archives.py index 92217963..d5b70afe 100644 --- a/tests/packaging/verify_archives.py +++ b/tests/packaging/verify_archives.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors """Verify the actual tar/deb payloads cannot install builder-owned writable files.""" import subprocess import sys diff --git a/tests/packaging/verify_install.sh b/tests/packaging/verify_install.sh index 0b8fbb28..87c451ab 100755 --- a/tests/packaging/verify_install.sh +++ b/tests/packaging/verify_install.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # Verify a staged Rust installation (also usable after dpkg-deb --extract). set -euo pipefail STAGE="${1:?staged installation root}" diff --git a/tests/test_cli_help.sh b/tests/test_cli_help.sh index 0711f851..74262661 100755 --- a/tests/test_cli_help.sh +++ b/tests/test_cli_help.sh @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 mp0rta and mqproxy contributors # test_cli_help.sh — smoke test for the mqproxy CLI. # # Asserts that --help works at the top level and per subcommand (exit 0, output