MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
15.63k stars 2.56k forks source link

[Bug] url-test组自动切换无效,永远在第一个节点 #933

Closed Brbrbr1995 closed 9 months ago

Brbrbr1995 commented 9 months ago

Verify steps

Mihomo version

alpha-4cea312

What OS are you seeing the problem on?

Windows

Mihomo config

proxy-groups:

  - name: '⏱'
    type: url-test
    disable-udp: false
    tolerance: 100
    proxies:
    use:
      - Abroad

Mihomo log

No response

Description

Screenshot 2023-12-25 234017

cache.db 删了无效

xishang0128 commented 9 months ago

尝试一下新的alpha内核,主动测试一次延迟看之后的表现正常不正常

Brbrbr1995 commented 9 months ago

Screenshot 2023-12-26 190748

还是一样

xishang0128 commented 9 months ago

@Brbrbr1995 有手动测试过一次延迟吗,看看api/proxies/组名的fixed字段是不是空的

Brbrbr1995 commented 9 months ago

@Brbrbr1995 有手动测试过一次延迟吗,看看api/proxies/组名的fixed字段是不是空的

节点组那里和provider里都手动测了,cache.db也清过了,都没用 fixed字段是在哪里看?我配置文件里没有fixed

xishang0128 commented 9 months ago

@Brbrbr1995 clash api的内容

Brbrbr1995 commented 9 months ago

@Brbrbr1995 clash api的内容

这个不懂怎么看,我用的metacubexd面板

xishang0128 commented 9 months ago

@Brbrbr1995 https://wiki.metacubex.one/api/#proxiesname

Brbrbr1995 commented 9 months ago

curl http://127.0.0.1:9090/proxies 有两个fixed

姆斯特丹Sharktech数据中心","|11.19Mb","|29.56Mb","|16.09Mb","|15.24Mb","US 662 → tg@nicevpn123","波兰_Telegram(@djkkdcx)_5","|51.80Mb","|45.49Mb","|16.96Mb"],"expectedStatus":"*","extra":{},"fixed":"","history":[],"name":"⏱","now":"12|英国new01(1x) - 快狗云〖电报:@ccbaohe】...","testUrl":"","tfo":false,"type":"URLTest","udp":true,"xudp":false},"✅":{"alive":true,"all":["12|英国new01(1x) - 快狗云〖电报:@ccbaohe】...","|234.00Mb 2","12|TW-板桥3-6(TCP) - 麻雀加速器 Sparrow〖...","12|TW-板桥1-1(TCP) - 麻雀加速器 Sparrow〖...","|42.13Mb","|42.59Mb","|11.41Mb","Relay_🇨🇳CN |19.83Mb","Relay_🇨🇳CN |19.61Mb"," 12|TW-台中1-1(TCP) - 麻雀加速器 Sparrow〖...","|56.31Mb","LT+174+→+tg@nicevpn123","|10.08Mb","|24.12Mb","Relay_🇨🇳CN-🇯� JJP_281 |15.12Mb","|32.52Mb","|10.03Mb","12|英国new01(1x) - 快狗云〖电报:@ccbaohe】... 2","|25.79Mb","|28.63Mb","荷兰 北荷兰省阿姆斯特丹Sharktech数据中心","|11.19Mb","|29.56Mb","|16.09Mb","|15.24Mb","US 662 → tg@nicevpn123","波兰_Telegram(@djkkdcx)_5","|51.80Mb","|45.49Mb","|16.96Mb"],"expectedStatus":"*","extra":{},"fixed":"","history":[],"name":"✅","now":"12|英 国new01(1x) - 快狗云〖电报:@ccbaohe】...","testUrl":"","tfo":false,"type":"Fallback","udp":true,"xudp":false},"中国【付费 推荐:https://jdyvip.link/】112_9@70":{"alive":false,"extra":{"https://www.baidu.com/":{"alive":false,"history":[{"time":"2023-12-26T19:54:36.958505+08:00","delay":0},{"time":"2023-12-26T19:55:06.9729959+08:00","delay":0},{"time":"2023-12-26T19:55:36.9777627+08:00","delay":0},{"time":"2023-12-26T19:56:06.9722298+08:00","delay":0},{"time":"2023-12-26T19:56:36.9731737+08:00","delay":0},{"time":"2023-12-26T19:57:06.9728528+08:00","delay":0},{"time":"2023-12-26T19:57:36.9752989+08:00","delay":0},{"time":"2023-12-26T19:58:06.9724107+08:00","delay":0},{"time":"2023-12-26T19:58:36.9758397+08:00","delay":0},{"time":"2023-12-26T19:59:06.9771793

