diff --git a/src-tauri/src/cmds.rs b/src-tauri/src/cmds.rs
index 1f13a7c1beeb13d70751bf2b0f32fb0c77ef11ea..d2b0bab4f6d40e0e6dcece52378096d0ba8a0278 100644
--- a/src-tauri/src/cmds.rs
+++ b/src-tauri/src/cmds.rs
@@ -202,11 +202,13 @@ pub fn get_clash_info(clash_state: State<'_, ClashState>) -> Result<ClashInfo, S
 pub fn patch_clash_config(
   payload: Mapping,
   clash_state: State<'_, ClashState>,
+  verge_state: State<'_, VergeState>,
   profiles_state: State<'_, ProfilesState>,
 ) -> Result<(), String> {
   let mut clash = clash_state.0.lock().unwrap();
+  let mut verge = verge_state.0.lock().unwrap();
   let mut profiles = profiles_state.0.lock().unwrap();
-  clash.patch_config(payload, &mut profiles)
+  clash.patch_config(payload, &mut verge, &mut profiles)
 }
 
 /// get the system proxy
diff --git a/src-tauri/src/core/clash.rs b/src-tauri/src/core/clash.rs
index e212cbdb5a157c8db3b3a54a98c178a70763551d..8b74cc636541a8f6783416eb44eb88cfaaa8a06a 100644
--- a/src-tauri/src/core/clash.rs
+++ b/src-tauri/src/core/clash.rs
@@ -1,4 +1,4 @@
-use super::ProfilesConfig;
+use super::{ProfilesConfig, Verge};
 use crate::utils::{config, dirs};
 use serde::{Deserialize, Serialize};
 use serde_yaml::{Mapping, Value};
@@ -170,6 +170,7 @@ impl Clash {
   pub fn patch_config(
     &mut self,
     patch: Mapping,
+    verge: &mut Verge,
     profiles: &mut ProfilesConfig,
   ) -> Result<(), String> {
     for (key, value) in patch.iter() {
@@ -179,12 +180,25 @@ impl Clash {
       // restart the clash
       if key_str == "mixed-port" {
         self.restart_sidecar(profiles)?;
+
+        let port = if value.is_number() {
+          match value.as_i64().clone() {
+            Some(num) => Some(format!("{num}")),
+            None => None,
+          }
+        } else {
+          match value.as_str().clone() {
+            Some(num) => Some(num.into()),
+            None => None,
+          }
+        };
+        verge.init_sysproxy(port);
       }
 
       if self.config.contains_key(key) {
-        self.config[key] = value.clone();
+        self.config[key] = value;
       } else {
-        self.config.insert(key.clone(), value.clone());
+        self.config.insert(key.clone(), value);
       }
     }
     self.save_config()
diff --git a/src-tauri/src/core/verge.rs b/src-tauri/src/core/verge.rs
index eab6350ada13da51b826e047d03d83a7f0efc3a0..c75d406663399adfad40f9875cb6039c2a0dbec7 100644
--- a/src-tauri/src/core/verge.rs
+++ b/src-tauri/src/core/verge.rs
@@ -161,6 +161,24 @@ impl Verge {
     }
   }
 
+  // fn guard_thread(&mut self) -> Result<(), String> {
+  //   let sysproxy = self.cur_sysproxy.clone();
+
+  //   use std::{thread, time};
+  //   tauri::async_runtime::spawn(async move {
+  //     if let Some(sysproxy) = sysproxy {
+  //       sysproxy.set_sys();
+  //     }
+
+  //     let ten_millis = time::Duration::from_millis(10);
+  //     let now = time::Instant::now();
+
+  //     thread::sleep(ten_millis);
+  //   });
+
+  //   Ok(())
+  // }
+
   /// patch verge config
   /// There should be only one update at a time here
   /// so call the save_file at the end is savely