[Bug] rule-provider文件只有一行时,解析报错
morytyann opened this issue · comments
Joseph Mory commented
Verify steps
- I have read the documentation and understand the meaning of all configuration items I have written, avoiding a large number of seemingly useful options or default values.
- I have not reviewed the documentation and resolve this issue.
- I have not searched the Issue Tracker for the problem I am going to raise.
- I have tested with the latest Alpha branch version, and the issue still persists.
- I have provided server and client configuration files and processes that can reproduce the issue locally, rather than a desensitized complex client configuration file.
- I have provided the simplest configuration that can reproduce the error I reported, rather than relying on remote servers, TUN, graphical client interfaces, or other closed-source software.
- I have provided complete configuration files and logs, rather than providing only parts that I believe are useful due to confidence in my own intelligence.
Operating System
Linux
System Version
OpenWrt 23.05
Mihomo Version
1.18.5
Configuration File
rule-providers:
MyDirect:
type: http
url: https://example.com/MyDirect.txt
behavior: domain
format: text
Description
如果https://example.com/MyDirect.txt
只有一行时,启动会报错
Reproduction Steps
- 添加rule-provider配置,指向一个内容只有一行的文件/URL
- 启动
Logs
initial rule provider MyDirect error: file must have a `payload` field
汐殇 commented
@morytyann 只有一行就不要用ruleset了,没意义
Joseph Mory commented
@xishang0128 那在文档里加一个ruleset必须大于一行?
汐殇 commented
@morytyann 处理了,等会用新的alpha就好了
Joseph Mory commented
感谢