mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 20:09:12 +00:00
Fixes SplitCore == false and Node.CoreType == ECoreType.hysteria2 etc. logic
This commit is contained in:
parent
2035a5ae61
commit
ac4692c7d0
1 changed files with 23 additions and 5 deletions
|
@ -225,6 +225,24 @@ public class CoreHandler
|
||||||
PreCoreType = null;
|
PreCoreType = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!SplitCore && !EnableTun)
|
||||||
|
{
|
||||||
|
switch (Node.CoreType)
|
||||||
|
{
|
||||||
|
case ECoreType.hysteria2:
|
||||||
|
case ECoreType.tuic:
|
||||||
|
Node.CoreType = ECoreType.sing_box;
|
||||||
|
CoreType = ECoreType.sing_box;
|
||||||
|
break;
|
||||||
|
case ECoreType.v2fly:
|
||||||
|
case ECoreType.v2fly_v5:
|
||||||
|
Node.CoreType = ECoreType.Xray;
|
||||||
|
CoreType = ECoreType.Xray;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -251,15 +269,15 @@ public class CoreHandler
|
||||||
{
|
{
|
||||||
PreCoreType = ECoreType.sing_box;
|
PreCoreType = ECoreType.sing_box;
|
||||||
|
|
||||||
if (PreCoreType != CoreType) // CoreType is xray
|
if (PreCoreType == CoreType) // CoreType is sing_box
|
||||||
|
{
|
||||||
|
PreCoreType = null;
|
||||||
|
}
|
||||||
|
else // CoreType is xray, hysteria2, tuic, etc.
|
||||||
{
|
{
|
||||||
SplitCore = true;
|
SplitCore = true;
|
||||||
PreSocksPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.split);
|
PreSocksPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.split);
|
||||||
}
|
}
|
||||||
else // CoreType is sing_box
|
|
||||||
{
|
|
||||||
PreCoreType = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue