mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-18 03:05:00 +03:00
Add rule type selection to routing rules (#8007)
* Add rule type selection to routing rules * Use enum --------- Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
@@ -136,13 +136,21 @@ public partial class CoreConfigSingboxService
|
||||
var rules = JsonUtils.Deserialize<List<RulesItem>>(routing.RuleSet);
|
||||
foreach (var item1 in rules ?? [])
|
||||
{
|
||||
if (item1.Enabled)
|
||||
if (!item1.Enabled)
|
||||
{
|
||||
await GenRoutingUserRule(item1, singboxConfig);
|
||||
if (item1.Ip != null && item1.Ip.Count > 0)
|
||||
{
|
||||
ipRules.Add(item1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item1.RuleType == ERuleType.DNS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
await GenRoutingUserRule(item1, singboxConfig);
|
||||
|
||||
if (item1.Ip?.Count > 0)
|
||||
{
|
||||
ipRules.Add(item1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user