mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 02:34:41 +00:00
Compare commits
2 commits
cb86b8552f
...
85965e81af
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85965e81af | ||
|
|
7b09cb44bf |
2 changed files with 6 additions and 10 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue