zed
zed copied to clipboard
Support for NO_PROXY (proxy exceptions)
Check for existing issues
- [X] Completed
Describe the feature
I am currently behind a proxy and need to configure and use http_proxy and https_proxy. However, when I attempt to run ollama on an internal server (e.g., 10.xx.yyy.zz:11434), the connection fails. If I disable the proxy, the assistant can connect to the internal server, but I lose access to external resources (such as downloads etc.). I believe this issue could be resolved by setting a no_proxy configuration.
Zed Version and System Specs
Zed: v0.169.0 (Zed Dev d67f2d3eab35fbe385698acdc7a0ca9ddf122175) OS: Windows 10.0.22631 Memory: 31.7 GiB Architecture: x86_64 GPU: Intel(R) Iris(R) Xe Graphics || Intel Corporation || 101.5972
If applicable, add mockups / screenshots to help present your vision of the feature
No response
This makes sense. Different implementations support NO_PROXY differently, I think where possible we should try and match the behavior of curl.
NO_PROXY="localhost,127.0.0.1"-- Note IPs will only match if they are used in the url instead of a hostname.NO_PROXY="zed.dev"-- Suffix match supported so api.zed.dev, www.zed.dev and zed.dev would all skip proxy.NO_PROXY="*"-- IgnoresHTTP_PROXYfor all hosts (maybe we don't support *?)
Missing this feature makes it impossible to use local ollama (or any other services running in both localhost or local network) if you are behind the proxy.
just ran into this today. trying to connect to ollama is going through my corporate proxy even though my no_proxy env variable is set.
2025-06-03T17:10:17-06:00 DEBUG [reqwest::connect] starting new connection: http://localhost:11434/
2025-06-03T17:10:17-06:00 DEBUG [reqwest::connect] proxy(http://**********) intercepts 'http://localhost:11434/'
2025-06-03T17:10:17-06:00 DEBUG [hyper_util::client::legacy::connect::dns] resolve; host=********
2025-06-03T17:10:17-06:00 DEBUG [hyper_util::client::legacy::connect::http] connecting to *******
2025-06-03T17:10:17-06:00 DEBUG [hyper_util::client::legacy::connect::http] connected to ********
2025-06-03T17:10:17-06:00 DEBUG [hyper_util::client::legacy::client] client connection error: error shutting down connection
2025-06-03T17:10:17-06:00 ERROR [language_models] Failed to connect to Ollama API: 403 Forbidden Explicit proxy to non-unicast IP address forbidden.
also noting that if i clear out my environment variables ollama does work, but i can't receive updates or download extensions