Commit ffc1746
fix(proxy): add lowercase proxy vars and NODE_EXTRA_CA_CERTS (#1234)
* fix(proxy): add lowercase proxy vars and NODE_EXTRA_CA_CERTS
Yarn 4 (undici), Corepack, and some Node.js HTTP clients only check
lowercase http_proxy/https_proxy environment variables. This caused
EPROTO SSL errors when these tools tried to make HTTPS connections
through the Squid proxy.
- Add lowercase http_proxy/https_proxy alongside uppercase variants
- Set NODE_EXTRA_CA_CERTS when SSL Bump is enabled so Node.js trusts
the AWF session CA certificate
- Export NODE_EXTRA_CA_CERTS in entrypoint.sh for container context
- Add tests for lowercase proxy vars and NODE_EXTRA_CA_CERTS
Fixes #949
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(proxy): add NO_PROXY to api-proxy container for health check
The api-proxy container's curl health check was routing through Squid
because of the newly-added lowercase http_proxy/https_proxy env vars.
curl respects lowercase proxy vars, causing localhost health checks to
fail. Add NO_PROXY/no_proxy with localhost entries to prevent this.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove lowercase http_proxy to prevent HTTP forward-proxy bypass
Some curl builds (Ubuntu 22.04) ignore uppercase HTTP_PROXY for HTTP
URLs as an httpoxy mitigation. This means HTTP traffic correctly falls
through to iptables DNAT interception where Squid blocks at the
connection level. Setting lowercase http_proxy causes curl to use the
forward proxy, where Squid's 403 error page returns exit code 0 —
breaking security expectations.
Only https_proxy (lowercase) is needed for Yarn 4/undici/Corepack
compatibility since these tools connect to registries via HTTPS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d964ac2 commit ffc1746
File tree
3 files changed
+58
-0
lines changed- containers/agent
- src
3 files changed
+58
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
514 | 553 | | |
515 | 554 | | |
516 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
| |||
727 | 734 | | |
728 | 735 | | |
729 | 736 | | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
730 | 741 | | |
731 | 742 | | |
732 | 743 | | |
| |||
1043 | 1054 | | |
1044 | 1055 | | |
1045 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1046 | 1061 | | |
1047 | 1062 | | |
1048 | 1063 | | |
| |||
0 commit comments