-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[fix] 修复延迟数据存放位置不对的问题 #860
Conversation
ghost
commented
Dec 4, 2023
- 我学习源代码的时候发现 判断延迟数据存放位置 的逻辑不是很对。翻看 PR记录 里说 history 主要存 ProxyProvider 的健康检查的延迟数据,extra 存 ProxyGroup 对应的延迟数据。按照现有逻辑,应该用测试的 url 与 ProxyProvider 里 healthcheck 的 url 进行比较(如果 Proxy 来自于某个 ProxyProvider 的话),如果 url 一致 或者 没有 healthcheck 则存 history,否则存 extra。但是,Proxy 并没有持有 healthcheck 的 url,导致存的位置不一定对。
重新实现了一下,把数据都放到
|
前端可以改,还是希望 API 能更清晰一些,现在前端的实现很迷 |
@wzdnzd Any comments? |
延迟相关的数据全部放到 {
"url1": {
"alive": true,
"history": [
{
"time": "2023-12-05T19:06:02.636288+08:00",
"delay": 292
},
{
"time": "2023-12-05T19:06:02.7369547+08:00",
"delay": 376
}
]
},
"url2": {
"alive": false,
"history": [
{
"time": "2023-12-05T19:06:02.636288+08:00",
"delay": 231
},
{
"time": "2023-12-05T19:06:02.7369547+08:00",
"delay": 0
}
]
}
} |
感觉这改动有点儿大啊,希望添加新功能的同时可以向下兼容 |
如果前端愿意适配的话,合并了也挺好,统一。之前之所以放到 |
@kunish 顺便问一下,支持不同代理组配置不同测试 URL 这个考虑吗? |
可以考虑 |
期待ing,感谢 |
不希望有任何修改原clash本来有的restful api的改动出现,可以有其他附加属性,但请不要修改或删除原有的属性和字段,这种大规模破坏兼容性的修改将不会被合并 |
@wwqgtxx 现在改成在延迟数据不管是 |
…out compromising rest api compatibility
ee9344c
to
941dd6c
Compare
4d819b7
to
d80fcb7
Compare
3a64d90
to
7ee6809
Compare
@tommytag 我倒是不反对 |
感谢回复,如果不反对的话我申请合并进Alpha |
一个月过去了, 请问一下还没有 pull 进去吗? |
@qwerr0 为什么要回复一个 merged 的 pr |