Skip to content

Commit

Permalink
chore: update lhie1 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Nov 21, 2024
1 parent a94a901 commit 5408326
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 8 deletions.
11 changes: 11 additions & 0 deletions luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,17 @@ end
o:value("DIRECT")
o:value("REJECT")

o = s:option(ListValue, "HTTPDNS", translate("HTTPDNS"))
o:depends("rule_name", "lhie1")
o.rmempty = true
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
if groupname ~= nil and groupname ~= "" then
o:value(groupname)
end
end
o:value("DIRECT")
o:value("REJECT")

o = s:option(ListValue, "Domestic", translate("Domestic"))
o:depends("rule_name", "lhie1")
o.rmempty = true
Expand Down
2 changes: 1 addition & 1 deletion luci-app-openclash/root/etc/uci-defaults/luci-openclash
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,5 @@ sed -i '/.*kB maximum content size*/c\export let HTTP_MAX_CONTENT = 1024*10240;

/etc/init.d/uhttpd restart >/dev/null 2>&1

rm -f /tmp/luci-indexcache
rm -f /tmp/luci-indexcache* >/dev/null 2>&1
exit 0
18 changes: 13 additions & 5 deletions luci-app-openclash/root/usr/share/openclash/res/lhie1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rules:
- RULE-SET, Reject, AdBlock
- RULE-SET, AdBlock, AdBlock
- RULE-SET, HTTPDNS, HTTPDNS
- RULE-SET, Special, DIRECT
- RULE-SET, Netflix, Netflix
- RULE-SET, Disney Plus, Disney
Expand Down Expand Up @@ -65,7 +66,8 @@ script:
code: |
def main(ctx, metadata):
ruleset_action = {
'Reject': 'AdBlock',
'AdBlock': 'AdBlock',
'HTTPDNS': 'HTTPDNS',
'Special': 'DIRECT',
'Netflix': 'Netflix',
'Disney Plus': 'Disney',
Expand Down Expand Up @@ -154,11 +156,17 @@ script:
ctx.log('[Script] FINAL')
return 'Others'
rule-providers:
Reject:
AdBlock:
type: http
behavior: classical
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Reject.yaml
path: "./Rules/Reject"
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/AdBlock.yaml
path: "./Rules/AdBlock"
interval: 86400
HTTPDNS:
type: http
behavior: classical
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/HTTPDNS.yaml
path: "./Rules/HTTPDNS"
interval: 86400
Special:
type: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
国内IP白名单(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Domestic IPs.yaml
国内域名白名单(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Domestic.yaml
国外常用网站合集(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Proxy.yaml
广告规则(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Reject.yaml
广告规则(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,AdBlock.yaml
微软服务,lhie1,classical,dler-io/Rules/master/Clash/Provider/,Microsoft.yaml
HTTPDNS(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,HTTPDNS.yaml
ABC,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,ABC.yaml
Abema TV,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Abema TV.yaml
AbemaTV(By ACL4SSR),ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,AbemaTV.yaml,AbemaTV-ACL4SSR.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cfg_groups_set()
sed -i "s/new_servers_group \'${convert_old_name_cfg}\'/new_servers_group \'${convert_name}\'/g" $CFG_FILE 2>/dev/null
sed -i "s/relay_groups \'${convert_old_name_cfg}\'/relay_groups \'${convert_name}\'/g" $CFG_FILE 2>/dev/null
#第三方规则处理
OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOGo" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI Suite" "AppleTV" "Crypto" "Discord")
OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "Proxy" "Youtube" "Bilibili" "Bahamut" "HBOGo" "HBOMax" "Pornhub" "Apple" "GoogleFCM" "Scholar" "Microsoft" "Netflix" "Disney" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others" "miHoYo" "AI Suite" "AppleTV" "Crypto" "Discord" "HTTPDNS")
for i in ${OTHER_RULE_NAMES[@]}; do
sed -i "s/option ${i} \'${convert_old_name_cfg}\'/option ${i} \'${convert_name}\'/g" $CFG_FILE 2>/dev/null
done 2>/dev/null
Expand Down
7 changes: 7 additions & 0 deletions luci-app-openclash/root/usr/share/openclash/yml_proxys_set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,12 @@ cat >> "$SERVER_FILE" <<-EOF
- REJECT
- DIRECT
- Proxy
- name: HTTPDNS
type: select
proxies:
- REJECT
- DIRECT
- Proxy
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
Expand Down Expand Up @@ -1900,6 +1906,7 @@ ${uci_set}Spotify="Spotify"
${uci_set}Steam="Steam"
${uci_set}miHoYo="miHoYo"
${uci_set}AdBlock="AdBlock"
${uci_set}HTTPDNS="HTTPDNS"
${uci_set}Speedtest="Speedtest"
${uci_set}Telegram="Telegram"
${uci_set}Crypto="Crypto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ yml_other_set()
.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_')
Expand Down Expand Up @@ -368,6 +369,7 @@ yml_other_set()
.gsub!(/: \'Steam\'/,': \'$Steam#delete_\'')
.gsub!(/: \'miHoYo\'/,': \'$miHoYo#delete_\'')
.gsub!(/: \'AdBlock\'/,': \'$AdBlock#delete_\'')
.gsub!(/: \'HTTPDNS\'/,': \'$HTTPDNS#delete_\'')
.gsub!(/: \'Speedtest\'/,': \'$Speedtest#delete_\'')
.gsub!(/: \'Telegram\'/,': \'$Telegram#delete_\'')
.gsub!(/: \'Crypto\'/,': \'$Crypto#delete_\'')
Expand Down Expand Up @@ -885,6 +887,7 @@ yml_other_rules_get()
config_get "Spotify" "$section" "Spotify" ""
config_get "Steam" "$section" "Steam" ""
config_get "AdBlock" "$section" "AdBlock" ""
config_get "HTTPDNS" "$section" "HTTPDNS" "REJECT"
config_get "Netease_Music" "$section" "Netease_Music" ""
config_get "Speedtest" "$section" "Speedtest" ""
config_get "Telegram" "$section" "Telegram" ""
Expand Down Expand Up @@ -937,6 +940,7 @@ if [ "$1" != "0" ]; then
|| [ -z "$(grep -F "$Steam" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$miHoYo" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$AdBlock" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$HTTPDNS" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Speedtest" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Telegram" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Crypto" /tmp/Proxy_Group)" ]\
Expand Down

1 comment on commit 5408326

@gemnioo
Copy link

@gemnioo gemnioo commented on 5408326 Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

墙洞 lhie1 也没有及时更新. 而且把 o33249.ingest sentry io ; Sentry 这种必须Ban 的也放进去

其他几个上游 也是

blackmatrix7/ios_rule_script#989 \3weeks ago

ACL4SSR/ACL4SSR#261 \2weeks ago

最近几天 Claude 封的比较猛, 都是这个规则没有加 DOMAIN, www.claudeusercontent.com, AI ✅

想要个FR: 自定义是否拉取op自带默认规则 (不然每次更新我都想删, 也不方便自定义 Rule Provider 的玩家, 改对应配置debug

Please sign in to comment.