Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 增加可选参数使返回值保持合法. #743

Open
3 tasks done
lovitus opened this issue Apr 18, 2024 · 1 comment
Open
3 tasks done

[Feature] 增加可选参数使返回值保持合法. #743

lovitus opened this issue Apr 18, 2024 · 1 comment

Comments

@lovitus
Copy link

lovitus commented Apr 18, 2024

verify

  • 我已经仔细阅读项目文档,确认现有功能无法解决我的需求
  • 我已经检索过现有issue,确认与现有issue的内容并不重复
  • 我已经尝试自行解决,确认自己没有能力解决

功能描述

作者你好:
这个工具非常实用,并且在自己的配置里调用了很久. 目前有一个小问题:

  • 当使用list=true并且将外部订阅引入到自己的proxy-provider时候
    • 如果外部订阅的url失效了, 则是返回异常内容.
    • 如果外部订阅的token失效了, 也是返回异常内容.

虽然这两个场景都是因为没有有效数据,但是因为clash接受到的内容不是节点信息, 所以会导致clash无法启动. 造成在维护yml之前, 终端因为自动更新就离线了.
可否考虑增加类似 fallbacknode备用节点 或者alwaysvalid备用模板 这种类似的选项. 其实只要返回一个模板就行
{name: 返回列表无可用node, server: 127.0.0.1, port: 25500, type: ss, cipher: chacha20-ietf-poly1305, password: 123, udp: true}

感谢作者的分享,和宝贵的时间

可能的解决方案

No response

@lovitus
Copy link
Author

lovitus commented Apr 18, 2024

https://subconverter.example.exe/sub?target=clash&list=true&url=https://subscription.mightfail.com/subscribe?token=XXXXXXXXXXXXX|https://subconverter.example.exe/fallback.yml

image

目前是使用单独一个yaml进行合并,保证返回值是yaml格式,而不是报错信息.
希望能有更加优雅的方式,也避免需要单独起一个http server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant