E2B

Update sandbox network

Update whether the sandbox can access the internet.

Call Create sandbox first and replace sbx_123 with its returned sandboxID.

PUT /e2b/sandboxes/{sandboxID}/network● Supported

Official E2B docs ↗

Request parameters

  • sandboxIDstring必填

    path:

  • allow_internet_accessboolean可选

    Allow internet access; false is equivalent to denyOut containing 0.0.0.0/0.

  • allowOutarray可选

    Allowed egress CIDRs, IPs or domains; allow rules take precedence over deny rules.

  • denyOutarray可选

    Denied egress CIDRs or IPs; domains are not supported.

  • egressProxyobject可选

    Upstream proxy configuration; not currently applied by this platform.

    ▸ 展开子字段(3)
    • addressstring必填

      SOCKS5 proxy address in host:port format (e.g. "proxy.example.com:1080").

    • usernamestring可选

      Optional SOCKS5 username (RFC 1929), max 255 bytes.

    • passwordstring可选

      Optional SOCKS5 password (RFC 1929), max 255 bytes.

  • rulesobject可选

    Upstream per-domain transform rules; not currently applied by this platform.

Returns

204

Errors follow the E2B format — see error codes

Response

HTTP 204

Successfully updated the sandbox network configuration

No response body is declared.