mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:13:44 +08:00
* fixup! feat: Service Mode for Linux (#804) * fixup! feat: Service Mode for Linux (#804) * Partially revert "fixup! feat: Service Mode for Linux (#804)" This reverts commit e6a5a2b4961dba4e891b1b62d6f35db4ca9ee5ce.
This commit is contained in:
parent
e95808e6be
commit
98536250bd
@ -185,22 +185,14 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
|||||||
let tun_tray_icon = patch.tun_tray_icon;
|
let tun_tray_icon = patch.tun_tray_icon;
|
||||||
|
|
||||||
match {
|
match {
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
let service_mode = patch.enable_service_mode;
|
||||||
{
|
|
||||||
let service_mode = patch.enable_service_mode;
|
|
||||||
|
|
||||||
if service_mode.is_some() {
|
if service_mode.is_some() {
|
||||||
log::debug!(target: "app", "change service mode to {}", service_mode.unwrap());
|
log::debug!(target: "app", "change service mode to {}", service_mode.unwrap());
|
||||||
|
|
||||||
Config::generate()?;
|
Config::generate()?;
|
||||||
CoreManager::global().run_core().await?;
|
CoreManager::global().run_core().await?;
|
||||||
} else if tun_mode.is_some() {
|
} else if tun_mode.is_some() {
|
||||||
update_core_config().await?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
|
||||||
if tun_mode.is_some() {
|
|
||||||
update_core_config().await?;
|
update_core_config().await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user