Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

acp: Add NO_PROXY if not set otherwise to not proxy localhost urls (#39100)

Ben Brandtbad96776cd2c
diff --git a/crates/agent_servers/src/agent_servers.rs b/crates/agent_servers/src/agent_servers.rs
index b9751d7f630..af95fdfa4cd 100644
--- a/crates/agent_servers/src/agent_servers.rs
+++ b/crates/agent_servers/src/agent_servers.rs
@@ -99,6 +99,9 @@ pub fn load_proxy_env(cx: &mut App) -> HashMap<String, String> {
if let Some(no_proxy) = read_no_proxy_from_env() {
env.insert("NO_PROXY".to_owned(), no_proxy);
+ } else if proxy_url.is_some() {
+ // We sometimes need local MCP servers that we don't want to proxy
+ env.insert("NO_PROXY".to_owned(), "localhost,127.0.0.1".to_owned());
}
env