Skip to content

Route Windows sandbox proxy traffic by restricting SID - #34613

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/783fac6e0f904dc9bb1955b75d4a5895e8bb9690
Jul 21, 2026
Merged

Route Windows sandbox proxy traffic by restricting SID#34613
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/783fac6e0f904dc9bb1955b75d4a5895e8bb9690

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 21, 2026

Copy link
Copy Markdown

Route Windows sandbox proxy traffic by restricting SID

Why

Elevated Windows sandboxes need stable managed-proxy ports while preserving the network policy and environment attribution of each sandboxed process.

What changed

  • Keep shared HTTP and SOCKS5 loopback ingress listeners alive across managed-proxy instances.
  • Add a per-route restricting SID to elevated sandbox tokens and dispatch incoming connections to the matching proxy policy after attributing the client process.
  • Reject connections without exactly one registered route, remove routes when their proxy handle is dropped, and keep unsandboxed Windows launches off the managed ingress.
  • Provision the elevated sandbox with the configured proxy ports and local-binding setting, honoring the selected profile and CLI overrides.

Testing

  • Add Windows unit tests for TCP ownership attribution, route selection, restricting-token propagation, and setup settings.
  • Add an end-to-end Windows test covering stable ports, isolated environment policies, HTTP and SOCKS5 routing, and route teardown.

## Why

Elevated Windows sandboxes need stable managed-proxy ports while preserving the network policy and environment attribution of each sandboxed process.

## What changed

- Keep shared HTTP and SOCKS5 loopback ingress listeners alive across managed-proxy instances.
- Add a per-route restricting SID to elevated sandbox tokens and dispatch incoming connections to the matching proxy policy after attributing the client process.
- Reject connections without exactly one registered route, remove routes when their proxy handle is dropped, and keep unsandboxed Windows launches off the managed ingress.
- Provision the elevated sandbox with the configured proxy ports and local-binding setting, honoring the selected profile and CLI overrides.

## Testing

- Add Windows unit tests for TCP ownership attribution, route selection, restricting-token propagation, and setup settings.
- Add an end-to-end Windows test covering stable ports, isolated environment policies, HTTP and SOCKS5 routing, and route teardown.

GitOrigin-RevId: 783fac6e0f904dc9bb1955b75d4a5895e8bb9690
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/783fac6e0f904dc9bb1955b75d4a5895e8bb9690 branch from 04a94ad to 999a715 Compare July 21, 2026 21:07
@copyberry
copyberry Bot merged commit 999a715 into main Jul 21, 2026
22 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/783fac6e0f904dc9bb1955b75d4a5895e8bb9690 branch July 21, 2026 21:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants