mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-14 19:45:45 +00:00
Show clash ui when tun enabled (#9010)
This commit is contained in:
parent
2caf8ea14f
commit
01c85adedf
2 changed files with 5 additions and 2 deletions
|
|
@ -1432,7 +1432,7 @@ public static class ConfigHandler
|
||||||
else if (node.ConfigType == EConfigType.Custom
|
else if (node.ConfigType == EConfigType.Custom
|
||||||
&& node.PreSocksPort is > 0 and <= 65535)
|
&& 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()
|
itemSocks = new ProfileItem()
|
||||||
{
|
{
|
||||||
CoreType = preCoreType,
|
CoreType = preCoreType,
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,9 @@ public class CoreManager
|
||||||
|
|
||||||
await CoreStart(mainContext);
|
await CoreStart(mainContext);
|
||||||
await CoreStartPreService(preContext);
|
await CoreStartPreService(preContext);
|
||||||
|
|
||||||
|
AppManager.Instance.RunningCoreType = preContext?.RunCoreType ?? mainContext.RunCoreType;
|
||||||
|
|
||||||
if (_processService != null)
|
if (_processService != null)
|
||||||
{
|
{
|
||||||
await UpdateFunc(true, $"{node.GetSummary()}");
|
await UpdateFunc(true, $"{node.GetSummary()}");
|
||||||
|
|
@ -172,7 +175,7 @@ public class CoreManager
|
||||||
private async Task CoreStart(CoreConfigContext context)
|
private async Task CoreStart(CoreConfigContext context)
|
||||||
{
|
{
|
||||||
var node = context.Node;
|
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 coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType);
|
||||||
|
|
||||||
var displayLog = node.ConfigType != EConfigType.Custom || node.DisplayLog;
|
var displayLog = node.ConfigType != EConfigType.Custom || node.DisplayLog;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue