agent_servers: Set proxy env for all ACP agents (#38247)

- Use ProxySettings::proxy_url to read from settings or env 
- Export HTTP(S)_PROXY and NO_PROXY for agent CLIs 
- Add read_no_proxy_from_env and move parsing from main

Closes https://github.com/zed-industries/claude-code-acp/issues/46

Release Notes:

- acp: Pass proxy settings through to all ACP agents
This commit is contained in:
Ben Brandt
2025-09-16 10:18:10 +00:00
committed by GitHub
parent f321d02207
commit c0710fa8ca
9 changed files with 62 additions and 35 deletions
+6
View File
@@ -318,6 +318,12 @@ pub fn read_proxy_from_env() -> Option<Url> {
.and_then(|env| env.parse().ok())
}
pub fn read_no_proxy_from_env() -> Option<String> {
const ENV_VARS: &[&str] = &["NO_PROXY", "no_proxy"];
ENV_VARS.iter().find_map(|var| std::env::var(var).ok())
}
pub struct BlockedHttpClient;
impl BlockedHttpClient {