Skip to content

[SDK] Plumb proxy through network SandboxPolicy and add proxy integration tests - #112

Merged
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/bbonaby/plumb-proxy-and-tests
Apr 3, 2026
Merged

[SDK] Plumb proxy through network SandboxPolicy and add proxy integration tests#112
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/bbonaby/plumb-proxy-and-tests

Conversation

@bbonaby

@bbonabyBranden Bonaby (bbonaby) commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator
  • Add proxy to SandboxPolicy.network
  • Pass proxy through to ContainerConfig.network in buildSandboxPayload
  • Add SDK unit tests for proxy plumbing
  • Add CLI integration tests for builtinTestServer and localhost proxy
Microsoft Reviewers: Open in CodeFlow

- Add proxy discriminated union to SandboxPolicy.network
- Pass proxy through to ContainerConfig.network in buildSandboxPayload
- Reject proxy on Linux with clear error message
- Update index.ts doc comment
- Add SDK unit tests for proxy plumbing
- Add CLI integration tests for builtinTestServer and localhost proxy
- Add minimal Node.js CONNECT proxy for localhost test
@bbonabyBranden Bonaby (bbonaby) changed the title [SDK] Plumb proxy through SandboxPolicy and add proxy integration tests[SDK] Plumb proxy through network SandboxPolicy and add proxy integration testsApr 3, 2026
@bbonaby
Branden Bonaby (bbonaby) marked this pull request as ready for review April 3, 2026 03:22
Comment threadsdk/src/sandbox.ts
};

if (policy.network?.proxy) {
throw new Error('Proxy configuration is not supported on Linux');

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

FYI: I haven't added proxy support for linux yet so for now this is not supported. But in the future it will be.

Comment threadsdk/src/types.ts
* - `builtinTestServer`: Use the built-in test proxy server
* - `localhost`: Forward traffic through a proxy on the specified localhost port
*/
proxy?: { builtinTestServer: true } | { localhost: number }

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

FYI: Hope is to expand this in the future to allow for folks to add addresses/hosts + ports but for today we just have the builtin test one and external localhost for now.

@bbonaby

Copy link
Copy Markdown
CollaboratorAuthor

Merging so we can kick off a build and provide a drop to our partners. If there are concerns I will address them in a follow up.

@bbonaby
Branden Bonaby (bbonaby) merged commit 5a8cf91 into mainApr 3, 2026
6 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/bbonaby/plumb-proxy-and-tests branch April 9, 2026 14:11
Sign up for freeto 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.

2 participants

@bbonaby@kanismohammed