alroyso 3 months ago
parent
commit
8ff7846f5e
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lib/app/service/connection_service.dart

+ 5 - 5
lib/app/service/connection_service.dart

@@ -162,12 +162,12 @@ class ConnectionService {
 
 
       if(Platform.isMacOS){
       if(Platform.isMacOS){
         if (serviceController.serviceIsRuning) {
         if (serviceController.serviceIsRuning) {
-          await serviceController.stopClash();
+          //await serviceController.stopClash();
           await serviceController.fetchSetProxyStop();
           await serviceController.fetchSetProxyStop();
 
 
         } else {
         } else {
           if (controllers.service.clashServiceIsRuning){
           if (controllers.service.clashServiceIsRuning){
-            await controllers.service.stopClash();
+            //await controllers.service.stopClash();
             await globalController.closeProxy();
             await globalController.closeProxy();
             globalController.updateMsg("内核已重新加载");
             globalController.updateMsg("内核已重新加载");
           } else {
           } else {
@@ -177,10 +177,10 @@ class ConnectionService {
         }
         }
       } else{
       } else{
         if (controllers.service.clashServiceIsRuning){
         if (controllers.service.clashServiceIsRuning){
-          await controllers.service.stopClash();
+          //await controllers.service.stopClash();
           final proxyManager = WlBaseHelp();
           final proxyManager = WlBaseHelp();
-          proxyManager.stopProxy();
-          await globalController.closeProxy();
+          await proxyManager.stopProxy();
+          // await globalController.closeProxy();
           globalController.updateMsg("内核已重新加载");
           globalController.updateMsg("内核已重新加载");
         } else {
         } else {
           globalController.updateMsg("内核启动失败");
           globalController.updateMsg("内核启动失败");