MetaCubeX / mihomo

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

[Bug] 使用 proxy-providers 在更新节点信息时接口 503 #815

Closed QuentinHsu closed 12 months ago

QuentinHsu commented 12 months ago

Verify steps

Clash version

1.16.0

What OS are you seeing the problem on?

Linux

Clash config

mixed-port: 7890
mode: rule
log-level: info

proxy-providers:
  # 全部节点
  subs: &subs
    type: http
    interval: 86400
    url: http://192.168.100.2:3000/download/collection/subs?target=Clash
    path: ./proxy-providers/subs.yml
    health-check:
      enable: true
      interval: 600
      url: https://captive.apple.com

proxies:

proxy-groups:
  - name: Outbound Policy
    type: select

    proxies:
      - Auto Select
      - Manual Select
      - Fallback
      - Country
      - DIRECT

  - name: Global Proxy
    type: select
    proxies:
      - Outbound Policy
      - DIRECT

  - name: Global Direct
    type: select
    proxies: &global-direct
      - DIRECT
      - Outbound Policy

  - name: Final
    type: select
    proxies: *global-direct

  - name: Apple
    type: select
    proxies: *global-direct

  - name: Microsoft
    type: select
    proxies: *global-direct

  - name: Duolingo
    type: select
    proxies:
      - Hong Kong
      - Auto Hong Kong
      - Fallback Hong Kong
      - DIRECT
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: Speedtest
    type: select
    proxies: *global-direct

  - name: Discord
    type: select
    proxies:
      - Auto Hong Kong
      - Fallback Hong Kong
      - DIRECT
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: Steam
    type: select
    proxies:
      - Auto Hong Kong
      - Fallback Hong Kong
      - DIRECT
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: AD Block
    type: select
    proxies:
      - REJECT
      - DIRECT

  - name: Privacy
    type: select
    proxies:
      - REJECT
      - DIRECT

  - name: Server Policy
    type: select
    proxies:
      - Auto Select
      - Manual Select
      - Fallback
      - Country

  - name: Manual Select
    type: select
    use:
      - subs

  - name: Auto Select
    type: url-test
    url: https://captive.apple.com
    interval: 300
    use:
      - subs

  - name: Fallback
    type: fallback
    url: https://captive.apple.com
    interval: 300
    use:
      - subs

  - name: Country
    type: select
    proxies: &Country
      - Hong Kong
      - Japan
      - Tai Wan
      - America
      - Other Country

  - name: Hong Kong
    type: select
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: Auto Hong Kong
    type: url-test
    url: https://captive.apple.com
    interval: 300
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: Fallback Hong Kong
    type: fallback
    url: https://captive.apple.com
    use:
      - subs
    filter: 港|🇭🇰|HK|Hong Kong

  - name: Japan
    type: select
    use:
      - subs
    filter: 日|🇯🇵|东京|JP|Japan

  - name: Tai Wan
    type: select
    use:
      - subs
    filter: 台|🇨🇳|🇹🇼|湾|TW|Taiwan

  - name: America
    type: select
    use:
      - subs
    filter: 美国|美|🇺🇲|US|American

  - name: Other Country
    type: select
    use:
      - subs
    filter: ^(?!.*(香港|港|🇭🇰|HK|Hong Kong|日本|日|🇯🇵|JP|Japan|台湾|台|🇹🇼|TW|Taiwan|美国|美|🇺🇲|US|American|CN)).*

rule-providers:
  privacy:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/QuentinHsu/network-rules/blob/release/Clash/DivineEngine-Privacy.yaml?raw=true
    path: ./ruleset/privacy.yaml

  ad-block:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Advertising/Advertising_Classical.yaml?raw=true
    path: ./ruleset/ad.yaml

  youtube:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/YouTube/YouTube.yaml?raw=true
    path: ./ruleset/youtube.yaml

  google:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Google/Google.yaml?raw=true
    path: ./ruleset/google.yaml

  github:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/GitHub/GitHub.yaml?raw=true
    path: ./ruleset/github.yaml

  twitter:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Twitter/Twitter.yaml?raw=true
    path: ./ruleset/twitter.yaml
  telegram:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Telegram/Telegram.yaml?raw=true
    path: ./ruleset/telegram.yaml

  apple:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Apple/Apple.yaml?raw=true
    path: ./ruleset/apple.yaml

  microsoft:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Microsoft/Microsoft.yaml?raw=true
    path: ./ruleset/microsoft.yaml

  speedtest:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Speedtest/Speedtest.yaml?raw=true
    path: ./ruleset/speedtest.yaml

  discord:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Discord/Discord.yaml?raw=true
    path: ./ruleset/discord.yaml

  steam:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Steam/Steam.yaml?raw=true
    path: ./ruleset/steam.yaml

  global-proxy:
    type: http
    interval: 86400
    behavior: classical
    url: https://ghproxy.com/https://github.com/QuentinHsu/network-rules/blob/release/Clash/ACL4SSR-Proxy.yaml?raw=true
    path: ./ruleset/global-proxy.yaml

rules:
  # ################ Local Rule
  - DOMAIN-SUFFIX,vercel.app,Global Proxy
  - DOMAIN-KEYWORD,duolingo,Duolingo
  # ################ Remote Rule
  - RULE-SET,ad-block,AD Block
  - RULE-SET,privacy,Privacy
  - RULE-SET,apple,Apple
  - RULE-SET,microsoft,Microsoft
  - RULE-SET,speedtest,Speedtest
  - RULE-SET,discord,Discord
  - RULE-SET,steam,Steam
  - RULE-SET,github,Global Proxy
  - RULE-SET,telegram,Global Proxy
  - RULE-SET,twitter,Global Proxy
  - RULE-SET,youtube,Global Proxy
  - RULE-SET,google,Global Proxy
  - RULE-SET,global-proxy,Global Proxy
  - GEOIP,CN,Global Direct
  - MATCH,Final

Clash log

debug 模式在面板上完全看不到

Description

是使用的 shellClash 跑 Meta。

同配置下,P 核无该问题。

CleanShot 2023-10-22 at 22 47 10@2x

QuentinHsu commented 12 months ago

被群里的大佬剖析出了问题所在:局域网 ip 没显式配置直连,P 核默认做了这部分。(😅,好尴尬)

目前问题已解决!