Fix edge case

This commit is contained in:
DHR60 2026-03-22 23:02:27 +08:00
parent 74e5ead1ed
commit 7c99141348
2 changed files with 10 additions and 0 deletions

View file

@ -573,6 +573,11 @@ public partial class CoreConfigSingboxService
var node = nodes[i]; var node = nodes[i];
var currentTag = $"{baseTagName}-{i + 1}"; var currentTag = $"{baseTagName}-{i + 1}";
if (nodes.Count == 1)
{
currentTag = baseTagName;
}
if (node.ConfigType.IsGroupType()) if (node.ConfigType.IsGroupType())
{ {
var childProfiles = new CoreConfigSingboxService(context with { Node = node, }).BuildGroupProxyOutbounds(currentTag); var childProfiles = new CoreConfigSingboxService(context with { Node = node, }).BuildGroupProxyOutbounds(currentTag);

View file

@ -690,6 +690,11 @@ public partial class CoreConfigV2rayService
var node = nodes[i]; var node = nodes[i];
var currentTag = $"{baseTagName}-{i + 1}"; var currentTag = $"{baseTagName}-{i + 1}";
if (nodes.Count == 1)
{
currentTag = baseTagName;
}
if (node.ConfigType.IsGroupType()) if (node.ConfigType.IsGroupType())
{ {
var childProfiles = new CoreConfigV2rayService(context with { Node = node, }).BuildGroupProxyOutbounds(currentTag); var childProfiles = new CoreConfigV2rayService(context with { Node = node, }).BuildGroupProxyOutbounds(currentTag);