Network
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ClaudeCodeBaseModel clawd_code_sdk.models.base Base model for all Claude Code Pydantic models. |
⋔ Inheritance diagram¶
graph TD
3679792072["settings.Network"]
2604142835["base.ClaudeCodeBaseModel"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
2604142835 --> 3679792072
3879467795 --> 2604142835
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: ClaudeCodeBaseModel
Configures network isolation settings for the sandboxed bash environment, including domain restrictions, Unix socket access, and custom proxy configuration.
Source code in src/clawd_code_sdk/models/settings.py
allow_all_unix_sockets
class-attribute
instance-attribute
¶
Allow all Unix domain socket connections. If true, this overrides allowUnixSockets. See https://code.claude.com/docs/en/sandboxing#network-isolation
allow_local_binding
class-attribute
instance-attribute
¶
Allow binding to local network addresses (e.g., localhost ports). Defaults to false if not specified. See https://code.claude.com/docs/en/sandboxing#network-isolation
allow_mach_lookup
class-attribute
instance-attribute
¶
allow_mach_lookup: list[AllowMachLookupItem] | None = Field(
None, alias="allowMachLookup", examples=[["com.apple.coresimulator.*"]]
)
macOS only. Additional XPC/Mach service names the sandbox may look up. Supports a single trailing * for prefix matching. Needed for tools that communicate via XPC such as the iOS Simulator or Playwright. See https://code.claude.com/docs/en/sandboxing#network-isolation
allow_managed_domains_only
class-attribute
instance-attribute
¶
(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources. Non-allowed domains are automatically blocked without user prompts. See https://code.claude.com/docs/en/sandboxing#network-isolation
allow_unix_sockets
class-attribute
instance-attribute
¶
Allow Unix domain sockets for local IPC (SSH agent, Docker, etc.). Provide an array of specific paths. Defaults to blocking if not specified. See https://code.claude.com/docs/en/sandboxing#network-isolation
allowed_domains
class-attribute
instance-attribute
¶
Allowlist of network domains for sandboxed commands. Supports wildcard patterns like *.example.com. See https://code.claude.com/docs/en/sandboxing#network-isolation
denied_domains
class-attribute
instance-attribute
¶
Blocklist of network domains for sandboxed commands. Blocks specific domains even when a broader allowedDomains wildcard would otherwise permit them. Supports wildcard patterns like *.example.com. See https://code.claude.com/docs/en/sandboxing#network-isolation
http_proxy_port
class-attribute
instance-attribute
¶
HTTP proxy port to use for network filtering. If not specified, a proxy server will be started automatically. See https://code.claude.com/docs/en/sandboxing#custom-proxy-configuration
socks_proxy_port
class-attribute
instance-attribute
¶
SOCKS proxy port to use for network filtering. If not specified, a proxy server will be started automatically. See https://code.claude.com/docs/en/sandboxing#custom-proxy-configuration
strict_allowlist
class-attribute
instance-attribute
¶
UNDOCUMENTED. Deny non-allowlisted hosts for sandboxed commands without prompting (added v2.1.219). See https://code.claude.com/docs/en/sandboxing#network-isolation
tls_terminate
class-attribute
instance-attribute
¶
tls_terminate: TlsTerminate | None = Field(None, alias='tlsTerminate')
Experimental. Terminate TLS inside the sandbox proxy so it can read the contents of HTTPS requests. Required for mask credential substitution. Set {} to generate an ephemeral certificate authority for the session, or set caCertPath and caKeyPath to use your own. Only honored from user, managed, or CLI --settings settings, not from .claude/settings.json or .claude/settings.local.json. Requires Claude Code v2.1.199 or later. See https://code.claude.com/docs/en/sandboxing#protect-credentials