refactor(proxy): enhance proxy state management and refresh logic

This commit is contained in:
Tunglies
2025-06-05 20:10:28 +08:00
parent 44f085604a
commit 80f550d67e
5 changed files with 45 additions and 84 deletions

View File

@@ -1,6 +1,7 @@
pub struct CmdProxyState {
pub last_refresh_time: std::time::Instant,
pub need_refresh: bool,
pub proxies: serde_json::Value,
pub providers_proxies: serde_json::Value,
}
@@ -9,6 +10,7 @@ impl Default for CmdProxyState {
Self {
last_refresh_time: std::time::Instant::now(),
need_refresh: true,
proxies: serde_json::Value::Null,
providers_proxies: serde_json::Value::Null,
}
}