mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 02:34:41 +00:00
Compare commits
1 commit
a07105f2dd
...
bfc47418e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfc47418e0 |
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)
|
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 resultOutbounds = new List<Outbound4Sbox>();
|
||||||
var resultEndpoints = new List<Endpoints4Sbox>(); // For endpoints
|
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);
|
var server = await GenServer(node);
|
||||||
|
|
||||||
if (server is null)
|
if (server is null)
|
||||||
|
|
@ -705,7 +703,7 @@ public partial class CoreConfigSingboxService
|
||||||
server.tag = baseTagName + i.ToString();
|
server.tag = baseTagName + i.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i != nodesReverse.Count - 1)
|
if (i != nodes.Count - 1)
|
||||||
{
|
{
|
||||||
server.detour = baseTagName + (i + 1).ToString();
|
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)
|
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>();
|
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);
|
var txtOutbound = EmbedUtils.GetEmbedText(Global.V2raySampleOutbound);
|
||||||
if (txtOutbound.IsNullOrEmpty())
|
if (txtOutbound.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
|
@ -778,7 +776,7 @@ public partial class CoreConfigV2rayService
|
||||||
outbound.tag = "chain-" + baseTagName + i.ToString();
|
outbound.tag = "chain-" + baseTagName + i.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i != nodesReverse.Count - 1)
|
if (i != nodes.Count - 1)
|
||||||
{
|
{
|
||||||
outbound.streamSettings.sockopt = new()
|
outbound.streamSettings.sockopt = new()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue