Revert "fix: improve Service connection method and permissions for Windows and Unix"

This reverts commit 601e99f0b5.

Revert "refactor: clash-verge-rev-service-ipc (#4841)"

This reverts commit 5370bd45ed.
This commit is contained in:
Tunglies
2025-10-11 21:21:01 +08:00
parent 121b8c433b
commit 4f1d61a56e
16 changed files with 772 additions and 540 deletions

View File

@@ -3,11 +3,7 @@ use anyhow::Result;
use crate::{
config::Config,
core::{
CoreManager, Timer, handle,
hotkey::Hotkey,
service::{SERVICE_MANAGER, ServiceManager, is_service_ipc_path_exists},
sysopt,
tray::Tray,
CoreManager, Timer, handle, hotkey::Hotkey, service::SERVICE_MANAGER, sysopt, tray::Tray,
},
logging, logging_error,
module::lightweight::{auto_lightweight_mode_init, run_once_auto_lightweight},
@@ -50,7 +46,7 @@ pub fn resolve_setup_async() {
"Version: {}",
env!("CARGO_PKG_VERSION")
);
futures::join!(init_service_manager());
init_service_manager().await;
futures::join!(
init_work_config(),
@@ -193,18 +189,7 @@ pub(super) async fn init_verge_config() {
pub(super) async fn init_service_manager() {
logging!(info, Type::Setup, "Initializing service manager...");
clash_verge_service_ipc::set_config(ServiceManager::config()).await;
if !is_service_ipc_path_exists() {
logging!(
warn,
Type::Setup,
"Service IPC path does not exist, service may be unavailable"
);
return;
}
if SERVICE_MANAGER.lock().await.init().await.is_ok() {
logging_error!(Type::Setup, SERVICE_MANAGER.lock().await.refresh().await);
}
logging_error!(Type::Setup, SERVICE_MANAGER.lock().await.refresh().await);
}
pub(super) async fn init_core_manager() {