zed
zed copied to clipboard
Add a `http_proxy` setting
Check for existing issues
- [X] Completed
Describe the feature
FYI, programmers in China face restrictions from the Great Firewall(GFW) and require a VPN service to access the internet freely. When I launch Zed, it automatically downloads the LSP server, which is blocked by the GFW and fails to complete. Therefore, I need to set the http_proxy env variable in a terminal session and open Zed using the CLI.
It would be very helpful if there were settings related to http_proxy. Take VS Code as an example:
If applicable, add mockups / screenshots to help present your vision of the feature
No response
This project uses isahc = { version = "1.7.2", default-features = false, features = ["static-curl", "text-decoding"] } which respects both https_proxy and http_proxy. To let the app be aware of this, you should follow the macOS mechanism by setting env like this:
launchctl setenv https_proxy http://address
launchctl setenv http_proxy http://address
Now you can access the Internet.
Additional
I found this to be a quick helpful reference to explicitly tell isahc what proxy to use: https://github.com/sagebind/isahc/pull/167/files.
try to start zed with command line:
cd /Applications/Zed.app/Contents/MacOS
export http_proxy=xxx
export https_proxy=yyy
zed
It doesn't seems to work with OpenAI API, is there any recommended way to use a proxy with OpenAI API ?
i am using zed behind proxy, tired all workarounds above does not solve my issue, assistant still nothing response,