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:
leokun committed 2026-09-03 16:32:02 +08:00
1 parent 924b5e5926
commit 8942287a27
12 files changed
+179 -38

No files matched your search

+7
View File
@@ -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)