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