Bug fix
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run

https://github.com/2dust/v2rayN/issues/8879
This commit is contained in:
2dust 2026-03-03 10:07:48 +08:00
parent f24a79aa2c
commit 4d2f32099e

View file

@ -301,6 +301,7 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
GenLog();
_coreConfig.outbounds.Clear();
GenOutbounds();
GenStatistic();
var protectNode = new ProfileItem()
{
@ -326,18 +327,17 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
Node = protectNode,
}).BuildProxyOutbound("tun-project-ss"));
_coreConfig.routing.rules ??= [];
var hasBalancer = _coreConfig.routing.balancers is { Count: > 0 };
_coreConfig.routing.rules =
[
new()
_coreConfig.routing.rules.Add(new()
{
inboundTag = new List<string> { "proxy-relay-ss" },
inboundTag = ["proxy-relay-ss"],
outboundTag = hasBalancer ? null : Global.ProxyTag,
balancerTag = hasBalancer ? Global.ProxyTag + Global.BalancerTagSuffix : null,
type = "field"
}
];
_coreConfig.inbounds.Clear();
});
//_coreConfig.inbounds.Clear();
var configNode = JsonUtils.ParseJson(JsonUtils.Serialize(_coreConfig))!;
configNode["inbounds"]!.AsArray().Add(new