chen08209 说明 Concord 已加入规则命中统计与临时开关
chen08209 表示,Concord 已在提交 0cd9a184 中加入顶层规则的运行时命中与未命中统计,以及临时禁用和重新启用规则的支持。启用 Clash REST 控制器时,GET /rules 会包含 disabled、hitCount、hitAt、missCount、missAt 等 extra 字段,时间使用 UTC 整秒;PATCH /rules/disable 接收规则索引到布尔值的映射,设置持续到下次重载配置或重启,独立和嵌入模式均支持。功能将于下一次发行提供。
作者原文@chen08209Support for runtime rule hit/miss counters and temporary rule toggling has been added in 0cd9a184:
GET /rulesnow includes theextraobject (disabled,hitCount,hitAt,missCount,missAt, with whole-second UTC timestamps) for top-level rules while the Clash REST controller is enabled (zero memory overhead when the controller is not configured).PATCH /rules/disablenow accepts a{ "<index>": true/false }map to temporarily disable or re-enable top-level rules at runtime until the next config reload or restart (supported in both standalone and embedded modes).This will be available in the next release.