alroyso 1 month ago
parent
commit
966935d3e6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/app/controller/GlobalController.dart

+ 6 - 0
lib/app/controller/GlobalController.dart

@@ -99,6 +99,12 @@ class GlobalController extends GetxController {
           await controllers.config.initConfig();
         }
         
+        // 确保初始配置文件存在
+        final initProxyConfig = File(path.join(Paths.config.path, Files.makeInitProxyConfig.path));
+        if (!await initProxyConfig.exists()) {
+          await controllers.service.makeInitConfig();
+        }
+        
         if (Platform.isWindows) {
           await controllers.service.startClashCore();
         } else if (Platform.isMacOS) {