Fixed issues with multi-core traffic processing

pull/4917/head
2dust 2024-03-30 16:00:19 +08:00
parent bb3a04a9c8
commit abbe83f3c2
4 changed files with 12 additions and 0 deletions

View File

@ -192,6 +192,7 @@ namespace v2rayN.Handler
{
coreType = LazyConfig.Instance.GetCoreType(node, node.configType);
}
_config.runningCoreType = coreType;
var coreInfo = LazyConfig.Instance.GetCoreInfo(coreType);
var displayLog = node.configType != EConfigType.Custom || node.displayLog;
@ -214,6 +215,7 @@ namespace v2rayN.Handler
address = Global.Loopback,
port = node.preSocksPort
};
_config.runningCoreType = ECoreType.sing_box;
string fileName2 = Utils.GetConfigPath(Global.CorePreConfigFileName);
if (CoreConfigHandler.GenerateClientConfig(itemSocks, fileName2, out string msg2, out string configStr) == 0)
{

View File

@ -63,6 +63,10 @@ namespace v2rayN.Handler
{
try
{
if (!(_config.runningCoreType is ECoreType.sing_box or ECoreType.clash or ECoreType.clash_meta or ECoreType.mihomo))
{
continue;
}
if (webSocket != null)
{
if (webSocket.State == WebSocketState.Aborted

View File

@ -51,6 +51,10 @@ namespace v2rayN.Handler
{
try
{
if (!(_config.runningCoreType is ECoreType.Xray or ECoreType.v2fly or ECoreType.v2fly_v5 or ECoreType.SagerNet))
{
continue;
}
if (_channel?.State == ConnectivityState.Ready)
{
QueryStatsResponse? res = null;

View File

@ -14,6 +14,8 @@
public string systemProxyExceptions { get; set; }
public string systemProxyAdvancedProtocol { get; set; }
public ECoreType runningCoreType { get; set; }
#endregion property
#region other entities