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
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user