Brbrbr1995 commented 9 months ago

我在面板里点其他节点可以手动切换,点一个无效节点就回到第一个了

Brbrbr1995 commented 9 months ago

我把provider里的节点移到配置文件里就正常了

xishang0128 commented 9 months ago

@Brbrbr1995 要你那个组的,不是整个proxies

Brbrbr1995 commented 9 months ago

cmd 里好像识别不了emoji,组名粘贴进去返回 resourse not found 之类的

Brbrbr1995 commented 9 months ago

http://127.0.0.1:9090/proxies/UTNAME

{"alive":true,"all":["12|TW-板桥1-1(TCP) - 麻雀加速器 Sparrow〖...","韩国特殊|@ripaojiedian","|234.00Mb 2","US 845 → tg@nicevpn123","Relay_🇨🇳CN |19.61Mb","美国 CloudFlare节点","|24.12Mb","github.com/freefq - 美国CloudFlare节点 26","12|英国new01(1x) - 快狗云〖电报:@ccbaohe】...","Relay_🇨🇳CN |19.83Mb","|28.63Mb","|25.79Mb","|16.96Mb","github.com/freefq - 捷克 31","芬兰_Telegram(@djkkdcx)_1","US 662 → tg@nicevpn123","菲律宾_Telegram(@djkkdcx)_16","法国_Telegram(@djkkdcx)"],"expectedStatus":"*","extra":{},"fixed":"","history":[],"name":"UTNAME","now":"12|TW-板桥1-1(TCP) - 麻雀加速器 Sparrow〖...","testUrl":"","tfo":false,"type":"URLTest","udp":true,"xudp":false}

Screenshot 2023-12-26 211938

xishang0128 commented 9 months ago

@Brbrbr1995 fixed没内容就是正常自动选择

Brbrbr1995 commented 9 months ago

1.17.0 测试正常的, alpha之前也是正常的,现在删掉proxy provider把节点移到配置文件里就正常了,我配置文件里是没有节点,都是用的provider里的,

xishang0128 commented 9 months ago

@Brbrbr1995 如果fixed是空,还是这样,那就没办法,没法复现

Brbrbr1995 commented 9 months ago

手动点一个无效节点会跳回第一个节点(第一个也无效),fixed 里还是手动点的无效节点,测速之后fixed为空

Brbrbr1995 commented 9 months ago
proxy-providers:

  Abroad:
    type: http
    url: "http://192.168.1.14/Proxy/Abroad.yaml"
    path: ./Provider/Proxy/Abroad.yaml
    interval: 60
    health-check:
      enable: true
      interval: 30
      lazy: false
      url: "https://www.google.com/"

proxy-groups:

  - name: 'UTNAME'
    type: url-test
    disable-udp: false
    tolerance: 1
    url: "https://www.google.com/" ###加这行之后正常
    proxies:
    use:
      - Abroad

proxies:

节点组里加了url字段之后正常, 我以前测试用了provider里的health-check这里的测速url就无效了,避免重复测试组里的就删掉了, 现在每个组里都加 url 字段会重复测速吗? 还是每个组可以用不同测速url,结果会互相覆盖吗?

xishang0128 commented 9 months ago

@Brbrbr1995 组内的只负责测proxies的

Brbrbr1995 commented 9 months ago

这算不算bug? url-test 会改回原来的测速逻辑吗

Brbrbr1995 commented 9 months ago

alpha-2e87c6f 我这测试还是一样

Brbrbr1995 commented 9 months ago

alpha-2e87c6f

health check 每个节点会测速两次 分别用provider 和 策略组里的url 间隔是用的 provider 里的

proxy-providers:

  TEST:
    type: http
    url: "http://192.168.1.14/Proxy/TEST.yaml"
    path: ./Provider/Proxy/TEST.yaml
    interval: 600
    health-check:
      enable: true
      interval: 30
      lazy: false
      url: "https://www.google.com/"

