zzzgydi / clash-verge

A Clash GUI based on tauri. Supports Windows, macOS and Linux.
21.29k stars 3.18k forks source link

[BUG]配置文件格式错误无报错 #703

Open AXFOX opened 1 year ago

AXFOX commented 1 year ago

Describe the bug 当yaml配置文件书写格式存在某些错误时,客户端不会产生提示并自动使用了默认配置文件。 To Reproduce 例如使用如下demo:

proxies:
  - {name:  US-SanJose, type: trojan,server: trojan.com, port: 443, client-fingerprint: chrome,  password: passwd, tfo: false, skip-cert-verify: false}
  - {name:  RU,type: http,server: 85.26.146.169,port: 80}
proxy-groups:
  - name: PROXY
    type: select
    proxies:
      - US-SanJose
  - name: "US2RU"
    type: relay[
    proxies:
      - US-SanJose
      - RU
  - name: 规则外路由选择
    type: select
    proxies:
      - PROXY
      - DIRECT
rules:
#Steam
  - DOMAIN,steamcommunity.com,PROXY
- DOMAIN,cdn.cloudflare.steamstatic.com,PROXY
#EA
  - DOMAIN,ratt.juno.ea.com,PROXY
  - DOMAIN,cdn.mcr.ea.com,PROXY
  # escapefromtarkov
  - DOMAIN,www.escapefromtarkov.com,US2RU
  - DOMAIN,launcher.escapefromtarkov.com,US2RU
  - DOMAIN,launcher-seq.eft-project.com,US2RU
  - DOMAIN,mc.yandex.ru,US2RU

Expected behavior 我们需要一个提示告知用户文件语法有错误,如果不方便具体到“第21行”,至少也应该有一个错误提示。 Screenshots image

Information

Additional context Linux 下存在同样的问题,MAC暂无测试环境。

zzzgydi commented 1 year ago

日志应该有,但是ui确实没有