OpenClash icon indicating copy to clipboard operation
OpenClash copied to clipboard

[Bug] smart策略组不会写,求助

Open hn315 opened this issue 6 months ago • 6 comments

Verify Steps

  • [x] Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • [x] Branch 我知道 OpenClash 的 Dev 分支切换开关位于插件设置-版本更新中,或者我会手动下载并安装 Dev 分支的 OpenClash
  • [x] Latest 我已经使用最新 Dev 版本测试过,问题依旧存在
  • [x] Relevant 我知道 OpenClash 与 内核(Core)、控制面板(Dashboard)、在线订阅转换(Subconverter)等项目之间无直接关系,仅相互调用
  • [x] Definite 这确实是 OpenClash 出现的问题
  • [ ] Contributors 我有能力协助 OpenClash 开发并解决此问题
  • [ ] Meaningless 我提交的是无意义的催促更新或修复请求

OpenClash Version

v0.46.086

Bug on Environment

Official OpenWrt

OpenWrt Version

OpenWrt 24.10.1

Bug on Platform

Linux-amd64(x86-64)

Describe the Bug

这是我在策略组里写的:

smart组

  • {name: 🛠️ 智能节点, type: smart, include-all: true, tolerance: 20, interval: 300, filter: "(?i)美|us|usa|america"} 但总是出错unsupported type: smart,不会写。

To Reproduce

配置文件按以下写

smart组

  • {name: 🛠️ 智能节点, type: smart, include-all: true, tolerance: 20, interval: 300, filter: "(?i)美|us|usa|america"} 但总是出错unsupported type: smart,不会写。

OpenClash Log

2025-05-26 21:52:19 level=fatal msg="Parse config error: proxy group[14]: unsupported type: smart"

OpenClash Config


Expected Behavior

正确的smart策略组的写法

Additional Context

No response

hn315 avatar May 26 '25 14:05 hn315

smart组需要内核支持,这个需要你自己在项目里下载内核替换

help-eeeee avatar May 27 '25 03:05 help-eeeee

  • {name: 🇭🇰 香港节点, type: smart, include-all: true, collectdata: true, filter: "香港|HK"} 最新版smart内核我是这样用的

samishia avatar May 27 '25 04:05 samishia

https://github.com/vernesong/OpenClash/releases/tag/mihomo

vernesong avatar May 27 '25 05:05 vernesong

@help-eeeee @vernesong @samishia ,谢谢,我已下载了mihomo-linux-amd64-compatible-alpha-16d678a,替换了内核,终于能识别smart策略了。 - {name: 🛠️ 智能节点, type: smart, include-all: true, uselightgbm: false, collectdata: false, filter: "(?i)美|us|usa|america"}。

但还有一个小问题: 1、我在yacd面板里启用这个smart组后,其他的组能显示当前已选中的节点,但这个smart组不显示当前是哪个节点被选中,手选也选不中。 2、看日志,代理使用了smart组里的许多个节点,像负载均衡一样。

以下是筛选的日志 25-05-27 20:02:02[ warn ][SmartStore] Network failure detected for group [🛠️ 智能节点:2025-05-28-openclash] after 5 consecutive failures 25-05-27 20:00:40[ info ][SmartStore] Network recovered for group [🛠️ 智能节点:2025-05-28-openclash] after 3 successful connections 25-05-27 20:00:39[ warn ][SmartStore] Network failure detected for group [🛠️ 智能节点:2025-05-28-openclash] after 5 consecutive failures 25-05-27 20:00:21[ info ][SmartStore] Network recovered for group [🛠️ 智能节点:2025-05-28-openclash] after 3 successful connections 25-05-27 20:00:20[ warn ][SmartStore] Network failure detected for group [🛠️ 智能节点:2025-05-28-openclash] after 5 consecutive failures 25-05-27 20:00:02[ info ][SmartStore] Prefetch completed for group [🛠️ 智能节点]: pre-calculated 0 domain/ASN mappings 25-05-27 19:58:19[ info ][SmartStore] Network recovered for group [🛠️ 智能节点:2025-05-28-openclash] after 3 successful connections 25-05-27 19:58:04[ warn ][SmartStore] Network failure detected for group [🛠️ 智能节点:2025-05-28-openclash] after 5 consecutive failures

hn315 avatar May 27 '25 12:05 hn315

Date: 2025-5-14 Allow users to manually specify the current node of group until healthchek or reload (the group's now info default is Smart - Select) 允许用户手动指定当前节点组,直到健康检查或重新加载(组的当前信息默认为智能 - 选择) v大5月14日更新后的smart内核支持手动选中节点了,如果不指定节点,一开始是节点乱跳,后面基本就固定下来了,话说你这个16d678a是哪个版本啊,最新的不是0da8488或者0a05fb2吗?

samishia avatar May 28 '25 03:05 samishia

@samishia 我是从V大的链接https://github.com/vernesong/OpenClash/releases/tag/mihomo里面下载的,刚看了下又更新了。https://github.com/vernesong/mihomo/releases/download/Prerelease-Alpha/mihomo-linux-amd64-compatible-alpha-9f8cb48.gz

hn315 avatar May 28 '25 08:05 hn315

想问下这个smart策略组写health-check有用吗? (看群里模板发的) smart-defaults: &sd type: smart # 策略组类型为智能 include-all: true # 包含所有匹配的节点 policy-priority: mitce:1.8;HK:1.6;SG:1.5;JP:1.3;TW:1.1 # 策略优先级设置 uselightgbm: true # 启用LightGBM模型 collectdata: true # 启用数据收集 health-check: # 健康检查配置 enable: true # 启用定期健康检查 url: https://www.gstatic.com/generate_204 # 使用Google的204状态码检测URL interval: 60 # 检查间隔为60秒 tolerance: 2 # 允许的最大延迟波动范围 strategy: sticky-sessions # 使用粘性会话策略 interval: 250 # 节点评估时间间隔为250秒

Image

ShuaichenLau avatar Jul 26 '25 15:07 ShuaichenLau

不支持tolerance和外部的interval

vernesong avatar Jul 28 '25 16:07 vernesong

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Sep 27 '25 08:09 github-actions[bot]