proxy-groups:

  - name: 'UTNAME'
    type: url-test
    disable-udp: false
    tolerance: 1
    interval: 20
    url: "https://www.bing.com/"
    proxies:
    use:
      - TEST
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Start New Health Checking {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.bing.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.bing.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.bing.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.google.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.google.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.bing.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.google.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5071945+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.google.com/, id: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:17.5959094+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.5972404+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6096312+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6096312+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6119525+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6119999+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6353901+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.6376612+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:17.8937655+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.bing.com/, alive: false, delay: 65535 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.0138972+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.google.com/, alive: true, delay: 502 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.0761961+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.google.com/, alive: true, delay: 565 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.0788246+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.google.com/, alive: true, delay: 567 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.1010542+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.google.com/, alive: true, delay: 580 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.3525325+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.bing.com/, alive: true, delay: 841 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.3871045+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.bing.com/, alive: true, delay: 879 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.4067222+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.bing.com/, alive: true, delay: 897 ms uid: {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:18.4067222+08:00" level=debug msg="Finish A Health Checking {62905e07-196e-4844-b8c5-0aeaf3ebfb32}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Start New Health Checking {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.bing.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.bing.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.bing.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.google.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.google.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.google.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.bing.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.507246+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.google.com/, id: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:47.5946374+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.5952121+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.5958028+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.596179+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.6078997+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.6105754+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.6137376+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.6148517+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:45:47.8909413+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.bing.com/, alive: false, delay: 65535 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.017142+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.google.com/, alive: true, delay: 507 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.0294084+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.google.com/, alive: true, delay: 518 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.0736188+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.google.com/, alive: true, delay: 563 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.1935687+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.google.com/, alive: true, delay: 682 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.2032605+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.bing.com/, alive: true, delay: 684 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.3061603+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.bing.com/, alive: true, delay: 798 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.3572599+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.bing.com/, alive: true, delay: 848 ms uid: {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:45:48.3572599+08:00" level=debug msg="Finish A Health Checking {ab1128b6-342c-453c-9969-991e35fa0acc}"
time="2023-12-27T19:46:17.5073332+08:00" level=debug msg="Start New Health Checking {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.507382+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.google.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.bing.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.bing.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.bing.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-3, url: https://www.google.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-2, url: https://www.google.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-4, url: https://www.google.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.5078983+08:00" level=debug msg="Health Checking, proxy: HK-1, url: https://www.bing.com/, id: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:17.6080787+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6096446+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6373076+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6378264+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6379425+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6379425+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6401478+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:17.6418771+08:00" level=debug msg="use specified fingerprint:Chrome"
time="2023-12-27T19:46:18.0577794+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.google.com/, alive: true, delay: 547 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.060306+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.google.com/, alive: true, delay: 549 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.0679409+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.google.com/, alive: true, delay: 550 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.0808514+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.google.com/, alive: true, delay: 570 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.3252959+08:00" level=debug msg="Health Checked, proxy: HK-2, url: https://www.bing.com/, alive: true, delay: 816 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.3336983+08:00" level=debug msg="Health Checked, proxy: HK-3, url: https://www.bing.com/, alive: true, delay: 823 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.3544988+08:00" level=debug msg="Health Checked, proxy: HK-1, url: https://www.bing.com/, alive: true, delay: 843 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.4532148+08:00" level=debug msg="Health Checked, proxy: HK-4, url: https://www.bing.com/, alive: true, delay: 943 ms uid: {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
time="2023-12-27T19:46:18.4532148+08:00" level=debug msg="Finish A Health Checking {16da6c66-6a3e-4f1e-9594-16610f7e1c5c}"
john5du commented 9 months ago

alpha-2e87c6f url-test手动check会504

  - name: Auto - UrlTest
    type: url-test
    use:
    - aaa
    interval: 300
    filter: "(?i)日本"
    tolerance: 50

image

xishang0128 commented 9 months ago

@E021ntox 正常配置即可,没发现什么问题 image

xishang0128 commented 9 months ago

@xishang0128 能否给出一份demo配置,已经多人测试过,按照正常配置无法使用

proxy-groups:
- name: default
  type: url-test
  include-all-providers: true
  tolerance: 10
  interval: 300
  lazy: false
xishang0128 commented 9 months ago

@E021ntox 照正常设置即可,各管各的

xishang0128 commented 9 months ago

@E021ntox 只有启动的时候会触发这个test,后续都是各自处理各自的

PuerNya commented 9 months ago

@E021ntox 当 provider 的 health-check url 和 url-test 不一致时,并不会参照 provider 的测定结果进行判定

PuerNya commented 9 months ago

@E021ntox test 0b2856b

xishang0128 commented 9 months ago

@E021ntox 再试试新的

PuerNya commented 9 months ago

@E021ntox 早就是 gstatic204 了

PuerNya commented 9 months ago

@E021ntox 刚刚讲错了,url 有默认值,但是延迟会置 0,也就是说默认不触发 health-check

lilei121 commented 9 months ago

@E021ntox 正常配置即可,没发现什么问题 image

这个是什么ui界面啊