Update sandbox network
Update whether the sandbox can access the internet.
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
/e2b/sandboxes/{sandboxID}/network● SupportedRequest 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.