|
@@ -202,19 +202,24 @@ class HomeController extends GetxController {
|
|
|
// controllers.global.updateMsg("内核没有启动...");
|
|
|
// return;
|
|
|
// }
|
|
|
- if(Platform.isWindows)
|
|
|
+ if(controllers.global.routeModesSelect.value == "tun")
|
|
|
{
|
|
|
- if(!await isRunningAsAdmin()){
|
|
|
- controllers.global.updateMsg("网卡模式需要管理模式运行...");
|
|
|
- return;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if(controllers.service.serviceMode.value == false){
|
|
|
- controllers.global.updateMsg("需要开启服务,才能使用...");
|
|
|
- return;
|
|
|
+ if(Platform.isWindows)
|
|
|
+ {
|
|
|
+
|
|
|
+ if(!await isRunningAsAdmin()){
|
|
|
+ controllers.global.updateMsg("网卡模式需要管理模式运行...");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if(controllers.service.serviceMode.value == false){
|
|
|
+ controllers.global.updateMsg("需要开启服务,才能使用...");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (controllers.global.allowStatusUpdate && connectStatus.value == ConnectionStatus.stopped || connectStatus.value == ConnectionStatus.connecting) {
|
|
|
controllers.global.updateMsg("当前连接状态未停止,不要多次启动...");
|
|
|
return;
|