cua icon indicating copy to clipboard operation
cua copied to clipboard

[Feature]: Use the advertised QUIC media endpoint for direct Spaces

Open Ayuilos opened this issue 1 month ago • 1 comments

Primary area

Other (Cua Spaces app — macOS, desktop streaming transport)

User problem

A Space registered by address (cua spaces add <host>:<port>, provider direct) is always streamed over the /media WebSocket on the spacesd TCP port, even when cua-spacesd advertises sideChannels.mediaQuicPort = 3212, lists the quic_media feature, and the UDP port is reachable from the client. Streaming over TCP is more exposed to latency spikes and head-of-line blocking than the direct QUIC media path the daemon already provides.

Desired outcome

For direct Spaces, the client tries the advertised QUIC media endpoint (<spacesd host>:mediaQuicPort) and falls back to the WebSocket only when QUIC is unreachable — or the documentation states that direct Spaces never use QUIC, so users do not open UDP paths for nothing.

Current workaround

None; the WebSocket is used.

Affected components and platforms

Observed with:

  • Client: Cua Spaces for macOS 0.9.3 (macOS 26.5.2), bundled cua daemon 0.4.1; Space registered as direct:<tailnet-ip>:<port>
  • Server: Omarchy image, cua-spacesd 0.5.3; caps reports mediaWsPath=/media, mediaQuicPort=3212, features include quic_media

What was checked:

  1. UDP from the Mac to <spacesd host>:3212 reaches the guest's QUIC listener (verified with test datagrams through the path).
  2. Restarted the Cua Spaces app and its daemon, then opened the Space window.
  3. The Mac opens no UDP flow to port 3212, and cua-spacesd logs no QUIC session. Video arrives over a long-lived TCP connection to the spacesd port (several MB, continuously sending).

Ayuilos avatar Oct 16 '26 06:10 Ayuilos

Thanks for the request. @injaneity will look at whether direct Spaces should use the advertised QUIC endpoint or whether the docs should say they don't.

f-trycua avatar Oct 18 '26 06:10 f-trycua