mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-12-01 01:05:10 +08:00
refactor(proxy): change proxy mode from "system" to "default" across the application
- Updated the default proxy mode in `api.ts`, `ProxySettingsCard.tsx`, and `SettingsPage.tsx` to "default". - Adjusted related translations in `catalog.json`, `en-US.json`, and `zh-CN.json`. - Modified the `ProxyMode` enum in `settings.rs` to reflect the change from "system" to "default". - Enhanced proxy handling in the server code to support the new default mode.
This commit is contained in:
1 parent
924b5e5926
commit
8942287a27
12 files changed
+179
-38
No files matched your search
@@ -683,6 +683,13 @@ impl ControlService {
|
||||
}
|
||||
|
||||
pub async fn set_proxy_settings(&self, settings: ProxySettingsInput) -> Result<ProxySettings> {
|
||||
if settings.mode.is_custom() {
|
||||
let local_proxy_port = match self.cursor_harness.proxy_port().await {
|
||||
Some(port) => port,
|
||||
None => self.store.port_settings().await?.proxy_port,
|
||||
};
|
||||
crate::network::reject_self_proxy(&settings.address, local_proxy_port)?;
|
||||
}
|
||||
let settings = self.store.set_proxy_settings(settings).await?;
|
||||
self.clients.invalidate().await;
|
||||
Ok(settings)
|
||||
|
||||
Reference in new issue
Block a user