From 4e6f600ab947b769ac9760537eedbe004a3c026b Mon Sep 17 00:00:00 2001 From: hunshcn Date: Sat, 24 Feb 2024 10:51:24 +0800 Subject: [PATCH] feat: add CLASH_META_SUPPORTED_RULE --- src/constant/constant.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/constant/constant.ts b/src/constant/constant.ts index f88b7d61d..f900df15c 100644 --- a/src/constant/constant.ts +++ b/src/constant/constant.ts @@ -28,6 +28,37 @@ export const CLASH_SUPPORTED_RULE = [ 'PROCESS-NAME', ] as const +// CLASH_META_SUPPORTED_RULE generate by `curl -sf https://raw.githubusercontent.com/MetaCubeX/mihomo/Meta/rules/parser.go | grep case | sed 's/://' | sed 's/case//' | tr '\n' ',' | python3 -c 'print(eval(input()))' | sed 's/, / \n/g' | sed 's/[()]//' | sed 's/[ ]*$/,/'` +export const CLASH_META_SUPPORTED_RULE = [ + 'DOMAIN', + 'DOMAIN-SUFFIX', + 'DOMAIN-KEYWORD', + 'GEOSITE', + 'GEOIP', + 'IP-CIDR', + 'IP-CIDR6', + 'SRC-IP-CIDR', + 'IP-SUFFIX', + 'SRC-IP-SUFFIX', + 'SRC-PORT', + 'DST-PORT', + 'IN-PORT', + 'DSCP', + 'PROCESS-NAME', + 'PROCESS-PATH', + 'NETWORK', + 'UID', + 'IN-TYPE', + 'IN-USER', + 'IN-NAME', + 'SUB-RULE', + 'AND', + 'OR', + 'NOT', + 'RULE-SET', + 'MATCH', +] as const + export const QUANTUMULT_X_SUPPORTED_RULE = [ 'USER-AGENT', 'HOST',