From 0c02953f407a9693a06fa8897973ac3d4c938117 Mon Sep 17 00:00:00 2001 From: mwhds97 Date: Wed, 30 Jun 2021 23:29:10 +0800 Subject: [PATCH] Make clash script ruleset iteration ordered --- Clash/Rule.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Clash/Rule.yaml b/Clash/Rule.yaml index 19c74db..90b9c67 100644 --- a/Clash/Rule.yaml +++ b/Clash/Rule.yaml @@ -131,7 +131,8 @@ script: return "DIRECT" ctx.log('[Script] not common port use direct') - for rule_name in ctx.rule_providers.keys(): + ruleset_list = [r for r in ruleset_action] + for rule_name in ruleset_list: if ctx.rule_providers[rule_name].match(metadata): return ruleset_action[rule_name]