mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-05 12:04:59 +03:00
Finalmask check (#9024)
This commit is contained in:
@@ -143,11 +143,19 @@ 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 null)
|
if (JsonUtils.ParseJson(item.Extra) is not JsonObject)
|
||||||
{
|
{
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user