SandboxNetworkProxy

class baseten.sandbox.SandboxNetworkProxy(*, allowed_domains=None, forbidden_domains=None, bypass=None, routing=None)

Bases: object

Proxy configuration of a sandbox’s network.

Parameters:
allowed_domains: Sequence[str] | None = None

When set, only these external domains are reachable.

Supports wildcards such as *.example.com. Takes precedence over forbidden_domains.

bypass: Sequence[str] | None = None

Domains reached directly rather than through the proxy.

Supports wildcards. Local and private addresses always bypass it.

forbidden_domains: Sequence[str] | None = None

When set, every external domain except these is reachable. Supports wildcards.

routing: Sequence[SandboxNetworkProxyRoute] | None = None

Rules injecting headers and body fields into matching requests.