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

+4
View File
@@ -90,6 +90,10 @@ impl CursorHarness {
*self.inner.backend_addr.write() = Some(addr);
}
pub async fn proxy_port(&self) -> Option<u16> {
self.inner.proxy.lock().await.port()
}
pub async fn cleanup_stale_settings(&self) -> Result<()> {
settings::clear_stale_managed_settings()
}
+7
View File
@@ -33,6 +33,13 @@ impl ProxyRuntime {
pub fn url(&self) -> Option<String> {
self.running().then(|| self.url.clone()).flatten()
}
pub fn port(&self) -> Option<u16> {
if self.running() {
self.port
} else {
None
}
}
pub async fn start(
&mut self,