|
@@ -25,6 +25,7 @@ class ConnectionService {
|
|
updateStatus(ConnectionStatus.connecting);
|
|
updateStatus(ConnectionStatus.connecting);
|
|
globalController.updateMsg("正在启动连接...");
|
|
globalController.updateMsg("正在启动连接...");
|
|
await globalController.updateNode();
|
|
await globalController.updateNode();
|
|
|
|
+ await controllers.cc_service.reloadClashCore();
|
|
await globalController.swift(globalController.selectedNode.value?.name ?? "");
|
|
await globalController.swift(globalController.selectedNode.value?.name ?? "");
|
|
// 等待连接建立
|
|
// 等待连接建立
|
|
await Future.delayed(Duration(seconds: 2));
|
|
await Future.delayed(Duration(seconds: 2));
|
|
@@ -39,6 +40,7 @@ class ConnectionService {
|
|
updateStatus(ConnectionStatus.connecting);
|
|
updateStatus(ConnectionStatus.connecting);
|
|
globalController.updateMsg("正在启动连接...");
|
|
globalController.updateMsg("正在启动连接...");
|
|
await globalController.updateNode();
|
|
await globalController.updateNode();
|
|
|
|
+ await controllers.cc_service.reloadClashCore();
|
|
await globalController.swift(globalController.selectedNode.value?.name ?? "");
|
|
await globalController.swift(globalController.selectedNode.value?.name ?? "");
|
|
// 等待连接建立
|
|
// 等待连接建立
|
|
await Future.delayed(Duration(seconds: 2));
|
|
await Future.delayed(Duration(seconds: 2));
|
|
@@ -179,7 +181,7 @@ class ConnectionService {
|
|
|
|
|
|
} 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 {
|
|
@@ -189,7 +191,7 @@ 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();
|
|
await proxyManager.stopProxy();
|
|
await proxyManager.stopProxy();
|
|
// await globalController.closeProxy();
|
|
// await globalController.closeProxy();
|