refactor: migrate proxy setting guard to sysproxy-rs crate (#5287)

* Refactor proxy management: Remove EventDrivenProxyManager and async_proxy_query

- Removed the EventDrivenProxyManager and its related event-driven proxy management logic.
- Replaced usages of AsyncProxyQuery with direct calls to sysproxy for fetching system and auto proxy configurations.
- Cleaned up constants by removing unused default proxy host.
- Updated sysopt to eliminate calls to the removed EventDrivenProxyManager.
- Adjusted logging and proxy state management to reflect the removal of event-driven architecture.
- Simplified the core module structure by removing unnecessary module imports.

* refactor: remove bypass module for cleaner network configuration

* feat: update sysproxy to version 0.4.0 and add guard feature; refactor sysopt for improved proxy management

* feat(windows/sysproxy): unify guard-type handling and auto-restore drift

* refactor(config): remove commented-out code for SysProxy update flag

---------

Co-authored-by: Slinetrac <realakayuki@gmail.com>
This commit is contained in:
Tunglies
2025-11-15 20:51:36 +08:00
committed by GitHub
co-authored by Slinetrac
parent e021e45e9a
commit 8654bad6b0
12 changed files with 132 additions and 1198 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ pub fn resolve_setup_async() {
init_service_manager().await;
init_core_manager().await;
init_system_proxy().await;
AsyncHandler::spawn_blocking(init_system_proxy_guard);
init_system_proxy_guard().await;
});
let tray_init = async {
@@ -173,8 +173,8 @@ pub(super) async fn init_system_proxy() {
);
}
pub(super) fn init_system_proxy_guard() {
sysopt::Sysopt::global().init_guard_sysproxy();
pub(super) async fn init_system_proxy_guard() {
sysopt::Sysopt::global().refresh_guard().await;
}
pub(super) async fn refresh_tray_menu() {