fix: remove HTTP_PROXY/HTTPS_PROXY env vars from agent container#524
fix: remove HTTP_PROXY/HTTPS_PROXY env vars from agent container#524
Conversation
Intercept mode (iptables DNAT 80/443 → squid:3129) handles all routing transparently. Port 3128 is unreachable from the agent container, causing Codex (Rust/reqwest) to fail with "Connection refused" when it honors the HTTP_PROXY env var. - Remove HTTP_PROXY/HTTPS_PROXY from the agent container environment - Add proxy vars (upper and lowercase) to EXCLUDED_ENV_VARS to prevent host proxy settings from leaking via --env-all - Update entrypoint.sh logging to reflect intercept mode - Users can still override via --env HTTP_PROXY=... if needed Fixes #523 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
|
Chroot tests failed Smoke Chroot failed - See logs for details. |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical issue where Codex (Rust/reqwest) fails to connect because it honors the HTTP_PROXY environment variable pointing to an unreachable port (3128). The solution removes these environment variables from the agent container and relies on intercept mode (iptables DNAT on ports 80/443 → squid:3129) for transparent routing.
Changes:
- Removed
HTTP_PROXYandHTTPS_PROXYenvironment variables from the agent container environment - Added proxy environment variables (all case variants) to the exclusion list to prevent host settings from leaking via
--env-all - Updated entrypoint.sh logging to reflect intercept mode operation and only print proxy vars if user-provided
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/docker-manager.ts | Removed HTTP_PROXY/HTTPS_PROXY from agent environment and added all proxy var variants to EXCLUDED_ENV_VARS |
| src/docker-manager.test.ts | Updated test expectations and added new test to verify proxy vars are excluded with --env-all |
| containers/agent/entrypoint.sh | Updated proxy configuration logging to reflect intercept mode and conditionally print user-provided proxy vars |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Node.js Build Test Results
Overall: PASS ✅ All Node.js projects built and tested successfully.
|
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Go Build Test Results
Overall: PASS ✅ All Go projects built and tested successfully.
|
Build Test: Java - FAILED ❌ERROR: Maven installation is corrupted or incompatible with the system architecture. Test Results
Overall: FAILED Environment Details
Action Required: The GitHub Actions runner environment has a corrupted Maven installation. This needs to be investigated and fixed before Java build tests can run successfully.
|
Build Test: Bun - FAILED ❌Status: FAILED - Bun installation issue Test Results
Overall: FAIL Error DetailsBun v1.3.8 was successfully installed, but all attempts to run This error occurs consistently:
Environment
RecommendationThis appears to be an environment incompatibility between Bun v1.3.8 and the GitHub Actions runner environment. Possible solutions:
The
|
Build Test: Rust - FAILED ❌Status: BLOCKED Unable to execute Rust build tests due to container environment restrictions. Issue DetailsThe test workflow attempted to:
Root CauseThe Rust toolchain (rustup/cargo) cannot execute within the AWF agent container. When attempting to run cargo commands, execution is intercepted and returns bash version output instead of cargo output. This suggests:
Attempted Solutions
Next StepsTo enable Rust build testing, one of the following is required:
Test Results Table:
Overall: FAILED - Environment incompatible with Rust toolchain execution
|
After #524 removed HTTP_PROXY/HTTPS_PROXY from the agent container, the v0.13.4 images break because their setup-iptables.sh DNATs to port 3128 (explicit proxy) instead of 3129 (intercept mode). Recompile all lock files to use v0.13.5 images which have the intercept port fix (PR #520). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After #524 removed HTTP_PROXY/HTTPS_PROXY from the agent container, the v0.13.4 images break because their setup-iptables.sh DNATs to port 3128 (explicit proxy) instead of 3129 (intercept mode). Recompile all lock files to use v0.13.5 images which have the intercept port fix (PR #520). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After #524 removed HTTP_PROXY/HTTPS_PROXY from the agent container, the v0.13.4 images break because their setup-iptables.sh DNATs to port 3128 (explicit proxy) instead of 3129 (intercept mode). Recompile all lock files to use v0.13.5 images which have the intercept port fix (PR #520). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Changes ### Mount /etc/hosts in chroot mode and handle missing resolv.conf - Mount `/etc/hosts` read-only inside the chroot for hostname resolution (e.g., localhost) - Handle missing `/host/etc/resolv.conf` when using selective /etc mounts: create the file instead of failing, clean it up on exit ### Fix HTTP blocking test for intercept mode - Fix the HTTP blocking integration test to check HTTP status code instead of exit code, since Squid returns a 403 HTML page for blocked HTTP requests in intercept mode (curl exits 0) ### Ensure .copilot directory permissions before CLI install - Create `.copilot` directory with correct ownership before installing Copilot CLI in smoke-chroot workflow --- Note: 4 failing CI checks are pre-existing failures also present on main (caused by HTTPS_PROXY removal in #524).
Two issues introduced by recent agent-authored PRs: 1. PR #524 removed both HTTP_PROXY and HTTPS_PROXY from the agent container. While HTTP works via iptables DNAT to Squid's intercept port 3129, HTTPS requires the CONNECT method through Squid's forward-proxy port 3128 (ssl-bump). Restoring HTTPS_PROXY fixes Examples Test, Chroot Edge Cases, and Chroot Package Managers. 2. smoke-chroot.lock.yml used a sparse checkout (.github/.agents only) but then runs npm ci && npm run build which needs the full repo. Adding actions/checkout to smoke-chroot.md fixes the tsc build failure. Fixes #529 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two issues introduced by recent agent-authored PRs: 1. PR #524 removed both HTTP_PROXY and HTTPS_PROXY from the agent container. While HTTP works via iptables DNAT to Squid's intercept port 3129, HTTPS requires the CONNECT method through Squid's forward-proxy port 3128 (ssl-bump). Restoring HTTPS_PROXY fixes Examples Test, Chroot Edge Cases, and Chroot Package Managers. 2. smoke-chroot.lock.yml used a sparse checkout (.github/.agents only) but then runs npm ci && npm run build which needs the full repo. Adding actions/checkout to smoke-chroot.md fixes the tsc build failure. Fixes #529 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two issues introduced by recent agent-authored PRs: 1. PR #524 removed both HTTP_PROXY and HTTPS_PROXY from the agent container. While HTTP works via iptables DNAT to Squid's intercept port 3129, HTTPS requires the CONNECT method through Squid's forward-proxy port 3128 (ssl-bump). Restoring HTTPS_PROXY fixes Examples Test, Chroot Edge Cases, and Chroot Package Managers. 2. smoke-chroot.lock.yml used a sparse checkout (.github/.agents only) but then runs npm ci && npm run build which needs the full repo. Adding actions/checkout to smoke-chroot.md fixes the tsc build failure. Fixes #529 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reverts the following PRs which introduced unnecessary complexity: - #520: fix: enable Squid intercept mode for NAT-redirected traffic - v0.13.5 release: chore(release): bump version to 0.13.5 - #524: fix: remove HTTP_PROXY/HTTPS_PROXY env vars from agent container - #526: chore: recompile workflow lock files for AWF v0.13.5 - #527: fix: recompile lock files with release action mode - #522: fix: mount /etc/hosts in chroot and fix HTTP blocking test - #530: fix: restore HTTPS_PROXY, fix chroot hosts/permissions, fix Bun crash - v0.13.6 release: chore(release): bump version to 0.13.6 The intercept mode (#520) was introduced to fix Codex failing with HTTP_PROXY, but the simpler fix is to just not set HTTP_PROXY for Codex. The intercept mode introduced a cascade of breakage: - HTTPS can't be transparently intercepted (needs CONNECT method) - Image version bumps required lock file recompilation - host.docker.internal traffic crashed Squid under load - Multiple PRs needed to fix each regression This reverts to the pre-#520 explicit proxy mode (HTTP_PROXY/HTTPS_PROXY pointing to Squid port 3128) which worked for all engines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reverts the following PRs which introduced unnecessary complexity: - #520: fix: enable Squid intercept mode for NAT-redirected traffic - v0.13.5 release: chore(release): bump version to 0.13.5 - #524: fix: remove HTTP_PROXY/HTTPS_PROXY env vars from agent container - #526: chore: recompile workflow lock files for AWF v0.13.5 - #527: fix: recompile lock files with release action mode - #522: fix: mount /etc/hosts in chroot and fix HTTP blocking test - #530: fix: restore HTTPS_PROXY, fix chroot hosts/permissions, fix Bun crash - v0.13.6 release: chore(release): bump version to 0.13.6 The intercept mode (#520) was introduced to fix Codex failing with HTTP_PROXY, but the simpler fix is to just not set HTTP_PROXY for Codex. The intercept mode introduced a cascade of breakage: - HTTPS can't be transparently intercepted (needs CONNECT method) - Image version bumps required lock file recompilation - host.docker.internal traffic crashed Squid under load - Multiple PRs needed to fix each regression This reverts to the pre-#520 explicit proxy mode (HTTP_PROXY/HTTPS_PROXY pointing to Squid port 3128) which worked for all engines. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
HTTP_PROXY/HTTPS_PROXYenv vars from the agent container environment — intercept mode (iptables DNAT 80/443 → squid:3129) handles all routing transparentlyEXCLUDED_ENV_VARSto prevent host proxy settings leaking via--env-allentrypoint.shlogging to reflect intercept mode instead of unconditionally printing empty proxy varsProblem
Codex (Rust/reqwest) honors the
HTTP_PROXYenv var and attempts to connect to squid on port 3128. In intercept mode, port 3128 is not reachable from the agent container (only port 3129 via iptables DNAT), causing "Connection refused" errors. Copilot and Claude work fine because they don't useHTTP_PROXYthe same way.What does NOT change
SQUID_PROXY_HOST,SQUID_PROXY_PORT,SQUID_INTERCEPT_PORTenv vars remain (used bysetup-iptables.sh)--envoverride path still works for explicit proxy if neededTest plan
Fixes #523
🤖 Generated with Claude Code