Skip to content
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

Add a http_proxy setting #5032

Closed
1 task done
TENX-S opened this issue Jan 23, 2023 · 4 comments · Fixed by #11852
Closed
1 task done

Add a http_proxy setting #5032

TENX-S opened this issue Jan 23, 2023 · 4 comments · Fixed by #11852
Labels
enhancement [core label] setting Feedback for preferences, configuration, etc

Comments

@TENX-S
Copy link
Contributor

TENX-S commented Jan 23, 2023

Check for existing issues

  • 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:

image

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@TENX-S TENX-S added enhancement [core label] triage Maintainer needs to classify the issue labels Jan 23, 2023
@JosephTLyons JosephTLyons added setting Feedback for preferences, configuration, etc and removed triage Maintainer needs to classify the issue labels Jan 31, 2023
@JosephTLyons JosephTLyons added the language server failure Language server doesn't work as expected label Apr 7, 2023
@ForLoveOfCats ForLoveOfCats removed the language server failure Language server doesn't work as expected label Apr 10, 2023
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@Banyc
Copy link

Banyc commented Jan 25, 2024

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.

@smallfish
Copy link

try to start zed with command line:

cd /Applications/Zed.app/Contents/MacOS
export http_proxy=xxx
export https_proxy=yyy
zed

@seven1240
Copy link

It doesn't seems to work with OpenAI API, is there any recommended way to use a proxy with OpenAI API ?

@crazybits
Copy link

i am using zed behind proxy, tired all workarounds above does not solve my issue, assistant still nothing response,

osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this issue May 18, 2024
Adding `proxy` keyword to configure proxy while using zed. After setting
the proxy, restart Zed to acctually use the proxy.

Example setting: 
```rust
"proxy" = "socks5://localhost:10808"
"proxy" = "http://127.0.0.1:10809"
```

Closes zed-industries#9424, closes zed-industries#9422, closes zed-industries#8650, closes zed-industries#5032, closes zed-industries#6701,
closes zed-industries#11890

Release Notes:

- Added settings to configure proxy in Zed

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] setting Feedback for preferences, configuration, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants