docs: Add proxy settings (#17797)

I'm not sure if I placed `Network Proxy` in the correct position. What I
noticed is that the first half of the documentation seems to be
organized alphabetically, but the second half is not. I tried to
position `Network Proxy` in a spot that seemed reasonable while
maintaining alphabetical order. If there's a better suggestion, I'd be
happy to make adjustments.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Junkui Zhang 2024-09-15 04:17:38 +08:00 committed by GitHub
parent 40a00fb224
commit d5268c5197
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1061,6 +1061,45 @@ The following settings can be overridden for each specific language:
These values take in the same options as the root-level settings with the same name.
## Network Proxy
- Description: Configure a network proxy for Zed.
- Setting: `proxy`
- Default: `null`
**Options**
The proxy setting must contain a URL to the proxy.
The following URI schemes are supported:
- `http`
- `https`
- `socks4`
- `socks4a`
- `socks5`
- `socks5h`
`http` will be used when no scheme is specified.
By default no proxy will be used, or Zed will attempt to retrieve proxy settings from environment variables, such as `http_proxy`, `HTTP_PROXY`, `https_proxy`, `HTTPS_PROXY`, `all_proxy`, `ALL_PROXY`.
For example, to set an `http` proxy, add the following to your settings:
```json
{
"proxy": "http://127.0.0.1:10809"
}
```
Or to set a `socks5` proxy:
```json
{
"proxy": "socks5://localhost:10808"
}
```
## Preview tabs
- Description: