Skip to content

docs: replace outdated ALL_TRAFFIC syntax with selector callbacks#231

Open
mishushakov wants to merge 2 commits into
mainfrom
mishushakov/replace-all-traffic-syntax
Open

docs: replace outdated ALL_TRAFFIC syntax with selector callbacks#231
mishushakov wants to merge 2 commits into
mainfrom
mishushakov/replace-all-traffic-syntax

Conversation

@mishushakov
Copy link
Copy Markdown
Member

@mishushakov mishushakov commented May 29, 2026

Updates docs/sandbox/internet-access.mdx to replace the outdated ALL_TRAFFIC constant in all code examples with the recommended selector-callback syntax (denyOut: ({ allTraffic }) => [allTraffic] in JS, "deny_out": lambda ctx: [ctx.all_traffic] in Python), per e2b-dev/E2B#1286, and drops ALL_TRAFFIC from the relevant imports. The dedicated ALL_TRAFFIC helper section is removed since the Selector callbacks section already documents the deny-all pattern. Also adds a note that updating per-host network.rules (transforms) on a running sandbox currently has no effect, since transforms only apply at creation time.

🤖 Generated with Claude Code

@cla-bot cla-bot Bot added the cla-signed label May 29, 2026
@cursor
Copy link
Copy Markdown

cursor Bot commented May 29, 2026

PR Summary

Low Risk
Documentation-only changes to examples and wording; no runtime or API behavior changes in this diff.

Overview
Updates docs/sandbox/internet-access.mdx so sandbox network docs match the current SDK style from E2B#1286.

Examples that used ALL_TRAFFIC now use selector callbacks for deny-all (denyOut: ({ allTraffic }) => [allTraffic] / "deny_out": lambda ctx: [ctx.all_traffic]), with ALL_TRAFFIC removed from imports. The standalone ALL_TRAFFIC helper section and the duplicate selector callbacks section are dropped in favor of a short Note that callbacks are recommended while ALL_TRAFFIC stays for backward compatibility.

Prose is tightened across JS/Python: camelCase / snake_case option names, clearer allow/deny wording, and per-host rules examples now include explicit denyOut deny-all lines. updateNetwork notes clarify that network.rules (transforms) are create-only, alongside allowPublicTraffic and maskRequestHost.

Reviewed by Cursor Bugbot for commit fc2008f. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Stale comment

Comment thread docs/sandbox/internet-access.mdx Outdated
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 29, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
e2b 🟢 Ready View Preview May 29, 2026, 6:18 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant