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
feat: add upstream corporate proxy support for self-hosted runners
Add --upstream-proxy flag and auto-detection from host https_proxy/
http_proxy/no_proxy environment variables. When configured, Squid
chains outbound traffic through the corporate proxy via cache_peer.
Key changes:
- New upstream-proxy.ts with parseProxyUrl(), parseNoProxy(),
detectUpstreamProxy(), and PROXY_ENV_VARS constant
- UpstreamProxyConfig interface in types.ts
- generateUpstreamProxySection() in squid-config.ts for cache_peer,
always_direct (no_proxy bypass), and never_direct directives
- CLI auto-detection with --upstream-proxy explicit override
- Host proxy env vars excluded from --env-all passthrough
- Security: reject credentials, loopback, HTTPS scheme, injection chars
- 35 new tests across upstream-proxy, squid-config, docker-manager
- Documentation in docs/environment.md
Closes#1975
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/environment.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -246,6 +246,46 @@ The DinD TCP address (e.g., `tcp://localhost:2375`) typically refers to the runn
246
246
- **`--enable-host-access`** — allows the agent to reach `host.docker.internal` and set `DOCKER_HOST=tcp://host.docker.internal:2375` inside the agent.
247
247
- **`--enable-dind`** — mounts the local Docker socket (`/var/run/docker.sock`) directly into the agent container (only works when using the local daemon, not a remote DinD TCP socket).
248
248
249
+
## Upstream (Corporate) Proxy Support
250
+
251
+
When running on self-hosted runners behind a corporate proxy, AWF can chain Squid
252
+
through the upstream proxy using the `cache_peer` directive.
253
+
254
+
### Auto-detection
255
+
256
+
If the host has `https_proxy`/`HTTPS_PROXY` or `http_proxy`/`HTTP_PROXY` set, AWF
257
+
automatically configures Squid to route outbound traffic through that proxy.
258
+
`no_proxy`/`NO_PROXY` domain suffixes are honored as bypass rules (`always_direct`).
259
+
260
+
```bash
261
+
# Auto-detected — no flags needed when host proxy env vars are set
0 commit comments