Repository navigation
Description
Problem Statement
Problem
In corporate/enterprise Kubernetes clusters, nodes do not have direct internet access. All outbound traffic must go through a corporate forward proxy (e.g., Squid, Zscaler). The supervisor's L7 proxy does not respect HTTP_PROXY, HTTPS_PROXY, or NO_PROXY environment variables, causing all external API calls from agents (e.g., Tavily search, Stripe, external MCP servers) to fail with connection timeouts.
Current Behavior
- The agent process has HTTP_PROXY=http://10.200.0.1: pointing to the supervisor
- The supervisor intercepts outbound traffic and applies policy
- After policy approval, the supervisor connects directly to the destination
- In proxy-required environments, this direct connection fails (no route to host / connection timeout)
Proposed Design
Desired Behavior
The supervisor should:
- Read HTTPS_PROXY / HTTP_PROXY / NO_PROXY from its own environment variables
- When policy allows an outbound connection, route it through the configured corporate proxy using HTTP CONNECT
- Respect NO_PROXY for cluster-internal destinations (e.g., *.svc.cluster.local, 10.96.0.0/12)
- Ideally configurable per-sandbox via the Sandbox CRD:
spec:
podTemplate:
spec:
containers:
- name: agent
env:
- name: HTTPS_PROXY
value: "http://proxy.corp.com:8080"
- name: NO_PROXY
value: "*.svc.cluster.local,10.0.0.0/8"
Alternatives Considered
Use Case
Large enterprise deployments where all Kubernetes clusters are behind corporate proxies. Without this, agents cannot access any external API (search tools, SaaS APIs, external MCP servers) even when policy allows it.
Workaround
None currently viable. We've explored adding a second proxy container but the supervisor rewrites the agent's proxy env to point to itself, overriding any custom configuration.
Agent Investigation
No response
Checklist
- I've reviewed existing issues and the architecture docs
- This is a design proposal, not a "please build this" request
Activity
TaylorMutch commentedon Jun 10, 2026
feat(sandbox,podman): chain sandbox egress through corporate HTTP proxy
feat(sandbox,podman): trust corporate CA for TLS to https:// proxies
feloy commentedon Jul 7, 2026
Spike resolution: corporate proxy chaining implemented and validated on the Podman driver
The questions the triage assessment routed to a spike have been answered with a working
implementation on branch
fix-1792-corporate-proxy-podman. Summary below — I believe thisis enough to remove the
spikelabel and move the issue toward review.What the branch does
Supervisor (driver-agnostic core,
openshell-supervisor-network):The egress proxy now reads
HTTPS_PROXY/HTTP_PROXY/ALL_PROXY/NO_PROXYfrom itsown environment, once at startup (the workload cannot influence it — its proxy variables
are still rewritten to point at the local policy proxy, unchanged). When policy approves an
outbound connection, the final TCP dial is chained through the corporate proxy with HTTP
CONNECT instead of dialing the destination directly. This covers all three dial sites:
CONNECT tunnels, plain HTTP forward requests, and the TLS-inspected relay (which wraps the
proxied socket exactly as it wrapped the direct one).
Podman driver propagation:
New operator config
https_proxy/http_proxy/no_proxyon the Podman driver (TOML,CLI flags, env), validated at startup and injected into sandbox containers as proxy
environment defaults; per-sandbox environment values override them. The
mise run gatewayscript also forwards
OPENSHELL_SANDBOX_{HTTPS_PROXY,HTTP_PROXY,NO_PROXY}into the generated[openshell.drivers.podman]section.Answers to the spike's open questions
only
http://proxy URLs are supported (https:// and SOCKS are ignored with a warning).An OCSF
ConfigStateChangeevent is emitted when chaining is enabled..corp.com,*.corp.com,corp.comare equivalent), exact IPs, CIDRs, and
*. Loopback and the trusted host gateway alwaysdial directly, so cluster/host-internal paths are unaffected.
Proxy-Authorizationheader; never logged (Debug impls redact it).exactly as before — the corporate proxy only replaces the final dial. The CONNECT target
sent upstream is the client-requested hostname, so hostname-filtering proxies and
split-horizon DNS at the proxy keep working.
wildcard, port qualifiers), scheme selection, and the CONNECT handshake (success, auth,
non-200, oversized/malformed responses, timeout) against an in-process mock proxy, plus
Podman config validation tests.
Scope note (Kubernetes)
This branch validates the flow end-to-end on the Podman driver. The supervisor-side fix
is driver-agnostic: on Kubernetes the supervisor reads the same variables from its container
environment, so the
podTemplateenv approach from the issue description is expected towork — but K8s propagation hasn't been exercised in this branch and could be verified as a
follow-up.
Docs (
docs/reference/gateway-config.mdx) andarchitecture/sandbox.mdare updated in thesame branch.
Ask: please remove
spikeand, if the approach looks right, applystate:agent-readyso the PR can proceed.
feat(sandbox,podman): chain sandbox egress through corporate HTTP proxy
feat(sandbox,podman): chain sandbox egress through corporate HTTP proxy
feat(sandbox,podman): trust corporate CA for TLS to https:// proxies
31 remaining items
feat(vm): support corporate HTTP forward proxy egress for microVM san…
feat(vm): support corporate HTTP forward proxy egress for microVM san…
feat(vm): support corporate HTTP forward proxy egress for microVM san…
feat(vm): support corporate HTTP forward proxy egress for microVM san…
github-actions commentedon Sep 16, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
feloy commentedon Sep 16, 2026
@prakashmirji are the changes done related to corporate proxy covering your needs?
prakashmirji commentedon Sep 18, 2026
@feloy - proxy servers can be unauhenticated or secured. For the secured one, following are cases
If these need additional enhancements/spike, we can move the current implementation to review
feloy commentedon Sep 18, 2026
@prakashmirji can you please have a look at #3447 which adds support for secured connection to proxy?
github-actions commentedon Oct 2, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
johntmyers commentedon Oct 6, 2026
This should be available now. I am going to close but if there are gaps please open a new issue.