Speedtest respect user-set core type (#8856)

* Respect user-set core type

* Allow test group
This commit is contained in:
DHR60
2026-03-01 08:11:40 +00:00
committed by GitHub
parent 99d67ca3f1
commit 9f6237fb21
8 changed files with 35 additions and 28 deletions
@@ -149,11 +149,11 @@ public partial class CoreConfigSingboxService(CoreConfigContext context)
foreach (var it in selecteds)
{
if (!Global.SingboxSupportConfigType.Contains(it.ConfigType))
if (!(Global.SingboxSupportConfigType.Contains(it.ConfigType) || it.ConfigType.IsGroupType()))
{
continue;
}
if (it.Port <= 0)
if (!it.ConfigType.IsComplexType() && it.Port <= 0)
{
continue;
}
@@ -112,11 +112,11 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
foreach (var it in selecteds)
{
if (!Global.XraySupportConfigType.Contains(it.ConfigType))
if (!(Global.XraySupportConfigType.Contains(it.ConfigType) || it.ConfigType.IsGroupType()))
{
continue;
}
if (it.Port <= 0)
if (!it.ConfigType.IsComplexType() && it.Port <= 0)
{
continue;
}
@@ -180,13 +180,13 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
//rule
RulesItem4Ray rule = new()
{
inboundTag = new List<string> { inbound.tag },
inboundTag = [inbound.tag],
outboundTag = tag,
type = "field"
};
if (isBalancer)
{
rule.balancerTag = tag;
rule.balancerTag = tag + Global.BalancerTagSuffix;
rule.outboundTag = null;
}
_coreConfig.routing.rules.Add(rule);