https://github.com/2dust/v2rayN/issues/7944
This commit is contained in:
2dust 2025-09-13 09:41:34 +08:00
parent a87a015c03
commit f00e968b8f
2 changed files with 14 additions and 1 deletions

View file

@ -368,6 +368,13 @@ public partial class CoreConfigSingboxService
return Global.ProxyTag;
}
var tag = Global.ProxyTag + node.IndexId.ToString();
if (singboxConfig.outbounds.Any(o => o.tag == tag)
|| (singboxConfig.endpoints != null && singboxConfig.endpoints.Any(e => e.tag == tag)))
{
return tag;
}
var server = await GenServer(node);
if (server is null)
{

View file

@ -131,10 +131,16 @@ public partial class CoreConfigV2rayService
return Global.ProxyTag;
}
var tag = Global.ProxyTag + node.IndexId.ToString();
if (v2rayConfig.outbounds.Any(p => p.tag == tag))
{
return tag;
}
var txtOutbound = EmbedUtils.GetEmbedText(Global.V2raySampleOutbound);
var outbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
await GenOutbound(node, outbound);
outbound.tag = Global.ProxyTag + node.IndexId.ToString();
outbound.tag = tag;
v2rayConfig.outbounds.Add(outbound);
return outbound.tag;