Tag add remark

This commit is contained in:
DHR60 2026-03-22 22:53:27 +08:00
parent 74e5ead1ed
commit d8365b2398
4 changed files with 8 additions and 8 deletions

View file

@ -571,7 +571,7 @@ public partial class CoreConfigSingboxService
for (var i = 0; i < nodes.Count; i++) for (var i = 0; i < nodes.Count; i++)
{ {
var node = nodes[i]; var node = nodes[i];
var currentTag = $"{baseTagName}-{i + 1}"; var currentTag = $"{baseTagName}-{i + 1}-{node.Remarks}";
if (node.ConfigType.IsGroupType()) if (node.ConfigType.IsGroupType())
{ {
@ -602,8 +602,8 @@ public partial class CoreConfigSingboxService
for (var i = 0; i < nodesReverse.Count; i++) for (var i = 0; i < nodesReverse.Count; i++)
{ {
var node = nodesReverse[i]; var node = nodesReverse[i];
var currentTag = i == 0 ? baseTagName : $"chain-{baseTagName}-{i}"; var currentTag = i == 0 ? baseTagName : $"chain-{baseTagName}-{i}-{node.Remarks}";
var dialerProxyTag = i != nodesReverse.Count - 1 ? $"chain-{baseTagName}-{i + 1}" : null; var dialerProxyTag = i != nodesReverse.Count - 1 ? $"chain-{baseTagName}-{i + 1}-{node.Remarks}" : null;
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

@ -494,7 +494,7 @@ public partial class CoreConfigSingboxService
return Global.ProxyTag; return Global.ProxyTag;
} }
var tag = $"{node.IndexId}-{Global.ProxyTag}"; var tag = $"{node.IndexId}-{Global.ProxyTag}-{node.Remarks}";
if (_coreConfig.outbounds.Any(o => o.tag.StartsWith(tag)) if (_coreConfig.outbounds.Any(o => o.tag.StartsWith(tag))
|| (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag.StartsWith(tag)))) || (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag.StartsWith(tag))))
{ {

View file

@ -688,7 +688,7 @@ public partial class CoreConfigV2rayService
for (var i = 0; i < nodes.Count; i++) for (var i = 0; i < nodes.Count; i++)
{ {
var node = nodes[i]; var node = nodes[i];
var currentTag = $"{baseTagName}-{i + 1}"; var currentTag = $"{baseTagName}-{i + 1}-{node.Remarks}";
if (node.ConfigType.IsGroupType()) if (node.ConfigType.IsGroupType())
{ {
@ -719,8 +719,8 @@ public partial class CoreConfigV2rayService
for (var i = 0; i < nodesReverse.Count; i++) for (var i = 0; i < nodesReverse.Count; i++)
{ {
var node = nodesReverse[i]; var node = nodesReverse[i];
var currentTag = i == 0 ? baseTagName : $"chain-{baseTagName}-{i}"; var currentTag = i == 0 ? baseTagName : $"chain-{baseTagName}-{i}-{node.Remarks}";
var dialerProxyTag = i != nodesReverse.Count - 1 ? $"chain-{baseTagName}-{i + 1}" : null; var dialerProxyTag = i != nodesReverse.Count - 1 ? $"chain-{baseTagName}-{i + 1}-{node.Remarks}" : null;
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);

View file

@ -164,7 +164,7 @@ public partial class CoreConfigV2rayService
return Global.ProxyTag; return Global.ProxyTag;
} }
var tag = $"{node.IndexId}-{Global.ProxyTag}"; var tag = $"{node.IndexId}-{Global.ProxyTag}-{node.Remarks}";
if (_coreConfig.outbounds.Any(p => p.tag.StartsWith(tag))) if (_coreConfig.outbounds.Any(p => p.tag.StartsWith(tag)))
{ {
return tag; return tag;