Skip to main content
Every TCP port a process in a sandbox listens on has its own public URL for HTTP and WebSocket traffic.
No port is declared in advance. A server that starts listening on port 3000 in sandbox sb-us-east-1-0193c4d2-7f1a-7c2e-9d4b-5a6e8f0c1b2d is reachable at once on https://sb-us-east-1-0193c4d2-7f1a-7c2e-9d4b-5a6e8f0c1b2d-3000.us-east-1.sandbox.telnyxcompute.com.

Requests

  • Protocols. HTTP and WebSocket. TLS ends at the platform, and the server in the sandbox receives plain HTTP/1.1. A client may negotiate HTTP/2 with the platform, and the sandbox still receives HTTP/1.1.
  • Path and body. The path, query, and body reach the server unchanged.
  • Headers. The platform adds X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto, X-Real-Ip, and X-Request-Id, and sends each request with Connection: close. The other headers reach the server as sent, apart from the traffic token.
  • Host. The server receives the public host name in the Host header, so absolute links, redirects, and cookies work at the root path.
  • Origin. Each port is its own browser origin.
Port 49983 is reserved for the platform and refused with 403 port_refused.

Access

network.public_traffic on the create controls access to every port of the sandbox. It is fixed at create. The sandbox object returns traffic_token when public_traffic is false. The platform removes the header before the request reaches the sandbox. A fork receives its own traffic token.
Shell

States

A port answers only while its sandbox is running. Every refused request carries the error’s title in a Telnyx-Sandbox-Error response header. See Errors. Traffic does not resume a paused sandbox. Send connect or resume first. See Common Control Plane.

Cookies

telnyxcompute.com is shared by every sandbox and every Edge Compute function. A cookie that a page in one sandbox sets for a parent domain reaches every other sandbox and function under that domain. A cookie set without a Domain attribute stays on its port’s host name.