Skip to content

Proxy Modes

Sylo supports two ways to route agent traffic through the gateway.

Uses iptables to redirect all outbound TCP through the tunnel client. The agent cannot bypass it without root access.

Agent → iptables REDIRECT → tunnel client → TLS → gateway → mitmproxy → API

Setup:

  1. Install at template build time:
Terminal window
curl -fsSL https://sylo.runplex.dev/install | sudo bash
  1. Activate at runtime (after receiving the session token):
Terminal window
sudo -E bash /etc/sylo/init.sh
  1. Use sandboxEnv() in the SDK:
const env = sylo.sandboxEnv(session);
// { SYLO_TOKEN, SYLO_GATEWAY, SYLO_GATEWAY_API, NODE_EXTRA_CA_CERTS, ... }

Best for: E2B, Docker, any environment with iptables support.

Sets HTTPS_PROXY so HTTP clients route through Sylo automatically. No installation needed.

Agent → HTTPS_PROXY → gateway → mitmproxy → API

Setup:

Use proxyEnv() in the SDK:

const env = sylo.proxyEnv(session);
// { HTTPS_PROXY, HTTP_PROXY, SYLO_TOKEN, NODE_EXTRA_CA_CERTS, ... }

Best for: Modal, gVisor, environments without NET_ADMIN capability.

Caveat: The agent could unset HTTPS_PROXY to bypass the proxy. Combine with CIDR restrictions on the sandbox network to prevent direct outbound access.

Tunnel modeProxy mode
Install stepcurl | sudo bash at build timeNone
SDK methodsandboxEnv()proxyEnv()
Requiresiptables / NET_ADMINNothing
Bypass-proofYesNo (needs CIDR restriction)
Works onE2B, DockerModal, any container

Both modes require the sandbox to trust Sylo’s mitmproxy CA certificate for HTTPS interception. The SDK automatically sets:

NODE_EXTRA_CA_CERTS=/etc/sylo/ca.crt # Node.js
SSL_CERT_FILE=/etc/sylo/ca.crt # Python, curl
REQUESTS_CA_BUNDLE=/etc/sylo/ca.crt # Python requests

In tunnel mode, init.sh downloads the CA cert from the gateway and installs it. In proxy mode, your template needs to download it manually or include it at build time.