Skip to content

Networking Controls#45

Merged
cooper-grc merged 2 commits intomainfrom
cg/networking-updates
Mar 10, 2026
Merged

Networking Controls#45
cooper-grc merged 2 commits intomainfrom
cg/networking-updates

Conversation

@cooper-grc
Copy link
Copy Markdown
Collaborator

@cooper-grc cooper-grc commented Mar 9, 2026

Summary by cubic

Add outbound networking controls for sandboxes (block all or CIDR allow list) and a runtime API to change permissions without restarting. Also update listUrls() to return URLs keyed by port.

  • New Features

    • Add blockNetwork and allowList (CIDR) to sandbox/stub config; they are mutually exclusive and validated. Config is sent as block_network and allow_list during stub creation.
    • Add SandboxInstance.updateNetworkPermissions(blockNetwork, allowList?) to update rules via /network/update; rejects conflicting inputs and throws on failure.
    • listUrls() now returns Record<number, string> mapping ports to URLs.
  • Migration

    • Update callers of listUrls() to handle a map keyed by port instead of an array.
    • Set either blockNetwork=true or allowList, not both.

Written for commit 9ef69eb. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

@cooper-grc cooper-grc merged commit c4282e1 into main Mar 10, 2026
2 checks passed
@cooper-grc cooper-grc deleted the cg/networking-updates branch March 10, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant