Class: ClaudeAgentSDK::SandboxNetworkConfig
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::SandboxNetworkConfig
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Sandbox network configuration
Instance Attribute Summary collapse
-
#allow_all_unix_sockets ⇒ Object
Returns the value of attribute allow_all_unix_sockets.
-
#allow_local_binding ⇒ Object
Returns the value of attribute allow_local_binding.
-
#allow_managed_domains_only ⇒ Object
Returns the value of attribute allow_managed_domains_only.
-
#allow_unix_sockets ⇒ Object
Returns the value of attribute allow_unix_sockets.
-
#allowed_domains ⇒ Object
Returns the value of attribute allowed_domains.
-
#http_proxy_port ⇒ Object
Returns the value of attribute http_proxy_port.
-
#socks_proxy_port ⇒ Object
Returns the value of attribute socks_proxy_port.
Instance Method Summary collapse
-
#initialize(allowed_domains: nil, allow_managed_domains_only: nil, allow_unix_sockets: nil, allow_all_unix_sockets: nil, allow_local_binding: nil, http_proxy_port: nil, socks_proxy_port: nil) ⇒ SandboxNetworkConfig
constructor
A new instance of SandboxNetworkConfig.
- #to_h ⇒ Object
Constructor Details
#initialize(allowed_domains: nil, allow_managed_domains_only: nil, allow_unix_sockets: nil, allow_all_unix_sockets: nil, allow_local_binding: nil, http_proxy_port: nil, socks_proxy_port: nil) ⇒ SandboxNetworkConfig
Returns a new instance of SandboxNetworkConfig.
1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/claude_agent_sdk/types.rb', line 1650 def initialize( allowed_domains: nil, allow_managed_domains_only: nil, allow_unix_sockets: nil, allow_all_unix_sockets: nil, allow_local_binding: nil, http_proxy_port: nil, socks_proxy_port: nil ) @allowed_domains = allowed_domains # Array of domain strings @allow_managed_domains_only = allow_managed_domains_only @allow_unix_sockets = allow_unix_sockets # macOS only: Array of socket paths @allow_all_unix_sockets = allow_all_unix_sockets @allow_local_binding = allow_local_binding @http_proxy_port = http_proxy_port @socks_proxy_port = socks_proxy_port end |
Instance Attribute Details
#allow_all_unix_sockets ⇒ Object
Returns the value of attribute allow_all_unix_sockets.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def allow_all_unix_sockets @allow_all_unix_sockets end |
#allow_local_binding ⇒ Object
Returns the value of attribute allow_local_binding.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def allow_local_binding @allow_local_binding end |
#allow_managed_domains_only ⇒ Object
Returns the value of attribute allow_managed_domains_only.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def allow_managed_domains_only @allow_managed_domains_only end |
#allow_unix_sockets ⇒ Object
Returns the value of attribute allow_unix_sockets.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def allow_unix_sockets @allow_unix_sockets end |
#allowed_domains ⇒ Object
Returns the value of attribute allowed_domains.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def allowed_domains @allowed_domains end |
#http_proxy_port ⇒ Object
Returns the value of attribute http_proxy_port.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def http_proxy_port @http_proxy_port end |
#socks_proxy_port ⇒ Object
Returns the value of attribute socks_proxy_port.
1646 1647 1648 |
# File 'lib/claude_agent_sdk/types.rb', line 1646 def socks_proxy_port @socks_proxy_port end |
Instance Method Details
#to_h ⇒ Object
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 |
# File 'lib/claude_agent_sdk/types.rb', line 1668 def to_h result = {} result[:allowedDomains] = @allowed_domains if @allowed_domains result[:allowManagedDomainsOnly] = @allow_managed_domains_only unless @allow_managed_domains_only.nil? result[:allowUnixSockets] = @allow_unix_sockets unless @allow_unix_sockets.nil? result[:allowAllUnixSockets] = @allow_all_unix_sockets unless @allow_all_unix_sockets.nil? result[:allowLocalBinding] = @allow_local_binding unless @allow_local_binding.nil? result[:httpProxyPort] = @http_proxy_port if @http_proxy_port result[:socksProxyPort] = @socks_proxy_port if @socks_proxy_port result end |