Skip to main content
See Host sockets for guest connection details, platform support, and security considerations.
VSock routes are local-only and unavailable with the multi-tenant deployment profile.

SandboxBuilder

builder.vsock()

Expose a host Unix stream socket or local Windows named pipe on host CID 2. Call repeatedly to add routes; each socket type and port pair must be unique.

Parameters

host_pathString
Absolute path to the host socket or pipe.
portInteger
Port exposed to the guest.

Returns

SandboxBuilder
The builder, for chaining.

builder.vsock_dgram()

Expose a host Unix datagram socket while preserving datagram boundaries. Datagram routes are unavailable on Windows. Call repeatedly to add routes; each socket type and port pair must be unique.

Parameters

host_pathString
Absolute path to the host socket or pipe.
portInteger
Port exposed to the guest.

Returns

SandboxBuilder
The builder, for chaining.