get_host_info(port) for signed HTTP and
WebSocket URLs, and use network on machine creation for public traffic and
outbound rules.
Signed host URLs
Require a traffic token
Setnetwork.allow_public_traffic to False when preview URLs should require
a private traffic credential in addition to any signed edge URL token.
traffic_access_token is returned only at create time. Store it like an
application secret if you need to make later requests through private public
URLs.
Edge-owned ingress uses signed
edge_token URLs returned by
get_host_info(). When allow_public_traffic is false, send
x-nullspace-traffic-access-token with that SDK-returned URL. Treat both the
URL token and traffic token as secrets.Custom preview proxy tokens
Usemachine.create_preview_proxy_target(port) when your application proxy
should hold the Nullspace credential instead of sending signed URLs to browsers.
The response includes marker-only upstream URLs, x-nullspace-preview-proxy-token,
HTTP/WebSocket-specific token values, and the forwarded headers your proxy should
preserve.
If allow_public_traffic is false, the proxy target response reports that a
traffic token is required and returns the traffic header name. It does not return
the private traffic token value; use the traffic_access_token from machine
creation as a separate upstream header.
Mask the upstream Host header
Some development servers route byHost. Use mask_request_host to override
the Host header sent to the machine service.
${PORT} is substituted with the exposed machine port for each proxied
request.
Control outbound access
Disable all outbound network access withinternet_access=False, or use
CIDR-based allow/deny rules when the deployment supports network policy.
WebSockets and SSH relay
Signed WebSocket URLs use the same public edge and access controls as signed HTTP URLs. Missing edge tokens return401, expired tokens return 410, and
tokens scoped to the wrong machine, port, or transport return 401.
Default SSH access uses the certificate-backed relay, not a signed edge
websocket_url. Use nullspace ssh to mint a short-lived OpenSSH user
certificate for a local public key and connect through the relay:
websocket_url as
a bearer credential, so prefer the relay whenever it is available.