mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 20:42:10 +00:00
Fix possible issues with load balancing
This commit is contained in:
parent
37cf23d5fe
commit
b12b7a17e6
2 changed files with 7 additions and 10 deletions
|
@ -333,7 +333,7 @@ namespace ServiceLib.Services.CoreConfig
|
|||
outbounds = tagProxy,
|
||||
interrupt_exist_connections = false,
|
||||
};
|
||||
singboxConfig.outbounds.Add(outUrltest);
|
||||
singboxConfig.outbounds.Insert(0, outUrltest);
|
||||
|
||||
//add selector outbound
|
||||
var outSelector = new Outbound4Sbox
|
||||
|
@ -344,7 +344,7 @@ namespace ServiceLib.Services.CoreConfig
|
|||
interrupt_exist_connections = false,
|
||||
};
|
||||
outSelector.outbounds.Insert(0, outUrltest.tag);
|
||||
singboxConfig.outbounds.Add(outSelector);
|
||||
singboxConfig.outbounds.Insert(0, outSelector);
|
||||
|
||||
ret.Success = true;
|
||||
ret.Data = JsonUtils.Serialize(singboxConfig);
|
||||
|
|
|
@ -182,15 +182,12 @@ namespace ServiceLib.Services.CoreConfig
|
|||
rule.balancerTag = balancer.tag;
|
||||
}
|
||||
}
|
||||
else
|
||||
v2rayConfig.routing.rules.Add(new()
|
||||
{
|
||||
v2rayConfig.routing.rules.Add(new()
|
||||
{
|
||||
network = "tcp,udp",
|
||||
balancerTag = balancer.tag,
|
||||
type = "field"
|
||||
});
|
||||
}
|
||||
network = "tcp,udp",
|
||||
balancerTag = balancer.tag,
|
||||
type = "field"
|
||||
});
|
||||
|
||||
ret.Success = true;
|
||||
ret.Data = JsonUtils.Serialize(v2rayConfig);
|
||||
|
|
Loading…
Reference in a new issue