diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs index 2db53ad7..e4268916 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs @@ -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); diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs index 289960cf..afa426a8 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs @@ -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);