From 70003e8a818d5a84882e20d16630908daea93c4f Mon Sep 17 00:00:00 2001 From: DHR60 Date: Tue, 31 Mar 2026 11:30:11 +0000 Subject: [PATCH] Report node validator result (#9025) --- .../ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs b/v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs index a8cca654..9afb0b32 100644 --- a/v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs +++ b/v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace ServiceLib.Handler.Builder; public record CoreConfigContextBuilderResult(CoreConfigContext Context, NodeValidatorResult ValidatorResult) @@ -309,6 +311,11 @@ public class CoreConfigContextBuilder } var nodeValidatorResult = NodeValidator.Validate(node, context.RunCoreType); + var msgs = new List([.. nodeValidatorResult.Errors, .. nodeValidatorResult.Warnings]); + if (msgs.Count > 0) + { + Logging.SaveLog($"{node.Remarks}: {string.Join("; ", msgs)}"); + } if (!nodeValidatorResult.Success) { return nodeValidatorResult;