mirror of
https://github.com/2dust/v2rayN.git
synced 2025-09-17 23:43:05 +00:00
parent
a87a015c03
commit
f00e968b8f
2 changed files with 14 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue