cayu.egress definitions
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
DEFAULT_PROXY_SERVER_FACTORY
Section titled “DEFAULT_PROXY_SERVER_FACTORY”from cayu.extensions.egress import DEFAULT_PROXY_SERVER_FACTORYDEFAULT_PROXY_SERVER_FACTORY: ProxyServerFactory = TransparentEgressProxyServerRelease source · Runtime guarantees · Capability guides
DEFAULT_REMOTE_SETUP_COMMAND_TIMEOUT_SECONDS
Section titled “DEFAULT_REMOTE_SETUP_COMMAND_TIMEOUT_SECONDS”from cayu.extensions.egress import DEFAULT_REMOTE_SETUP_COMMAND_TIMEOUT_SECONDSDEFAULT_REMOTE_SETUP_COMMAND_TIMEOUT_SECONDS = 300Release source · Runtime guarantees · Capability guides
prepare_exposed_proxy_binding
Section titled “prepare_exposed_proxy_binding”from cayu.extensions.egress import prepare_exposed_proxy_bindingStart and expose one session proxy listener as an EgressBinding.
The binding’s teardown revokes the grants’ presented values and waits for that before closing the exposure and the listener. Any failure while starting or exposing the listener runs the same rollback, bounded by the default egress teardown timeout, before the original error propagates.
With transport_auth_token every connection must first present the
session’s token in an authenticated transport tunnel. The token reaches only
a trusted guest relay through the binding env, so the listener is usable
only by this session even when the exposure is reachable from other
sandboxes. Without that token, credentialless destinations require an
exposure that asserts credentialless_isolated.
async prepare_exposed_proxy_binding(*, runner_kind: str, session_id: str, broker: TransparentEgressBroker, grants: Sequence[VirtualCredentialGrant], exposure: ProxyExposure, bind_host: str, loop: asyncio.AbstractEventLoop | None, proxy_server_factory: ProxyServerFactory, bind_port: int=0, certificate_authority: SessionCertificateAuthority | None=None, owns_certificate_authority: bool=True, transport_auth_token: bytes | None=None) -> EgressBindingRelease source · Runtime guarantees · Capability guides
ProxyServerFactory
Section titled “ProxyServerFactory”from cayu.extensions.egress import ProxyServerFactoryProxyServerFactory = Callable[..., TransparentEgressProxyServer]Release source · Runtime guarantees · Capability guides
run_enforcement_preflight
Section titled “run_enforcement_preflight”from cayu.extensions.egress import run_enforcement_preflightProve brokered reachability and direct-egress denial inside the guest.
Runs a python3 probe through runner.exec: the proxy must accept a
CONNECT to the first grant destination and complete TLS with the guest CA,
while direct TLS to public addresses must fail. With probe_metadata it
also fails if link-local metadata is reachable. Returns the UTC observation
time on success and raises UnsupportedEgressError (or
UnsupportedEgressCapabilityError for metadata) otherwise.
async run_enforcement_preflight(runner: Runner, request: VirtualEgressRunnerRequest, *, timeout_s: int, probe_metadata: bool=True, metadata_isolation_reason: str | None=None, metadata_isolation_remediation: str | None=None) -> datetimeRelease source · Runtime guarantees · Capability guides
run_setup_commands
Section titled “run_setup_commands”from cayu.extensions.egress import run_setup_commandsRun each setup command through Runner.exec_system; fail on the first error.
async run_setup_commands(runner: Runner, request: VirtualEgressRunnerRequest) -> None