Add basic proxy settings (#11852)
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 #9424, closes #9422, closes #8650, closes #5032, closes #6701, closes #11890 Release Notes: - Added settings to configure proxy in Zed --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
This commit is contained in:
parent
90b631ff3e
commit
1b261608c6
8 changed files with 110 additions and 20 deletions
|
@ -115,7 +115,7 @@ impl App {
|
|||
Self(AppContext::new(
|
||||
current_platform(),
|
||||
Arc::new(()),
|
||||
http::client(),
|
||||
http::client(None),
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -651,6 +651,11 @@ impl AppContext {
|
|||
self.platform.local_timezone()
|
||||
}
|
||||
|
||||
/// Updates the http client assigned to GPUI
|
||||
pub fn update_http_client(&mut self, new_client: Arc<dyn HttpClient>) {
|
||||
self.http_client = new_client;
|
||||
}
|
||||
|
||||
/// Returns the http client assigned to GPUI
|
||||
pub fn http_client(&self) -> Arc<dyn HttpClient> {
|
||||
self.http_client.clone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue