Channel

Which way a Space's calls go, and port forwards over its own connection.

A Space one of your machines provides is reached straight over the mesh when the two machines can reach each other (a LAN neighbour), through the relay otherwise. route says which way calls go now; forward carries a local TCP port to a guest port over that same connection. Files of 2 MiB and more between you and a Linux VM Space on the same machine skip the guest network: the VM shares a disk with its host, the file content moves through it, and each transfer is still checked against its SHA-256. There is nothing to configure (CUA_BULK_LANE=off turns it off).

Channel methods#

Methods of Space.

Space.route#

Which way this Space's calls go now (see super.spacesd.SpacesdClient.route): local …, direct …, relay …, mesh direct <ip:port> rtt <ms> ms, mesh relayed or cloud; empty when the Space runs no cua-spacesd. In daemon mode it is the daemon's connection to the Space.

async def route(self) -> str

Returns String · Async · Raises CuaError

Space.transport#

What carries this Space's calls, for a badge: mesh (end to end) or relay_https (the relay can read the session in transit; with fallback_reason when the mesh was wanted), or local, direct, cloud. In daemon mode it is the daemon's connection to the Space.

async def transport(self) -> SpaceTransport

Returns SpaceTransport · Async · Raises CuaError

Space.forward#

Forwards a free loopback port on this machine to guest port over this Space's own connection (cua-spacesd's tunnel): the same path its calls take, so a Space one of your machines provides on your LAN is reached directly, and never through a port opened on that machine's network. local_addr() is the address to connect to; the forward stops on close() or when dropped. bind is the local address to listen on (default 127.0.0.1:0, a free loopback port; for example 0.0.0.0:0 serves your LAN, so only do that on a network you trust: whoever reaches it reaches the guest port).

async def forward(self, port: int, bind: Optional[str] = None) -> PortForward
ParameterTypeDefault
portu16required
bindOption<String>None

Returns PortForward · Async · Raises CuaError

SpaceTransport record#

What carries a connected Space's calls (Space.transport), for a badge: whether the relay can read them.

Returned by Space.transport.

FieldTypeDefaultDescription
transportStringlocal, direct, mesh (end to end), relay_https (the relay's HTTPS path: the relay can read the session in transit), cloud, or empty when the Space runs no cua-spacesd.
fallback_reason / fallbackReasonStringWhy it took the relay's HTTPS path although the mesh was wanted; empty on the mesh and when the HTTPS path was chosen (CUA_MESH=off), and from an older daemon.