cksl 9 months ago
parent
commit
daa335c56d

+ 16 - 12
lib/app/controller/config.dart

@@ -170,21 +170,25 @@ dns:
   enable: $dnsEnab
   enable: $dnsEnab
   listen: :$dnsPort
   listen: :$dnsPort
   ipv6: false
   ipv6: false
-  enhanced-mode: redir-host
-  # fake-ip-range: 28.0.0.1/8
-  # fake-ip-filter:
-  #   - '*'
-  #   - '+.lan'
-  default-nameserver:
-    - 119.29.29.29
-    - 223.5.5.5
+  enhanced-mode: fake-ip
+  fake-ip-filter:
+    - "*"
+    - "+.lan"
+    - "+.local"
+    - "+.market.xiaomi.com"
   nameserver:
   nameserver:
-    - 'tls://8.8.4.4#proxy'
-    - 'https://1.0.0.1/dns-query#proxy'
+    - https://120.53.53.53/dns-query
+    - https://223.5.5.5/dns-query
   proxy-server-nameserver:
   proxy-server-nameserver:
-    - tls://223.5.5.5
+    - https://120.53.53.53/dns-query
+    - https://223.5.5.5/dns-query
   nameserver-policy:
   nameserver-policy:
-    "geosite:cn": [tls://119.29.29.29, tls://223.5.5.5]
+    "geosite:cn,private":
+      - https://120.53.53.53/dns-query
+      - https://223.5.5.5/dns-query
+    "geosite:geolocation-!cn":
+      - "https://dns.cloudflare.com/dns-query"
+      - "https://dns.google/dns-query"
     
     
 tun:
 tun:
   enable: ${clashCoreTunEnable.value}
   enable: ${clashCoreTunEnable.value}

+ 2 - 8
lib/app/modules/home/views/home_view.dart

@@ -181,8 +181,7 @@ class HomeView extends GetView<HomeController> {
                         controller.RouteNode();
                         controller.RouteNode();
                       },
                       },
                       style: ElevatedButton.styleFrom(
                       style: ElevatedButton.styleFrom(
-                        primary: Colors.white, // 设置背景颜色为白色
-                        onPrimary: Colors.black, // 设置文字颜色为黑色,确保在白色背景上可见
+                        foregroundColor: Colors.black, backgroundColor: Colors.white, // 设置文字颜色为黑色,确保在白色背景上可见
                         shape: RoundedRectangleBorder(
                         shape: RoundedRectangleBorder(
                           borderRadius: BorderRadius.circular(20), // 设置圆角
                           borderRadius: BorderRadius.circular(20), // 设置圆角
                         ),
                         ),
@@ -306,12 +305,7 @@ class _UserStatusWidgetState extends State<UserStatusWidget> {
                       ),
                       ),
                     ),
                     ),
                     const SizedBox(width: 2,),
                     const SizedBox(width: 2,),
-                    Image(
-                      image: AssetImage(imagePath),
-                      width: 70,
-                      height: 30,
-                    ),
-                    const SizedBox(width: 5,),
+
                     IconButton(
                     IconButton(
                       tooltip: '刷新账号状态',
                       tooltip: '刷新账号状态',
                       icon: widget.isLoading
                       icon: widget.isLoading

+ 2 - 2
lib/main.dart

@@ -8,7 +8,7 @@ import 'package:dart_json_mapper/dart_json_mapper.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_localizations/flutter_localizations.dart';
 import 'package:flutter_localizations/flutter_localizations.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
-import 'package:kommon/tool/sp_util.dart';
+
 import 'package:naiyouwl/app/controller/dialog.dart';
 import 'package:naiyouwl/app/controller/dialog.dart';
 import 'package:naiyouwl/app/i18n/i18n.dart';
 import 'package:naiyouwl/app/i18n/i18n.dart';
 import 'package:naiyouwl/app/controller/GlobalController.dart';
 import 'package:naiyouwl/app/controller/GlobalController.dart';
@@ -100,7 +100,7 @@ Future<void> initWindow() async {
 
 
 
 
 Future<void> initAppService() async {
 Future<void> initAppService() async {
-  await SpUtil.getInstance();
+  //await SpUtil.getInstance();
   // var ach = await MethodChannel('app.channel.shared.data');
   // var ach = await MethodChannel('app.channel.shared.data');
   // if (ach == "arm64"){
   // if (ach == "arm64"){
   //
   //

+ 0 - 4
linux/flutter/generated_plugin_registrant.cc

@@ -6,7 +6,6 @@
 
 
 #include "generated_plugin_registrant.h"
 #include "generated_plugin_registrant.h"
 
 
-#include <file_selector_linux/file_selector_plugin.h>
 #include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
 #include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
 #include <proxy_manager/proxy_manager_plugin.h>
 #include <proxy_manager/proxy_manager_plugin.h>
 #include <screen_retriever/screen_retriever_plugin.h>
 #include <screen_retriever/screen_retriever_plugin.h>
@@ -15,9 +14,6 @@
 #include <window_manager/window_manager_plugin.h>
 #include <window_manager/window_manager_plugin.h>
 
 
 void fl_register_plugins(FlPluginRegistry* registry) {
 void fl_register_plugins(FlPluginRegistry* registry) {
-  g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
-      fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
-  file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
   g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
   g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
       fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
       fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
   flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
   flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);

+ 0 - 1
linux/flutter/generated_plugins.cmake

@@ -3,7 +3,6 @@
 #
 #
 
 
 list(APPEND FLUTTER_PLUGIN_LIST
 list(APPEND FLUTTER_PLUGIN_LIST
-  file_selector_linux
   flutter_secure_storage_linux
   flutter_secure_storage_linux
   proxy_manager
   proxy_manager
   screen_retriever
   screen_retriever

+ 0 - 4
macos/Flutter/GeneratedPluginRegistrant.swift

@@ -6,14 +6,12 @@ import FlutterMacOS
 import Foundation
 import Foundation
 
 
 import connectivity_plus_macos
 import connectivity_plus_macos
-import file_selector_macos
 import flutter_secure_storage_macos
 import flutter_secure_storage_macos
 import path_provider_foundation
 import path_provider_foundation
 import protocol_handler
 import protocol_handler
 import proxy_manager
 import proxy_manager
 import screen_retriever
 import screen_retriever
 import shared_preferences_foundation
 import shared_preferences_foundation
-import sqflite
 import tray_manager
 import tray_manager
 import url_launcher_macos
 import url_launcher_macos
 import window_manager
 import window_manager
@@ -21,14 +19,12 @@ import wl_base_help
 
 
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
   ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
   ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
-  FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
   FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))
   FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))
   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
   ProtocolHandlerPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerPlugin"))
   ProtocolHandlerPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerPlugin"))
   ProxyManagerPlugin.register(with: registry.registrar(forPlugin: "ProxyManagerPlugin"))
   ProxyManagerPlugin.register(with: registry.registrar(forPlugin: "ProxyManagerPlugin"))
   ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
   ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
   SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
   SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
-  SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
   TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin"))
   TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin"))
   UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
   UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
   WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
   WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))

File diff suppressed because it is too large
+ 100 - 503
pubspec.lock


+ 2 - 3
pubspec.yaml

@@ -19,7 +19,6 @@ dependencies:
   http: ^1.1.0
   http: ^1.1.0
   provider: ^6.0.5
   provider: ^6.0.5
   logger: ^2.0.2+1
   logger: ^2.0.2+1
-  intl: ^0.18.1
   get: 4.6.6
   get: 4.6.6
   flutter: 
   flutter: 
     sdk: flutter
     sdk: flutter
@@ -28,15 +27,15 @@ dependencies:
   dio: ^4.0.6
   dio: ^4.0.6
   connectivity_plus: ^2.3.6
   connectivity_plus: ^2.3.6
   flutter_secure_storage: ^5.0.2
   flutter_secure_storage: ^5.0.2
-  ffi: ^2.0.1
+  sp_util: ^2.0.3
   dart_json_mapper: ^2.2.7
   dart_json_mapper: ^2.2.7
   url_launcher: ^6.1.11
   url_launcher: ^6.1.11
   path_provider: ^2.0.11
   path_provider: ^2.0.11
-  kommon: ^0.4.1
   bot_toast: ^4.1.3
   bot_toast: ^4.1.3
   protocol_handler: ^0.1.2
   protocol_handler: ^0.1.2
   wl_base_help:
   wl_base_help:
     path: ../wl_base_help
     path: ../wl_base_help
+  archive: ^3.6.1
 
 
 
 
 dev_dependencies:
 dev_dependencies:

+ 6 - 1
windows/flutter/CMakeLists.txt

@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
 # https://github.com/flutter/flutter/issues/57146.
 # https://github.com/flutter/flutter/issues/57146.
 set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
 set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
 
 
+# Set fallback configurations for older versions of the flutter tool.
+if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
+  set(FLUTTER_TARGET_PLATFORM "windows-x64")
+endif()
+
 # === Flutter Library ===
 # === Flutter Library ===
 set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
 set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
 
 
@@ -92,7 +97,7 @@ add_custom_command(
   COMMAND ${CMAKE_COMMAND} -E env
   COMMAND ${CMAKE_COMMAND} -E env
     ${FLUTTER_TOOL_ENVIRONMENT}
     ${FLUTTER_TOOL_ENVIRONMENT}
     "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
     "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
-      windows-x64 $<CONFIG>
+      ${FLUTTER_TARGET_PLATFORM} $<CONFIG>
   VERBATIM
   VERBATIM
 )
 )
 add_custom_target(flutter_assemble DEPENDS
 add_custom_target(flutter_assemble DEPENDS

+ 0 - 6
windows/flutter/generated_plugin_registrant.cc

@@ -7,9 +7,7 @@
 #include "generated_plugin_registrant.h"
 #include "generated_plugin_registrant.h"
 
 
 #include <connectivity_plus_windows/connectivity_plus_windows_plugin.h>
 #include <connectivity_plus_windows/connectivity_plus_windows_plugin.h>
-#include <file_selector_windows/file_selector_windows.h>
 #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
 #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
-#include <permission_handler_windows/permission_handler_windows_plugin.h>
 #include <protocol_handler/protocol_handler_plugin.h>
 #include <protocol_handler/protocol_handler_plugin.h>
 #include <proxy_manager/proxy_manager_plugin.h>
 #include <proxy_manager/proxy_manager_plugin.h>
 #include <screen_retriever/screen_retriever_plugin.h>
 #include <screen_retriever/screen_retriever_plugin.h>
@@ -21,12 +19,8 @@
 void RegisterPlugins(flutter::PluginRegistry* registry) {
 void RegisterPlugins(flutter::PluginRegistry* registry) {
   ConnectivityPlusWindowsPluginRegisterWithRegistrar(
   ConnectivityPlusWindowsPluginRegisterWithRegistrar(
       registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
       registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
-  FileSelectorWindowsRegisterWithRegistrar(
-      registry->GetRegistrarForPlugin("FileSelectorWindows"));
   FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
   FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
       registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
       registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
-  PermissionHandlerWindowsPluginRegisterWithRegistrar(
-      registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
   ProtocolHandlerPluginRegisterWithRegistrar(
   ProtocolHandlerPluginRegisterWithRegistrar(
       registry->GetRegistrarForPlugin("ProtocolHandlerPlugin"));
       registry->GetRegistrarForPlugin("ProtocolHandlerPlugin"));
   ProxyManagerPluginRegisterWithRegistrar(
   ProxyManagerPluginRegisterWithRegistrar(

+ 0 - 2
windows/flutter/generated_plugins.cmake

@@ -4,9 +4,7 @@
 
 
 list(APPEND FLUTTER_PLUGIN_LIST
 list(APPEND FLUTTER_PLUGIN_LIST
   connectivity_plus_windows
   connectivity_plus_windows
-  file_selector_windows
   flutter_secure_storage_windows
   flutter_secure_storage_windows
-  permission_handler_windows
   protocol_handler
   protocol_handler
   proxy_manager
   proxy_manager
   screen_retriever
   screen_retriever

Some files were not shown because too many files changed in this diff