You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a11c2f
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sandbox,podman): chain sandbox egress through corporate HTTP proxy
In proxy-required enterprise networks the supervisor's egress proxy
dialed policy-approved destinations directly, so allowed external API
calls timed out behind corporate forward proxies.
The supervisor now reads HTTPS_PROXY/HTTP_PROXY/ALL_PROXY/NO_PROXY from
its own environment and chains approved CONNECT tunnels and plain HTTP
forward requests through the corporate proxy with HTTP CONNECT,
including Basic proxy authentication. NO_PROXY entries (hostnames,
domain suffixes, IPs, CIDRs), loopback, and host-gateway aliases keep
dialing directly. Policy evaluation, local DNS resolution, and SSRF
checks are unchanged; only the final TCP dial is proxied, and the
workload child's proxy variables still point at the local policy proxy.
The Podman driver gains https_proxy/http_proxy/no_proxy operator config
(TOML, CLI flags, and env) injected into sandbox containers as proxy
environment defaults that per-sandbox environment values override.
FixesNVIDIA#1792
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Copy file name to clipboardExpand all lines: architecture/sandbox.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,16 @@ handled by the inference interception path:
78
78
External inference endpoints that do not use `inference.local` are treated like
79
79
ordinary network traffic and must be allowed by policy.
80
80
81
+
In proxy-required networks, the supervisor honors `HTTPS_PROXY`/`HTTP_PROXY`/
82
+
`NO_PROXY` from its own environment: after policy and SSRF checks pass, it
83
+
chains the upstream dial through the corporate forward proxy with HTTP CONNECT
84
+
instead of connecting directly. `NO_PROXY` destinations, loopback, and
85
+
host-gateway aliases always dial directly. Only `http://` proxy URLs are
86
+
supported. Local DNS resolution and SSRF validation still run before the
87
+
proxied dial; the CONNECT target sent to the corporate proxy is the requested
88
+
hostname. The workload child's proxy variables are unaffected — they are
89
+
always rewritten to point at the local policy proxy.
90
+
81
91
## Credentials
82
92
83
93
Provider credentials are stored at the gateway and fetched by the supervisor at
Copy file name to clipboardExpand all lines: crates/openshell-driver-podman/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,6 +345,14 @@ Podman resources after out-of-band container removal or label drift.
345
345
| `OPENSHELL_PODMAN_TLS_CA` | `--podman-tls-ca` | unset | Host path to the CA certificate mounted for sandbox mTLS. |
346
346
| `OPENSHELL_PODMAN_TLS_CERT` | `--podman-tls-cert` | unset | Host path to the client certificate mounted for sandbox mTLS. |
347
347
| `OPENSHELL_PODMAN_TLS_KEY` | `--podman-tls-key` | unset | Host path to the client private key mounted for sandbox mTLS. |
348
+
| `OPENSHELL_SANDBOX_HTTPS_PROXY` | `--sandbox-https-proxy` | unset | Corporate forward proxy URL injected into sandbox containers as `HTTPS_PROXY`. The in-container supervisor chains policy-approved upstream dials through it with HTTP CONNECT. Only `http://` proxy URLs are supported. |
349
+
| `OPENSHELL_SANDBOX_HTTP_PROXY` | `--sandbox-http-proxy` | unset | Corporate forward proxy URL injected as `HTTP_PROXY` for plain HTTP requests. |
350
+
| `OPENSHELL_SANDBOX_NO_PROXY` | `--sandbox-no-proxy` | unset | Comma-separated `NO_PROXY` list (hostnames, domain suffixes, IPs, CIDRs) dialed directly instead of through the corporate proxy. |
351
+
352
+
Through the gateway, the same settings are the `https_proxy`, `http_proxy`, and
353
+
`no_proxy` keys under `[openshell.drivers.podman]`; see
354
+
`docs/reference/gateway-config.mdx`. Per-sandbox environment values take
/// The in-container supervisor chains policy-approved TLS tunnels
141
+
/// through this proxy with HTTP CONNECT instead of dialing upstream
142
+
/// destinations directly. Only `http://` proxy URLs are supported.
143
+
/// Per-sandbox environment values take precedence.
144
+
pub https_proxy: Option<String>,
145
+
/// Corporate forward proxy URL injected as `HTTP_PROXY`/`http_proxy`,
146
+
/// used for plain HTTP requests. See `https_proxy`.
147
+
pub http_proxy: Option<String>,
148
+
/// Comma-separated `NO_PROXY` list injected alongside the proxy URLs
149
+
/// (e.g. `*.svc.cluster.local,10.0.0.0/8`). Destinations matching an
150
+
/// entry are dialed directly instead of through the corporate proxy.
/// The in-container supervisor only supports `http://` forward proxies,
210
+
/// so reject other schemes at config time instead of silently ignoring
Copy file name to clipboardExpand all lines: crates/openshell-driver-podman/src/main.rs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,19 @@ struct Args {
103
103
/// Host path to the client private key for sandbox mTLS.
104
104
#[arg(long, env = "OPENSHELL_PODMAN_TLS_KEY")]
105
105
podman_tls_key: Option<PathBuf>,
106
+
107
+
/// Corporate forward proxy URL injected into sandbox containers as
108
+
/// `HTTPS_PROXY` for the supervisor's upstream dials (http:// only).
0 commit comments