-
Notifications
You must be signed in to change notification settings - Fork 10
fix: add api-proxy IP to squid allowlist #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1147,9 +1147,10 @@ export async function writeConfigs(config: WrapperConfig): Promise<void> { | |
|
|
||
| // Write Squid config | ||
| // Note: Use container path for SSL database since it's mounted at /var/spool/squid_ssl_db | ||
| // When API proxy is enabled and has API keys, add api-proxy to allowed domains so agent can communicate with it | ||
| // When API proxy is enabled and has API keys, add api-proxy hostname and IP to allowed domains so agent can communicate with it | ||
| // The IP address is necessary because some tools may bypass NO_PROXY settings or use the IP directly | ||
| const domainsForSquid = config.enableApiProxy && networkConfig.proxyIp && (config.openaiApiKey || config.anthropicApiKey) | ||
| ? [...config.allowedDomains, 'api-proxy'] | ||
| ? [...config.allowedDomains, 'api-proxy', networkConfig.proxyIp] | ||
|
||
| : config.allowedDomains; | ||
|
|
||
| const squidConfig = generateSquidConfig({ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test verifies that the IP address '172.30.0.30' appears in the Squid config, but it doesn't verify that the IP is correctly formatted for Squid ACLs. Squid's dstdomain ACL type does not match IP addresses - only domain names. IP addresses require the 'dst' ACL type. The test should verify that the IP appears in a 'dst' ACL, not a 'dstdomain' ACL, or alternatively verify that the IP is NOT added if the design is to rely solely on NO_PROXY for direct connections.