Fix fragment (#8840)

This commit is contained in:
DHR60
2026-02-26 07:07:24 +00:00
committed by GitHub
parent 3c1ecf085b
commit 2f35e7a99c
11 changed files with 7 additions and 49 deletions
@@ -31,7 +31,7 @@ public partial class CoreConfigV2rayService
var fragmentOutbound = new Outbounds4Ray
{
protocol = "freedom",
tag = $"frag-{Global.ProxyTag}",
tag = $"frag-{baseTagName}",
settings = new()
{
fragment = new()
@@ -44,16 +44,17 @@ public partial class CoreConfigV2rayService
};
var actOutboundWithTlsList =
proxyOutboundList.Where(n => n.streamSettings?.security.IsNullOrEmpty() == false
&& (n.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true));
&& (n.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true)).ToList();
if (actOutboundWithTlsList.Count > 0)
{
proxyOutboundList.Add(fragmentOutbound);
}
foreach (var outbound in actOutboundWithTlsList)
{
var fragmentOutboundClone = JsonUtils.DeepCopy(fragmentOutbound);
fragmentOutboundClone.tag = $"frag-{outbound.tag}";
outbound.streamSettings.sockopt = new()
{
dialerProxy = fragmentOutboundClone.tag
dialerProxy = fragmentOutbound.tag
};
proxyOutboundList.Add(fragmentOutboundClone);
}
}
return proxyOutboundList;