|
@@ -5,6 +5,7 @@ import 'package:get/get.dart';
|
|
|
import 'package:naiyouwl/app/common/constants.dart';
|
|
|
import 'package:naiyouwl/app/controller/GlobalController.dart';
|
|
|
import 'package:naiyouwl/app/controller/controllers.dart';
|
|
|
+import 'package:naiyouwl/app/utils/shell.dart';
|
|
|
import 'package:naiyouwl/app/utils/utils.dart';
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
import '../../../common/LogHelper.dart';
|
|
@@ -107,7 +108,11 @@ class HomeController extends GetxController {
|
|
|
controllers.config.clashCoreTunEnable.value = true;
|
|
|
controllers.global.startTunMode();
|
|
|
if(controllers.service.serviceMode.value == false){
|
|
|
- await controllers.service.serviceModeSwitch(true);
|
|
|
+ if(!await isRunningAsAdmin()){
|
|
|
+ controllers.global.updateMsg("网卡模式需要管理模式运行...");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //await controllers.service.serviceModeSwitch(true);
|
|
|
serviceStuatus.value = true;
|
|
|
}
|
|
|
|