mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-13 11:48:07 +00:00
Modify default fallback load balancing rule (#6889)
Some checks failed
Some checks failed
* Modify default fallback load balancing rule * Refine default fallback load balancing rule based on domain strategy
This commit is contained in:
parent
2df412476a
commit
d561f10edc
1 changed files with 17 additions and 5 deletions
|
@ -182,12 +182,24 @@ namespace ServiceLib.Services.CoreConfig
|
|||
rule.balancerTag = balancer.tag;
|
||||
}
|
||||
}
|
||||
if (v2rayConfig.routing.domainStrategy == "IPIfNonMatch")
|
||||
{
|
||||
v2rayConfig.routing.rules.Add(new()
|
||||
{
|
||||
ip = ["0.0.0.0/0", "::/0"],
|
||||
balancerTag = balancer.tag,
|
||||
type = "field"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
v2rayConfig.routing.rules.Add(new()
|
||||
{
|
||||
network = "tcp,udp",
|
||||
balancerTag = balancer.tag,
|
||||
type = "field"
|
||||
});
|
||||
}
|
||||
|
||||
ret.Success = true;
|
||||
ret.Data = JsonUtils.Serialize(v2rayConfig);
|
||||
|
|
Loading…
Reference in a new issue