Skip to content

Commit

Permalink
Update V2rayConfigHandler.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Dec 31, 2020
1 parent 9dc8cba commit 656451f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions v2rayN/v2rayN/Handler/V2rayConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ private static int routingUserRule(RulesItem rules, ref V2rayConfig v2rayConfig)
var it = Utils.DeepCopy(rules);
it.ip = null;
it.type = "field";
if (Utils.IsNullOrEmpty(rules.port))
{
it.port = null;
}
v2rayConfig.routing.rules.Add(it);
hasDomainIp = true;
}
Expand All @@ -228,6 +232,10 @@ private static int routingUserRule(RulesItem rules, ref V2rayConfig v2rayConfig)
var it = Utils.DeepCopy(rules);
it.domain = null;
it.type = "field";
if (Utils.IsNullOrEmpty(rules.port))
{
it.port = null;
}
v2rayConfig.routing.rules.Add(it);
hasDomainIp = true;
}
Expand Down

0 comments on commit 656451f

Please sign in to comment.