Compare commits

..

1 commit

Author SHA1 Message Date
DHR60
bfc47418e0
Merge 437b2bd4e6 into 4e042295d2 2025-09-13 07:14:58 +00:00
2 changed files with 6 additions and 10 deletions

View file

@ -682,13 +682,11 @@ public partial class CoreConfigSingboxService
private async Task<int> GenChainOutboundsList(List<ProfileItem> nodes, SingboxConfig singboxConfig, string baseTagName = Global.ProxyTag)
{
// Based on actual network flow instead of data packets
var nodesReverse = nodes.AsEnumerable().Reverse().ToList();
var resultOutbounds = new List<Outbound4Sbox>();
var resultEndpoints = new List<Endpoints4Sbox>(); // For endpoints
for (var i = 0; i < nodesReverse.Count; i++)
for (var i = 0; i < nodes.Count; i++)
{
var node = nodesReverse[i];
var node = nodes[i];
var server = await GenServer(node);
if (server is null)
@ -705,7 +703,7 @@ public partial class CoreConfigSingboxService
server.tag = baseTagName + i.ToString();
}
if (i != nodesReverse.Count - 1)
if (i != nodes.Count - 1)
{
server.detour = baseTagName + (i + 1).ToString();
}

View file

@ -749,12 +749,10 @@ public partial class CoreConfigV2rayService
private async Task<int> GenChainOutboundsList(List<ProfileItem> nodes, V2rayConfig v2RayConfig, string baseTagName = Global.ProxyTag)
{
// Based on actual network flow instead of data packets
var nodesReverse = nodes.AsEnumerable().Reverse().ToList();
var resultOutbounds = new List<Outbounds4Ray>();
for (var i = 0; i < nodesReverse.Count; i++)
for (var i = 0; i < nodes.Count; i++)
{
var node = nodesReverse[i];
var node = nodes[i];
var txtOutbound = EmbedUtils.GetEmbedText(Global.V2raySampleOutbound);
if (txtOutbound.IsNullOrEmpty())
{
@ -778,7 +776,7 @@ public partial class CoreConfigV2rayService
outbound.tag = "chain-" + baseTagName + i.ToString();
}
if (i != nodesReverse.Count - 1)
if (i != nodes.Count - 1)
{
outbound.streamSettings.sockopt = new()
{