Fix edge case (#8979)

This commit is contained in:
DHR60 2026-03-23 01:11:33 +00:00 committed by GitHub
parent 74e5ead1ed
commit 14c5b92423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);