Fix possible issues with load balancing

This commit is contained in:
2dust 2025-01-05 16:31:32 +08:00
parent 37cf23d5fe
commit b12b7a17e6
2 changed files with 7 additions and 10 deletions

View file

@ -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);

View file

@ -182,15 +182,12 @@ namespace ServiceLib.Services.CoreConfig
rule.balancerTag = balancer.tag;
}
}
else
{
v2rayConfig.routing.rules.Add(new()
{
network = "tcp,udp",
balancerTag = balancer.tag,
type = "field"
});
}
ret.Success = true;
ret.Data = JsonUtils.Serialize(v2rayConfig);