🦄 Sync 2026-06-05 01:27:09

This commit is contained in:
github-actions[bot] committed 2026-06-05 01:27:09 +08:00
1 parent 2f80691f7d
commit f8db3e79f6
64 files changed
+75620 -81561

No files matched your search

File diff suppressed because it is too large. Load diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,3 +1,21 @@
rule-providers:
## google:
## type: http
## path: ./rule1.yaml
## url: "https://raw.githubusercontent.com/../Google.yaml"
## interval: 600
## proxy: DIRECT
## behavior: classical
## format: yaml
## size-limit: 0
## header:
## User-Agent:
## - "mihomo/1.18.3"
## Authorization:
## - 'token 1231231'
## payload:
## - 'DOMAIN-SUFFIX,google.com'
rules:
##- PROCESS-NAME,curl,DIRECT #匹配路由自身进程(curl直连)
##- DOMAIN-SUFFIX,google.com,Proxy #匹配域名后缀(交由Proxy代理服务器组)
@@ -1,3 +1,20 @@
rule-providers:
## google:
## type: http
## path: ./rule1.yaml
## url: "https://raw.githubusercontent.com/../Google.yaml"
## interval: 600
## proxy: DIRECT
## behavior: classical
## format: yaml
## size-limit: 0
## header:
## User-Agent:
## - "mihomo/1.18.3"
## Authorization:
## - 'token 1231231'
## payload:
## - 'DOMAIN-SUFFIX,google.com'
rules:
##- DOMAIN-SUFFIX,google.com,Proxy #匹配域名后缀(交由Proxy代理服务器组)
##- DOMAIN-KEYWORD,google,Proxy #匹配域名关键字(交由Proxy代理服务器组)
@@ -73,7 +73,6 @@
# ENABLE_TCP_CONCURRENT (启用 TCP 并发, 0: 插件不覆写, 1: 启用)
# FIND_PROCESS_MODE (进程查找模式, 0: 插件不覆写, off: 关闭, always, strict)
# GLOBAL_CLIENT_FINGERPRINT (全局客户端指纹, none/random/chrome/firefox/safari/ios/android/edge/360/qq/0: 插件不覆写)
# ENABLE_UNIFIED_DELAY (启用统一延迟计算, 0: 插件不覆写, 1: 启用)
# ENABLE_RULE_PROXY (仅代理命中规则流量, 0: 禁用, 1: 启用)
@@ -117,6 +116,7 @@
# GEOASN_CUSTOM_URL (GeoASN 数据自定义更新地址, URL or default)
# --- 其它功能 ---
# GLOBAL_UA (全局 User-Agent, 0:不覆写,或具体 UA)
# SMALL_FLASH_MEMORY (小闪存模式, 0: 禁用, 1: 启用)
# DISABLE_QUIC_GO_GSO (禁用 QUIC GO GSO, 0: 插件不覆写, 1: 启用)
# DELAY_START (延时启动, 0: 禁用 or 秒数)
@@ -209,6 +209,298 @@
#指定展示订阅信息的 URL 地址
#SUB_INFO_URL = https://default-demo.yaml
# ==========================================================
# ==== 以下为 YAML 块覆写示例 ====
# ==========================================================
# YAML 覆写块识别标记
# [YAML]
# ----------------------------------------------------------
# 操作符速查表:
# key → 默认合并(Hash 递归合并,其他直接覆盖)
# key! → 强制覆盖整个值
# key+ → 数组后置追加
# +key → 数组前置插入
# key- → 数组差集删除 / 非数组则删除该键
# key* → 批量条件更新(需配合 where/set)
# <key>后缀 → 同上(+, !, *, -),适用于键名含特殊字符时
# +<key> → 数组前置插入,适用于键名含特殊字符时
# ----------------------------------------------------------
# 1. 默认合并 - 合并哈希键值,键不存在则添加,Hash 值递归合并
# 示例:修改 dns.enable 并添加新键
# dns:
# enable: true
# cache-algorithm: lru
# 示例:直接替换标量值
# mixed-port: 10802
# allow-lan: false
# 示例:合并 tun 配置(仅修改指定字段,其余保留)
# tun:
# enable: true
# stack: gvisor
# ----------------------------------------------------------
# 2. 强制覆盖 (key!) - 强制替换整个值,不做递归合并
# 示例:替换整个 dns.fake-ip-filter 数组
# dns:
# fake-ip-filter!:
# - '*.lan'
# - 'new.domain.com'
# 示例:强制覆盖整个 rules 数组
# rules!:
# - DOMAIN-SUFFIX,example.com,DIRECT
# - MATCH,PROXY
# 示例:使用 <> 强制覆盖整个 dns 配置(键名含特殊字符时)
# <dns>!:
# enable: false
# nameserver:
# - '114.114.114.114'
# ----------------------------------------------------------
# 3. 数组后置 (key+) - 将新元素追加到数组末尾
# 示例:向 dns.nameserver 末尾追加 DNS
# dns:
# nameserver+:
# - '1.1.1.1'
# - '8.8.8.8'
# 示例:向 rules 末尾追加规则
# rules+:
# - DOMAIN-SUFFIX,example.com,REJECT
# 示例:使用 <> 后置
# dns:
# <nameserver>+:
# - '8.8.8.8'
# ----------------------------------------------------------
# 4. 数组前置 (+key / +<key>) - 将新元素插入到数组开头
# 示例:向 dns.nameserver 开头插入 DNS
# dns:
# +nameserver:
# - '223.5.5.5'
# - '119.29.29.29'
# 示例:向 rules 开头插入规则(优先匹配)
# +rules:
# - DOMAIN-SUFFIX,priority.com,DIRECT
# 示例:使用 +<> 前置插入(键名含特殊字符时)
# dns:
# +<nameserver>:
# - '119.29.29.29'
# ----------------------------------------------------------
# 5. 数组删除 (key-) - 从数组中移除指定元素,非数组则删除整个键
# 示例:从 dns.nameserver 中移除指定 DNS
# dns:
# nameserver-:
# - '8.8.8.8'
# - '8.8.4.4'
# 示例:从 rules 中移除指定规则
# rules-:
# - DOMAIN-SUFFIX,old.com,REJECT
# 示例:删除整个键(值为 null/~ 或空)
# dns:
# cache-algorithm-:
# ----------------------------------------------------------
# 6. 批量条件更新 (key*) - 按 where 条件匹配集合元素,用 set 子句更新
#
# 支持的集合类型:
# - 数组(元素为 Hash 或 String)
# - Hash(值为 Hash)
#
# where 条件支持:
# - 普通值相等: type: select
# - 正则匹配: name: '/^HK/'
# - 数组包含: proxies: ['proxy1'] (检查数组是否包含所有指定元素)
# - Hash 键匹配: key: 'some-key' (仅用于 Hash 类型集合)
# - 字符串匹配: value: 'some-string' (仅用于字符串数组)
#
# set 子句支持的操作符(同顶层操作符):
# field → 直接覆盖该字段
# field! → 强制覆盖该字段
# field+ → 数组后置追加
# +field → 数组前置插入
# field- → 数组差集删除 / 非数组则删除该键
# value → 替换字符串数组中的匹配项
# value: ~ → 删除字符串数组中的匹配项
# key: ~ → 删除 Hash 中的匹配键(仅 Hash 集合)
# key-: → 同上
# 示例:按 type 匹配,替换 proxy-groups 的 proxies
# proxy-groups*:
# where:
# type: select
# set:
# proxies:
# - 'new-proxy1'
# - 'new-proxy2'
# 示例:按 type 匹配,向 proxies 末尾追加节点
# proxy-groups*:
# where:
# type: select
# set:
# proxies+:
# - 'new-proxy3'
# 示例:按 type 匹配,向 proxies 开头插入节点
# proxy-groups*:
# where:
# type: url-test
# set:
# +proxies:
# - 'new-proxy1'
# 示例:按 type 匹配,从 proxies 中移除指定节点
# proxy-groups*:
# where:
# type: select
# set:
# proxies-:
# - 'old-proxy1'
# - 'old-proxy2'
# 示例:使用数组包含条件(proxies 中必须包含指定元素才匹配)
# proxy-groups*:
# where:
# type: select
# proxies:
# - 'old-proxy1'
# set:
# proxies:
# - 'new-proxy1'
# - 'new-proxy2'
# 示例:使用正则匹配 name 字段
# proxy-groups*:
# where:
# name: '/^HK/'
# set:
# +proxies:
# - 'hk-new-proxy'
# 示例:删除 proxy-groups 中某个字段(set value 为 null/~)
# proxy-groups*:
# where:
# name: Proxy
# set:
# icon-:
# 示例:按 type 匹配修改 proxies 中 socks5 节点端口
# proxies*:
# where:
# type: socks5
# set:
# port: 1080
# 示例:更新 hosts Hash 中的指定键
# hosts*:
# where:
# key: '*.mihomo.dev'
# set:
# '*.mihomo.dev': '::1'
# 示例:删除 hosts Hash 中的匹配键
# hosts*:
# where:
# key: '*.old.dev'
# set:
# key-:
# 示例:替换字符串数组中的匹配项
# rules*:
# where:
# value: 'DOMAIN-SUFFIX,old.com,REJECT'
# set:
# value: 'DOMAIN-SUFFIX,new.com,DIRECT'
# 示例:使用正则匹配并删除字符串数组中的规则
# rules*:
# where:
# value: '/,REJECT$/'
# set:
# value:
# 示例:删除 fake-ip-filter 中的指定项
# dns:
# fake-ip-filter*:
# where:
# value: '+.localhost.ptlogin2.qq.com'
# set:
# value:
# 示例:使用 <> 批量更新
# <proxy-groups>*:
# where:
# type: url-test
# set:
# interval: 300
# ----------------------------------------------------------
# 7. 组合操作 - 在同一块内同时使用多个操作符
# 示例:同时前置和后置追加 DNS(必须写在同一 dns 块内)
# dns:
# nameserver+:
# - '1.0.0.1'
# +nameserver:
# - '119.29.29.29'
# 示例:同时删除旧 DNS 并前置插入新 DNS
# dns:
# nameserver-:
# - '8.8.8.8'
# +nameserver:
# - '223.5.5.5'
# ----------------------------------------------------------
# 8. <key> 语法补充 - 适用于键名含特殊字符时
# 后缀支持:+(后置)、-(删除)、!(强制覆盖)、*(批量更新),空串为默认合并
# 前置插入请使用 +<key> 写法(前缀形式)
# 示例:使用 <> 后置追加
# dns:
# <nameserver>+:
# - '8.8.8.8'
# 示例:使用 <> 删除数组元素
# dns:
# <nameserver>-:
# - '8.8.8.8'
# 示例:使用 <> 强制覆盖
# dns:
# <nameserver>!:
# - '114.114.114.114'
# 示例:使用 <> 批量更新(等同于 key*)
# <proxy-groups>*:
# where:
# type: url-test
# set:
# interval: 300
# 示例:使用 +<> 前置插入(键名含特殊字符时的前置写法)
# dns:
# +<nameserver>:
# - '119.29.29.29'
# ==========================================================
# ==== 以下为仅修改插件设置示例 ====
# ==========================================================
@@ -174,8 +174,10 @@ if [ -f "/tmp/openclash.bak" ]; then
cp -rf "/tmp/openclash/." "/etc/openclash/" >/dev/null 2>&1
#ui
if [ -d "/tmp/openclash_ui/" ]; then
rm -rf "/usr/share/openclash/ui/" >/dev/null 2>&1
cp -rf "/tmp/openclash_ui/." "/usr/share/openclash/ui/" >/dev/null 2>&1
if [ -d "/tmp/openclash_ui/metacubexd/" ] || [ -d "/tmp/openclash_ui/zashboard/" ] || [ -d "/tmp/openclash_ui/yacd/" ] || [ -d "/tmp/openclash_ui/dashboard/" ]; then
rm -rf "/usr/share/openclash/ui/" >/dev/null 2>&1
cp -rf "/tmp/openclash_ui/." "/usr/share/openclash/ui/" >/dev/null 2>&1
fi
rm -rf "/tmp/openclash_ui/" >/dev/null 2>&1
fi
#pac
@@ -264,6 +266,6 @@ 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 >/dev/null 2>&1
rm -f /tmp/luci-indexcache.* >/dev/null 2>&1
rm -rf /tmp/luci-indexcache /tmp/luci-indexcache.* /var/luci-indexcache /var/luci-indexcache.* >/dev/null 2>&1
rm -rf /tmp/luci-modulecache /var/luci-modulecache >/dev/null 2>&1
exit 0