Show clash ui when tun enabled (#9010)

This commit is contained in:
DHR60
2026-03-30 12:09:10 +00:00
committed by GitHub
parent 2caf8ea14f
commit 01c85adedf
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1432,7 +1432,7 @@ public static class ConfigHandler
else if (node.ConfigType == EConfigType.Custom
&& node.PreSocksPort is > 0 and <= 65535)
{
var preCoreType = AppManager.Instance.RunningCoreType = config.TunModeItem.EnableTun ? ECoreType.sing_box : ECoreType.Xray;
var preCoreType = config.TunModeItem.EnableTun ? ECoreType.sing_box : ECoreType.Xray;
itemSocks = new ProfileItem()
{
CoreType = preCoreType,
+4 -1
View File
@@ -90,6 +90,9 @@ public class CoreManager
await CoreStart(mainContext);
await CoreStartPreService(preContext);
AppManager.Instance.RunningCoreType = preContext?.RunCoreType ?? mainContext.RunCoreType;
if (_processService != null)
{
await UpdateFunc(true, $"{node.GetSummary()}");
@@ -172,7 +175,7 @@ public class CoreManager
private async Task CoreStart(CoreConfigContext context)
{
var node = context.Node;
var coreType = AppManager.Instance.RunningCoreType = AppManager.Instance.GetCoreType(node, node.ConfigType);
var coreType = AppManager.Instance.GetCoreType(node, node.ConfigType);
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType);
var displayLog = node.ConfigType != EConfigType.Custom || node.DisplayLog;