mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 04:25:45 +00:00
Compare commits
2 commits
d818270ece
...
441d79acbe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
441d79acbe | ||
|
|
5b6142681e |
3 changed files with 4 additions and 19 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace ServiceLib.Handler.Builder;
|
namespace ServiceLib.Handler.Builder;
|
||||||
|
|
||||||
public record CoreConfigContextBuilderResult(CoreConfigContext Context, NodeValidatorResult ValidatorResult)
|
public record CoreConfigContextBuilderResult(CoreConfigContext Context, NodeValidatorResult ValidatorResult)
|
||||||
|
|
@ -311,11 +309,6 @@ public class CoreConfigContextBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
var nodeValidatorResult = NodeValidator.Validate(node, context.RunCoreType);
|
var nodeValidatorResult = NodeValidator.Validate(node, context.RunCoreType);
|
||||||
var msgs = new List<string>([.. nodeValidatorResult.Errors, .. nodeValidatorResult.Warnings]);
|
|
||||||
if (msgs.Count > 0)
|
|
||||||
{
|
|
||||||
Logging.SaveLog($"{node.Remarks}: {string.Join("; ", msgs)}");
|
|
||||||
}
|
|
||||||
if (!nodeValidatorResult.Success)
|
if (!nodeValidatorResult.Success)
|
||||||
{
|
{
|
||||||
return nodeValidatorResult;
|
return nodeValidatorResult;
|
||||||
|
|
|
||||||
|
|
@ -143,19 +143,11 @@ public class NodeValidator
|
||||||
|
|
||||||
if (item.Network == nameof(ETransport.xhttp) && !item.Extra.IsNullOrEmpty())
|
if (item.Network == nameof(ETransport.xhttp) && !item.Extra.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
if (JsonUtils.ParseJson(item.Extra) is not JsonObject)
|
if (JsonUtils.ParseJson(item.Extra) is null)
|
||||||
{
|
{
|
||||||
v.Error(string.Format(ResUI.MsgInvalidProperty, "XHTTP Extra"));
|
v.Error(string.Format(ResUI.MsgInvalidProperty, "XHTTP Extra"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.Finalmask.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
if (JsonUtils.ParseJson(item.Finalmask) is not JsonObject)
|
|
||||||
{
|
|
||||||
v.Error(string.Format(ResUI.MsgInvalidProperty, "Finalmask"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? ValidateSingboxTransport(EConfigType configType, string net)
|
private static string? ValidateSingboxTransport(EConfigType configType, string net)
|
||||||
|
|
|
||||||
|
|
@ -1117,7 +1117,7 @@
|
||||||
<value>Пользовательский набор правил для sing-box</value>
|
<value>Пользовательский набор правил для sing-box</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NeedRebootTips" xml:space="preserve">
|
<data name="NeedRebootTips" xml:space="preserve">
|
||||||
<value>Операция успешна. Закройте приложение, нажав «Выход» в меню трея, и запустите его заново</value>
|
<value>Операция успешна. Нажмите в меню настроек для перезапуска приложения.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuOpenTheFileLocation" xml:space="preserve">
|
<data name="menuOpenTheFileLocation" xml:space="preserve">
|
||||||
<value>Открыть место хранения</value>
|
<value>Открыть место хранения</value>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue