Skip to content

feat(sdk): add httpsPorts network config for HTTPS sandbox backends#1546

Draft
mishushakov wants to merge 1 commit into
mainfrom
define-sdk-config-for-https-backend-ports-sdk-235
Draft

feat(sdk): add httpsPorts network config for HTTPS sandbox backends#1546
mishushakov wants to merge 1 commit into
mainfrom
define-sdk-config-for-https-backend-ports-sdk-235

Conversation

@mishushakov

Copy link
Copy Markdown
Member

Adds httpsPorts (JS) / https_ports (Python, sync and async) to the sandbox network config (SDK-235) so ports whose in-sandbox service serves TLS itself get their public URLs proxied to the sandbox over HTTPS. This is not TLS passthrough — traffic is still terminated at the E2B proxy and re-encrypted on the hop to the sandbox, and the backend certificate is not verified, so self-signed certificates work. The configured ports are also returned in the sandbox info network config, and the OpenAPI spec change mirrors e2b-dev/infra#3280, which this PR depends on. Live tests covering the new option currently fail with a 502 (all pre-existing network tests pass) and will go green once the infra PR is deployed.

Usage

const sandbox = await Sandbox.create({ network: { httpsPorts: [8443] } })
// https://<host> now proxies to the HTTPS server listening on 8443 in the sandbox
const url = `https://${sandbox.getHost(8443)}`
sandbox = Sandbox.create(network={"https_ports": [8443]})
url = f"https://{sandbox.get_host(8443)}"

🤖 Generated with Claude Code

Adds httpsPorts (JS) / https_ports (Python) to the sandbox network
config so ports whose in-sandbox service serves TLS itself get their
public URLs proxied over HTTPS. Pairs with e2b-dev/infra#3280.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 13, 2026

Copy link
Copy Markdown

SDK-235

@cla-bot cla-bot Bot added the cla-signed label Jul 13, 2026
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aeec4d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
e2b Minor
@e2b/python-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches ingress/proxy TLS behavior (security-sensitive) and depends on undeployed infra; SDK-only changes are additive but misconfiguration could affect how traffic reaches sandbox services.

Overview
Adds httpsPorts / https_ports to sandbox network configuration so listed ports get public URLs that the E2B proxy reaches over HTTPS toward an in-sandbox TLS listener (proxy-terminated TLS, re-encrypted to the backend, no backend cert verification — self-signed certs OK). Documented on create options and echoed in getInfo network config.

OpenAPI SandboxNetworkConfig gains httpsPorts (1–65535, unique, max 128); JS and Python SDKs wire it through create payloads, info mapping, and generated client models. Minor changeset for e2b and @e2b/python-sdk. New live tests (JS + sync/async Python) spin up a self-signed HTTPS server and assert the public URL and info round-trip — behavior depends on matching infra.

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

@github-actions

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from b5f1168. Download artifacts from this workflow run.

JS SDK (e2b@2.33.1-define-sdk-config-for-https-backend-ports-sdk-235.0):

npm install ./e2b-2.33.1-define-sdk-config-for-https-backend-ports-sdk-235.0.tgz

CLI (@e2b/cli@2.13.3-define-sdk-config-for-https-backend-ports-sdk-235.0):

npm install ./e2b-cli-2.13.3-define-sdk-config-for-https-backend-ports-sdk-235.0.tgz

Python SDK (e2b==2.32.0+define.sdk.config.for.https.backend.ports.sdk.235):

pip install ./e2b-2.32.0+define.sdk.config.for.https.backend.ports.sdk.235-py3-none-any.whl

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