GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(fleet-proxy): raw byte splice for RustDesk direct-access port (#6221) by dezren39 · Pull Request #7703 · developing-today/code Conversation
|
| Criterion | Where |
|---|---|
| New and old broker capability negotiation; old brokers keep behaviour | a_broker_without_the_capability_is_never_asked, the_legacy_dialect_is_never_asked |
| Bidirectional byte-stream transparency | relay_is_byte_transparent_in_both_directions (all 256 byte values, 64 KiB+7), relay_carries_both_directions_concurrently |
| Concurrent splices | concurrent_splices_do_not_interfere |
| Idle session past the 660 s timeout | raw_tunnels_clear_the_http_timeouts, a_raw_tunnel_really_has_no_timeouts, an_idle_splice_survives_past_the_http_timeout |
| No RustDesk credential in config or logs | structural: the relay never inspects payload, nothing reads a token file, errors name shapes only |
| forward.sh untouched as fallback | not modified |
The >30-minute live session and the start-latency comparison against the forward.sh baseline are activation checks, not unit tests — they need the laptop's RustDesk host and a real session. Recording them on #5694 as the activation caveat rather than claiming them here.
read/write, deliberately not std::io::copy: on Linux that lowers to splice(2), which stalled mid-stream in this sandbox for the SSH ProxyCommand relay (fleet step 3: proxy domains — hello/capability frame, PATH shim regeneration, fleet init #5431).fleet-config's built-in services table grows to four entries (21118 rustdesk), so services_default_to_the_live_table moves from 3 to 4.cargo test -p fleet-proxy -p fleet-proxy-proto -p fleet-config -p fleet-registry → 136 passed
cargo test -p fleet --no-default-features --features "proxy-serve,queue,secrets-broker,search-serve,secrets" → 29 passed
cargo test -p fleet with default features does not compile on current main — fleet-queue/src/validate.rs declares FLEET_REPOS: [&str; 10] with 9 entries (pre-existing, untouched by this branch; verified against origin/main). The feature-scoped run above is the same capability set without the broken crate.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…6221) First build of #5694's recommendation B: let the fleet proxy expose a laptop TCP service through a loopback-only raw byte stream, using the existing CONNECT tunnel path, so RustDesk's direct-access port 21118 stops needing the dedicated raw SSH forward. - fleet-config: register port 21118 as `rustdesk` in the routing table (its presence is what makes a splice request for it legal), plus PORT_RUSTDESK and SPLICE_LISTEN_HOST. - fleet-proxy-proto: the `{ "splice": { "port": N } }` request and `{ "splice": { "status": …, "error": … } }` reply, with the `proxy-splice` / `splice-serve` capability ids. After a 200 the connection stops being a frame stream in both directions. - fleet-registry: ProxySplice and SpliceServe capabilities; the proxy domain gains the `desktop` subcommand. - fleet-proxy/tunnel: `TunnelMode` makes the post-setup timeouts a caller choice. `Raw` clears them — this is what stops a desktop session dying at the 660 s HTTP read timeout. - fleet-proxy/splice: the relay (opaque, bidirectional, hand-rolled read/write like the stdio relay — not io::copy, which stalled in this sandbox at #5431), the broker half (`serve_splice`, port must be in the routing table, spent tunnels never return to the pool) and the client half (`fleet proxy desktop`, loopback-only listener). - fleet-proxy/serve: advertise `splice-serve`; hand a splice frame to the raw relay instead of the request/response loop. Capability negotiation is the gate: a pre-splice broker (and every proto-0 Python broker) advertises neither id, so `fleet proxy desktop` reports it and exits 69 while the SSH forward stays the fallback. No RustDesk credential is read, stored, or logged anywhere in this path: the relay never inspects payload, and the permanent password's proof travels inside the spliced bytes. Tests: 13 new splice tests (byte transparency across all 256 values, concurrent bidirectional streams, two concurrent splices, raw mode clearing live socket timeouts, an idle splice outliving the HTTP timeout shape, loopback-only listener enforcement, and the negotiation gate proving a non-splice broker is never sent a splice frame), plus protocol, config, registry and CLI coverage. Refs #6221, #5694
There was an error while loading. Please reload this page.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fb62b1e91
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if is_splice_frame(&frame) { | ||
| crate::splice::serve_splice( | ||
| &broker.config, | ||
| broker.egress.as_ref(), | ||
| stream, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Keep the broker alive while a splice is active
When a desktop session runs without unrelated HTTP requests, the broker still exits after idle_exit_secs (3600 seconds by default), terminating the session even while bytes are flowing. This branch bypasses do_request, the only path that updates Broker.last_used, while keepalive_loop calls process::exit(0) when that timestamp expires. Clearing the tunnel timeouts therefore does not make desktop sessions long-lived. Track active splices and prevent idle shutdown until they finish, including while an established desktop session is idle.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c98c33d (task 10516, lane code-a). The broker now counts live splices: Broker.active_splices (AtomicUsize) is passed to serve_splice, which holds an RAII SpliceGuard from the 200 handshake until the relay ends. keepalive_loop exits only via idle_exit_due(last_used, now, idle, active_splices), which is false while any splice is active — including an established but idle desktop session. Tests: serve::tests::idle_exit_waits_for_active_splices and splice::tests::splice_guard_counts_live_splices; full fleet-proxy suite 85 lib + 14 bin tests pass, rustfmt clean.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| None => connect_tunnel_mode( | ||
| None, | ||
| target, | ||
| req.port, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Require explicit direct mode before bypassing the egress proxy
When proxy_direct() is false but HTTPS_PROXY is missing or invalid, broker startup also stores egress = None. This branch interprets that state as permission to connect directly to the laptop, silently bypassing the configured proxy route. The existing HTTP path in Broker::open_conn_raw distinguishes explicit direct mode from missing egress configuration and refuses the latter. Apply the same check here so a splice reports the configuration failure rather than attempting an unintended direct connection.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c98c33d (task 10516, lane code-a). serve_splice now refuses before dialling when egress is None and config.proxy_direct() is false, returning the same message the HTTP path uses in Broker::open_conn_raw: "HTTPS_PROXY must be set (runtime proxy env)". Explicit direct mode (proxy_direct true, egress None) still dials directly. Test: splice::tests::serve_splice_refuses_missing_egress_when_not_direct asserts the 502 refusal frame over a UnixStream pair with Config::default(); full fleet-proxy suite passes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…n egress unconfigured (#6221)
|
🤖 Agent note · parked (resumable — Codex fixes landed, rebase/port is the next step)
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · closing as superseded by PR #8618
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Implement RustDesk raw-stream splice through fleet proxy
There was an error while loading. Please reload this page.