From 4adeb2732dfacd3acf26b73e95dfdc1c4e1cf7c7 Mon Sep 17 00:00:00 2001 From: vernesong <42875168+vernesong@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:24:30 +0800 Subject: [PATCH] chore: update lhie1 rule --- .../usr/share/openclash/openclash_rule.sh | 4 +- .../root/usr/share/openclash/res/lhie1.yaml | 124 +++++++++--------- .../usr/share/openclash/yml_rules_change.sh | 62 ++++----- 3 files changed, 95 insertions(+), 95 deletions(-) diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh b/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh index a75af2d14a..b43fbd2c8e 100644 --- a/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh +++ b/luci-app-openclash/root/usr/share/openclash/openclash_rule.sh @@ -79,8 +79,8 @@ elif ! "$(ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e " Value = YAML.load_file('/usr/share/openclash/res/${rule_name}.yaml'); Value_1 = YAML.load_file('/tmp/rules.yaml'); - OLD_GROUP = Value['rules'].collect{|x| x.split(',')[2] or x.split(',')[1]}.uniq; - NEW_GROUP = Value_1['rules'].collect{|x| x.split(',')[2] or x.split(',')[1]}.uniq; + OLD_GROUP = Value['rules'].collect{|x| x.split(',')[2] or x.split(',')[1]}.uniq.map(&:strip); + NEW_GROUP = Value_1['rules'].collect{|x| x.split(',')[2] or x.split(',')[1]}.uniq.map(&:strip); if (OLD_GROUP | NEW_GROUP).eql?(OLD_GROUP) then if (OLD_GROUP | NEW_GROUP).eql?(NEW_GROUP) then puts true diff --git a/luci-app-openclash/root/usr/share/openclash/res/lhie1.yaml b/luci-app-openclash/root/usr/share/openclash/res/lhie1.yaml index 75aa6d897b..b5570efca8 100644 --- a/luci-app-openclash/root/usr/share/openclash/res/lhie1.yaml +++ b/luci-app-openclash/root/usr/share/openclash/res/lhie1.yaml @@ -1,66 +1,66 @@ rules: -- RULE-SET, AdBlock, AdBlock -- RULE-SET, HTTPDNS, HTTPDNS -- RULE-SET, Special, DIRECT -- RULE-SET, Netflix, Netflix -- RULE-SET, Disney Plus, Disney -- RULE-SET, YouTube, YouTube -- RULE-SET, Max, Max -- RULE-SET, Spotify, Spotify -- RULE-SET, Bilibili, CN Mainland TV -- RULE-SET, IQ, CN Mainland TV -- RULE-SET, IQIYI, CN Mainland TV -- RULE-SET, Letv, CN Mainland TV -- RULE-SET, Netease Music, CN Mainland TV -- RULE-SET, Tencent Video, CN Mainland TV -- RULE-SET, WeTV, CN Mainland TV -- RULE-SET, Youku, CN Mainland TV -- RULE-SET, Abema TV, Asian TV -- RULE-SET, Bahamut, Asian TV -- RULE-SET, Fox+, Asian TV -- RULE-SET, Hulu Japan, Asian TV -- RULE-SET, Japonx, Asian TV -- RULE-SET, JOOX, Asian TV -- RULE-SET, KKBOX, Asian TV -- RULE-SET, KKTV, Asian TV -- RULE-SET, Line TV, Asian TV -- RULE-SET, myTV SUPER, Asian TV -- RULE-SET, Niconico, Asian TV -- RULE-SET, ViuTV, Asian TV -- RULE-SET, ABC, Global TV -- RULE-SET, Amazon, Global TV -- RULE-SET, BBC iPlayer, Global TV -- RULE-SET, DAZN, Global TV -- RULE-SET, Discovery Plus, Global TV -- RULE-SET, encoreTVB, Global TV -- RULE-SET, F1 TV, Global TV -- RULE-SET, Fox Now, Global TV -- RULE-SET, Hulu, Global TV -- RULE-SET, Pandora, Global TV -- RULE-SET, PBS, Global TV -- RULE-SET, Pornhub, Global TV -- RULE-SET, Soundcloud, Global TV -- RULE-SET, Apple Music, Apple TV -- RULE-SET, Apple News, Apple TV -- RULE-SET, Apple TV, Apple TV -- RULE-SET, Apple, Apple -- RULE-SET, Telegram, Telegram -- RULE-SET, Crypto, Crypto -- RULE-SET, Discord, Discord -- RULE-SET, Google FCM, Google FCM -- RULE-SET, Microsoft, Microsoft -- RULE-SET, AI Suite, AI Suite -- RULE-SET, PayPal, PayPal -- RULE-SET, Scholar, Scholar -- RULE-SET, Speedtest, Speedtest -- RULE-SET, Steam, Steam -- RULE-SET, miHoYo, miHoYo -- RULE-SET, PROXY, Proxy -- RULE-SET, Domestic, Domestic -- RULE-SET, Domestic IPs, Domestic -- RULE-SET, LAN, DIRECT -- GEOIP, CN, Domestic -- MATCH, Others +- RULE-SET,AdBlock,AdBlock +- RULE-SET,HTTPDNS,HTTPDNS +- RULE-SET,Special,DIRECT +- RULE-SET,Netflix,Netflix +- RULE-SET,Disney Plus,Disney +- RULE-SET,YouTube,YouTube +- RULE-SET,Max,Max +- RULE-SET,Spotify,Spotify +- RULE-SET,Bilibili,CN Mainland TV +- RULE-SET,IQ,CN Mainland TV +- RULE-SET,IQIYI,CN Mainland TV +- RULE-SET,Letv,CN Mainland TV +- RULE-SET,Netease Music,CN Mainland TV +- RULE-SET,Tencent Video,CN Mainland TV +- RULE-SET,WeTV,CN Mainland TV +- RULE-SET,Youku,CN Mainland TV +- RULE-SET,Abema TV,Asian TV +- RULE-SET,Bahamut,Asian TV +- RULE-SET,Fox+,Asian TV +- RULE-SET,Hulu Japan,Asian TV +- RULE-SET,Japonx,Asian TV +- RULE-SET,JOOX,Asian TV +- RULE-SET,KKBOX,Asian TV +- RULE-SET,KKTV,Asian TV +- RULE-SET,Line TV,Asian TV +- RULE-SET,myTV SUPER,Asian TV +- RULE-SET,Niconico,Asian TV +- RULE-SET,ViuTV,Asian TV +- RULE-SET,ABC,Global TV +- RULE-SET,Amazon,Global TV +- RULE-SET,BBC iPlayer,Global TV +- RULE-SET,DAZN,Global TV +- RULE-SET,Discovery Plus,Global TV +- RULE-SET,encoreTVB,Global TV +- RULE-SET,F1 TV,Global TV +- RULE-SET,Fox Now,Global TV +- RULE-SET,Hulu,Global TV +- RULE-SET,Pandora,Global TV +- RULE-SET,PBS,Global TV +- RULE-SET,Pornhub,Global TV +- RULE-SET,Soundcloud,Global TV +- RULE-SET,Apple Music,Apple TV +- RULE-SET,Apple News,Apple TV +- RULE-SET,Apple TV,Apple TV +- RULE-SET,Apple,Apple +- RULE-SET,Telegram,Telegram +- RULE-SET,Crypto,Crypto +- RULE-SET,Discord,Discord +- RULE-SET,Google FCM,Google FCM +- RULE-SET,Microsoft,Microsoft +- RULE-SET,AI Suite,AI Suite +- RULE-SET,PayPal,PayPal +- RULE-SET,Scholar,Scholar +- RULE-SET,Speedtest,Speedtest +- RULE-SET,Steam,Steam +- RULE-SET,miHoYo,miHoYo +- RULE-SET,PROXY,Proxy +- RULE-SET,Domestic,Domestic +- RULE-SET,Domestic IPs,Domestic +- RULE-SET,LAN,DIRECT +- GEOIP,CN,Domestic +- MATCH,Others rule-providers: AdBlock: type: http diff --git a/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh b/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh index 586d2d8566..a46a3d5fb4 100644 --- a/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh +++ b/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh @@ -314,37 +314,37 @@ yml_other_set() end; Value['rules']=Value_1['rules']; Value['rules'].to_a.collect!{|x| - x.to_s.gsub(/,[\s]?Bilibili,[\s]?CN Mainland TV$/, ', Bilibili, $Bilibili#delete_') - .gsub(/,[\s]?Bahamut,[\s]?Asian TV$/, ', Bahamut, $Bahamut#delete_') - .gsub(/,[\s]?Max,[\s]?Max$/, ', Max, $HBOMax#delete_') - .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ', Discovery Plus, $Discovery#delete_') - .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ', DAZN, $DAZN#delete_') - .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ', Pornhub, $Pornhub#delete_') - .gsub(/,[\s]?Global TV$/, ', $GlobalTV#delete_') - .gsub(/,[\s]?Asian TV$/, ', $AsianTV#delete_') - .gsub(/,[\s]?CN Mainland TV$/, ', $MainlandTV#delete_') - .gsub(/,[\s]?Proxy$/, ', $Proxy#delete_') - .gsub(/,[\s]?YouTube$/, ', $Youtube#delete_') - .gsub(/,[\s]?Apple$/, ', $Apple#delete_') - .gsub(/,[\s]?Apple TV$/, ', $AppleTV#delete_') - .gsub(/,[\s]?Scholar$/, ', $Scholar#delete_') - .gsub(/,[\s]?Netflix$/, ', $Netflix#delete_') - .gsub(/,[\s]?Disney$/, ', $Disney#delete_') - .gsub(/,[\s]?Spotify$/, ', $Spotify#delete_') - .gsub(/,[\s]?AI Suite$/, ', $AI_Suite#delete_') - .gsub(/,[\s]?Steam$/, ', $Steam#delete_') - .gsub(/,[\s]?miHoYo$/, ', $miHoYo#delete_') - .gsub(/,[\s]?AdBlock$/, ', $AdBlock#delete_') - .gsub(/,[\s]?HTTPDNS$/, ', $HTTPDNS#delete_') - .gsub(/,[\s]?Speedtest$/, ', $Speedtest#delete_') - .gsub(/,[\s]?Telegram$/, ', $Telegram#delete_') - .gsub(/,[\s]?Crypto$/, ', $Crypto#delete_') - .gsub(/,[\s]?Discord$/, ', $Discord#delete_') - .gsub(/,[\s]?Microsoft$/, ', $Microsoft#delete_') - .to_s.gsub(/,[\s]?PayPal$/, ', $PayPal#delete_') - .gsub(/,[\s]?Domestic$/, ', $Domestic#delete_') - .gsub(/,[\s]?Others$/, ', $Others#delete_') - .gsub(/,[\s]?Google FCM$/, ', $GoogleFCM#delete_') + x.to_s.gsub(/,[\s]?Bilibili,[\s]?CN Mainland TV$/, ',Bilibili,$Bilibili#delete_') + .gsub(/,[\s]?Bahamut,[\s]?Asian TV$/, ',Bahamut,$Bahamut#delete_') + .gsub(/,[\s]?Max,[\s]?Max$/, ',Max,$HBOMax#delete_') + .gsub(/,[\s]?Discovery Plus,[\s]?Global TV$/, ',Discovery Plus,$Discovery#delete_') + .gsub(/,[\s]?DAZN,[\s]?Global TV$/, ',DAZN,$DAZN#delete_') + .gsub(/,[\s]?Pornhub,[\s]?Global TV$/, ',Pornhub,$Pornhub#delete_') + .gsub(/,[\s]?Global TV$/, ',$GlobalTV#delete_') + .gsub(/,[\s]?Asian TV$/, ',$AsianTV#delete_') + .gsub(/,[\s]?CN Mainland TV$/, ',$MainlandTV#delete_') + .gsub(/,[\s]?Proxy$/, ',$Proxy#delete_') + .gsub(/,[\s]?YouTube$/, ',$Youtube#delete_') + .gsub(/,[\s]?Apple$/, ',$Apple#delete_') + .gsub(/,[\s]?Apple TV$/, ',$AppleTV#delete_') + .gsub(/,[\s]?Scholar$/, ',$Scholar#delete_') + .gsub(/,[\s]?Netflix$/, ',$Netflix#delete_') + .gsub(/,[\s]?Disney$/, ',$Disney#delete_') + .gsub(/,[\s]?Spotify$/, ',$Spotify#delete_') + .gsub(/,[\s]?AI Suite$/, ',$AI_Suite#delete_') + .gsub(/,[\s]?Steam$/, ',$Steam#delete_') + .gsub(/,[\s]?miHoYo$/, ',$miHoYo#delete_') + .gsub(/,[\s]?AdBlock$/, ',$AdBlock#delete_') + .gsub(/,[\s]?HTTPDNS$/, ',$HTTPDNS#delete_') + .gsub(/,[\s]?Speedtest$/, ',$Speedtest#delete_') + .gsub(/,[\s]?Telegram$/, ',$Telegram#delete_') + .gsub(/,[\s]?Crypto$/, ',$Crypto#delete_') + .gsub(/,[\s]?Discord$/, ',$Discord#delete_') + .gsub(/,[\s]?Microsoft$/, ',$Microsoft#delete_') + .to_s.gsub(/,[\s]?PayPal$/, ',$PayPal#delete_') + .gsub(/,[\s]?Domestic$/, ',$Domestic#delete_') + .gsub(/,[\s]?Others$/, ',$Others#delete_') + .gsub(/,[\s]?Google FCM$/, ',$GoogleFCM#delete_') .gsub(/#delete_/, '') }; end;