mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
Fix
This commit is contained in:
parent
fb1faf745b
commit
7fc9c32444
2 changed files with 6 additions and 11 deletions
|
|
@ -40,7 +40,7 @@ public class CoreConfigContextBuilder
|
|||
validatorResult.Warnings.AddRange(nodeValidatorResult.Warnings);
|
||||
if (!(context.RoutingItem?.RuleSet.IsNullOrEmpty() ?? true))
|
||||
{
|
||||
var rules = JsonUtils.Deserialize<List<RulesItem>>(context.RoutingItem?.RuleSet);
|
||||
var rules = JsonUtils.Deserialize<List<RulesItem>>(context.RoutingItem?.RuleSet) ?? [];
|
||||
foreach (var ruleItem in rules.Where(ruleItem => !Global.OutboundTags.Contains(ruleItem.OutboundTag)))
|
||||
{
|
||||
if (ruleItem.OutboundTag.IsNullOrEmpty())
|
||||
|
|
|
|||
|
|
@ -106,16 +106,11 @@ public class NodeValidator
|
|||
break;
|
||||
|
||||
case EConfigType.VLESS:
|
||||
// Example of converting a non-critical issue to Warning if desired
|
||||
if (item.Password.Length <= 30 && !Utils.IsGuidByParse(item.Password))
|
||||
{
|
||||
v.Assert(!item.Password.IsNullOrEmpty(), string.Format(ResUI.MsgInvalidProperty, "Password"));
|
||||
}
|
||||
else
|
||||
{
|
||||
v.Assert(!item.Password.IsNullOrEmpty(), string.Format(ResUI.MsgInvalidProperty, "Password"));
|
||||
}
|
||||
|
||||
v.Assert(
|
||||
!item.Password.IsNullOrEmpty()
|
||||
&& (Utils.IsGuidByParse(item.Password) || item.Password.Length <= 30),
|
||||
string.Format(ResUI.MsgInvalidProperty, "Password")
|
||||
);
|
||||
v.Assert(Global.Flows.Contains(protocolExtra.Flow ?? string.Empty),
|
||||
string.Format(ResUI.MsgInvalidProperty, "Flow"));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue