MetaCubeX / mihomo

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

[Bug]随机出现的高cpu占用率 低连接数 低内存占用率 毫无规律 #629

Open RhythmNz opened 1 year ago

RhythmNz commented 1 year ago

Verify steps

Clash version

v1.14.5

What OS are you seeing the problem on?

OpenBSD/FreeBSD

Clash config

---
proxy-groups:
- name: Auto - UrlTest
  type: url-test
  proxies:
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
  url: https://cp.cloudflare.com/generate_204
  interval: '600'
  tolerance: '150'
- name: Proxy
  type: select
  proxies:
  - Auto - UrlTest
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Domestic
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Others
  type: select
  proxies:
  - Proxy
  - DIRECT
  - Domestic
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Microsoft
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Apple
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Scholar
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Bilibili
  type: select
  proxies:
  - AsianTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Bahamut
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: HBO
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Pornhub
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Netflix
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Disney
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Youtube
  type: select
  disable-udp: true
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Spotify
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Steam
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: AdBlock
  type: select
  proxies:
  - REJECT
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: AsianTV
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: GlobalTV
  type: select
  proxies:
  - Proxy
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Speedtest
  type: select
  proxies:
  - Proxy
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: Telegram
  type: select
  proxies:
  - Proxy
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: PayPal
  type: select
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: softbank-jp
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: cn2giae-us
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: qcloud-hk
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: apex-choose
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: origin-choose
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: game-download
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: game-choose
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: steam2022rule
  type: select
  disable-udp: false
  proxies:
  - Proxy
  - DIRECT
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
- name: steamdownload-hw
  type: select
  disable-udp: false
  proxies:
  - DIRECT
  - REJECT
  - Proxy
  - qcloudhk
  - bwh-jp
  - vxlink-media
  - vxlink-gift
  - sg-linode
  - bwhus-cn2
  - vxlink-mediatw
  - bwhjp-vxlink
proxies:
redir-port: 7892
tproxy-port: 7895
port: 7890
socks-port: 7891
mixed-port: 7893
mode: rule
log-level: silent
allow-lan: true
external-controller: 0.0.0.0:9090
secret: moeran1126
bind-address: "*"
external-ui: "/usr/share/openclash/ui"
ipv6: false
geodata-loader: standard
find-process-mode: 'off'
dns:
  enable: true
  ipv6: false
  enhanced-mode: redir-host
  listen: 0.0.0.0:7874
  nameserver:
  - dhcp://"pppoe-wan"
  - 123.181.197.1
  - 222.222.202.202
  - 222.222.222.222
  - 114.114.114.114
  - 119.29.29.29
  - 180.76.76.76
  fallback:
  - 1.1.1.1
  - 8.8.8.8
  default-nameserver:
  - 123.181.197.1
  - 222.222.202.202
  - 222.222.222.222
  - 114.114.114.114
  - 119.29.29.29
  - 180.76.76.76
  - 1.1.1.1
  - 8.8.8.8
  fallback-filter:
    geoip: true
    geoip-code: CN
    ipcidr:
    - 0.0.0.0/8
    - 10.0.0.0/8
    - 100.64.0.0/10
    - 127.0.0.0/8
    - 169.254.0.0/16
    - 172.16.0.0/12
    - 192.0.0.0/24
    - 192.0.2.0/24
    - 192.88.99.0/24
    - 192.168.0.0/16
    - 198.18.0.0/15
    - 198.51.100.0/24
    - 203.0.113.0/24
    - 224.0.0.0/4
    - 240.0.0.0/4
    - 255.255.255.255/32
    domain:
    - "+.google.com"
    - "+.facebook.com"
    - "+.youtube.com"
    - "+.googlevideo.com"
  nameserver-policy:
    xvcf1.xboxlive.com: 4.2.2.1
    xvcf2.xboxlive.com: 4.2.2.1
    msftconnecttest.com: 114.114.114.114
    "+.cm.steampowered.com": 114.114.114.114
  use-hosts: true
sniffer:
  enable: true
  force-dns-mapping: true
  force-domain:
  - "+.netflix.com"
  - "+.nflxvideo.net"
  - "+.amazonaws.com"
  - "+.media.dssott.com"
  - "+.ipv6.microsoft.com"
  - "+.xboxlive.com"
  - "+.cm.steampowered.com"
  - "+.steamserver.net"
  skip-domain:
  - "+.apple.com"
  - Mijia Cloud
  - "+.jd.com"
  sniff:
    TLS:
    HTTP:
      ports:
      - 80
      - 8080-8880
      override-destination: true
tun:
  enable: true
  stack: system
  device: utun
  auto-route: false
  auto-detect-interface: false
  dns-hijack:
  - tcp://any:53
profile:
  store-selected: true
  store-fake-ip: true
hosts:
  raw.githubusercontent.com: 185.199.108.133
  xvcf1.xboxlive.com: 192.168.2.213
  xvcf2.xboxlive.com: 192.168.2.213
  assets1.xboxlive.com: 192.168.2.213
  assets2.xboxlive.com: 192.168.2.213
  d1.xboxlive.com: "\t192.168.2.213"
  d2.xboxlive.com: "\t192.168.2.213"
  dlassets.xboxlive.com: 192.168.2.213
  dlassets2.xboxlive.com: 192.168.2.213
  dlassets.xboxlive.cn: 113.249.152.6
  dlassets2.xboxlive.cn: 113.249.152.6
  assets1.xboxlive.cn: 113.249.87.133
  assets2.xboxlive.cn: 113.249.87.133
  d1.xboxlive.cn: 113.249.87.133
  d2.xboxlive.cn: 113.249.87.133
authentication:
- Clash:31iQm35g
rule-providers:
  Reject:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Reject.yaml
    path: "./rule_provider/Reject"
    interval: 86400
  Special:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Special.yaml
    path: "./rule_provider/Special"
    interval: 86400
  Netflix:
    type: http
    behavior: classical
    path: "/etc/openclash/rule_provider/Netflix.yaml"
    url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Video/Netflix.yaml
    interval: 86400
  Spotify:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Spotify.yaml
    path: "./rule_provider/Spotify"
    interval: 86400
  YouTube:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/YouTube.yaml
    path: "./rule_provider/YouTube"
    interval: 86400
  Bilibili:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bilibili.yaml
    path: "./rule_provider/Bilibili"
    interval: 86400
  IQ:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQ.yaml
    path: "./rule_provider/IQI"
    interval: 86400
  IQIYI:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQIYI.yaml
    path: "./rule_provider/IQYI"
    interval: 86400
  Letv:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Letv.yaml
    path: "./rule_provider/Letv"
    interval: 86400
  Netease Music:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Netease%20Music.yaml
    path: "./rule_provider/Netease_Music"
    interval: 86400
  Tencent Video:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Tencent%20Video.yaml
    path: "./rule_provider/Tencent_Video"
    interval: 86400
  Youku:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Youku.yaml
    path: "./rule_provider/Youku"
    interval: 86400
  WeTV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/WeTV.yaml
    path: "./rule_provider/WeTV"
    interval: 86400
  ABC:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ABC.yaml
    path: "./rule_provider/ABC"
    interval: 86400
  Abema TV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Abema%20TV.yaml
    path: "./rule_provider/Abema_TV"
    interval: 86400
  Amazon:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Amazon.yaml
    path: "./rule_provider/Amazon"
    interval: 86400
  Apple Music:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20Music.yaml
    path: "./rule_provider/Apple_Music"
    interval: 86400
  Apple News:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20News.yaml
    path: "./rule_provider/Apple_News"
    interval: 86400
  Apple TV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20TV.yaml
    path: "./rule_provider/Apple_TV"
    interval: 86400
  Bahamut:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bahamut.yaml
    path: "./rule_provider/Bahamut"
    interval: 86400
  BBC iPlayer:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/BBC%20iPlayer.yaml
    path: "./rule_provider/BBC_iPlayer"
    interval: 86400
  DAZN:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/DAZN.yaml
    path: "./rule_provider/DAZN"
    interval: 86400
  Discovery Plus:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Discovery%20Plus.yaml
    path: "./rule_provider/Discovery_Plus"
    interval: 86400
  Disney Plus:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Disney%20Plus.yaml
    path: "./rule_provider/Disney_Plus"
    interval: 86400
  encoreTVB:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/encoreTVB.yaml
    path: "./rule_provider/encoreTVB"
    interval: 86400
  F1 TV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/F1%20TV.yaml
    path: "./rule_provider/F1_TV"
    interval: 86400
  Fox Now:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%20Now.yaml
    path: "./rule_provider/Fox_Now"
    interval: 86400
  Fox+:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%2B.yaml
    path: "./rule_provider/Fox+"
    interval: 86400
  HBO Go:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Go.yaml
    path: "./rule_provider/HBO_Go"
    interval: 86400
  HBO Max:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Max.yaml
    path: "./rule_provider/HBO_Max"
    interval: 86400
  Hulu Japan:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu%20Japan.yaml
    path: "./rule_provider/Hulu_Japan"
    interval: 86400
  Hulu:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu.yaml
    path: "./rule_provider/Hulu"
    interval: 86400
  Japonx:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Japonx.yaml
    path: "./rule_provider/Japonx"
    interval: 86400
  JOOX:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/JOOX.yaml
    path: "./rule_provider/JOOX"
    interval: 86400
  KKBOX:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKBOX.yaml
    path: "./rule_provider/KKBOX"
    interval: 86400
  KKTV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKTV.yaml
    path: "./rule_provider/KKTV"
    interval: 86400
  Line TV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Line%20TV.yaml
    path: "./rule_provider/Line_TV"
    interval: 86400
  myTV SUPER:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/myTV%20SUPER.yaml
    path: "./rule_provider/myTV_SUPER"
    interval: 86400
  Niconico:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Niconico.yaml
    path: "./rule_provider/Niconico"
    interval: 86400
  Pandora:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pandora.yaml
    path: "./rule_provider/Pandora"
    interval: 86400
  PBS:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/PBS.yaml
    path: "./rule_provider/PBS"
    interval: 86400
  Pornhub:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pornhub.yaml
    path: "./rule_provider/Pornhub"
    interval: 86400
  Soundcloud:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Soundcloud.yaml
    path: "./rule_provider/Soundcloud"
    interval: 86400
  ViuTV:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ViuTV.yaml
    path: "./rule_provider/ViuTV"
    interval: 86400
  Telegram:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Telegram.yaml
    path: "./rule_provider/Telegram"
    interval: 86400
  Crypto:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Crypto.yaml
    path: "./rule_provider/Crypto"
    interval: 86400
  Discord:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Discord.yaml
    path: "./rule_provider/Discord"
    interval: 86400
  Steam:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Steam.yaml
    path: "./rule_provider/Steam"
    interval: 86400
  Speedtest:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Speedtest.yaml
    path: "./rule_provider/Speedtest"
    interval: 86400
  PayPal:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/PayPal.yaml
    path: "./rule_provider/PayPal"
    interval: 86400
  Microsoft:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Microsoft.yaml
    path: "./rule_provider/Microsoft"
    interval: 86400
  ChatGPT:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/ChatGPT.yaml
    path: "./rule_provider/ChatGPT"
    interval: 86400
  PROXY:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Proxy.yaml
    path: "./rule_provider/Proxy"
    interval: 86400
  Domestic:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic.yaml
    path: "./rule_provider/Domestic"
    interval: 86400
  Apple:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Apple.yaml
    path: "./rule_provider/Apple"
    interval: 86400
  Google FCM:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Google%20FCM.yaml
    path: "./rule_provider/Google FCM"
    interval: 86400
  Scholar:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Scholar.yaml
    path: "./rule_provider/Scholar"
    interval: 86400
  Domestic IPs:
    type: http
    behavior: ipcidr
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic%20IPs.yaml
    path: "./rule_provider/Domestic_IPs"
    interval: 86400
  LAN:
    type: http
    behavior: classical
    url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/LAN.yaml
    path: "./rule_provider/LAN"
    interval: 86400
  国内域名白名单:
    type: http
    behavior: classical
    path: "/etc/openclash/rule_provider/China.yaml"
    url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml
    interval: 86400
  国内IP白名单:
    type: http
    behavior: ipcidr
    path: "/etc/openclash/rule_provider/ChinaIP.yaml"
    url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml
    interval: 86400
  AmazonIp:
    type: http
    behavior: ipcidr
    path: "/etc/openclash/rule_provider/AmazonIp.yaml"
    url: https://raw.fastgit.org/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/AmazonIp.yaml
    interval: 86400
  Amazon(By ACL4SSR):
    type: http
    behavior: classical
    path: "/etc/openclash/rule_provider/Amazon-ACL4SSR.yaml"
    url: https://raw.fastgit.org/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/Amazon.yaml
    interval: 86400
  Netflix(By ACL4SSR):
    type: http
    behavior: classical
    path: "/etc/openclash/rule_provider/Netflix-ACL4SSR.yaml"
    url: https://raw.fastgit.org/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/Netflix.yaml
    interval: 86400
  Netflix(By lhie1):
    type: http
    behavior: classical
    path: "/etc/openclash/rule_provider/Netflix-lhie1.yaml"
    url: https://raw.fastgit.org/dler-io/Rules/master/Clash/Provider/Media/Netflix.yaml
    interval: 86400
  steam2022new:
    type: file
    behavior: domain
    path: "./rule_provider/steam2022.yaml"
  origin-download:
    type: file
    behavior: domain
    path: "./rule_provider/origindownload.yaml"
  steam-download:
    type: file
    behavior: domain
    path: "./rule_provider/steamdownload.yaml"
  xboxLiverule:
    type: file
    behavior: domain
    path: "./rule_provider/xboxlivedownload.yaml"
script:
  code: |
    def main(ctx, metadata):
        ruleset_action = {"Reject": "AdBlock",
            "Special": "DIRECT",
            "Netflix": "Netflix",
            "Spotify": "Spotify",
            "YouTube": "Youtube",
            "Disney Plus": "Disney",
            "Bilibili": "Bilibili",
            "IQ": "AsianTV",
            "IQIYI": "AsianTV",
            "Letv": "AsianTV",
            "Netease Music": "AsianTV",
            "Tencent Video": "AsianTV",
            "Youku": "AsianTV",
            "WeTV": "AsianTV",
            "ABC": "GlobalTV",
            "Abema TV": "GlobalTV",
            "Amazon": "GlobalTV",
            "Bahamut": "Bahamut",
            "BBC iPlayer": "GlobalTV",
            "DAZN": "Disney",
            "Discovery Plus": "Disney",
            "encoreTVB": "GlobalTV",
            "F1 TV": "GlobalTV",
            "Fox Now": "GlobalTV",
            "Fox+": "GlobalTV",
            "HBO Go": "HBO",
            "HBO Max": "HBO",
            "Hulu Japan": "GlobalTV",
            "Hulu": "GlobalTV",
            "Japonx": "GlobalTV",
            "JOOX": "GlobalTV",
            "KKBOX": "GlobalTV",
            "KKTV": "GlobalTV",
            "Line TV": "GlobalTV",
            "myTV SUPER": "GlobalTV",
            "Niconico": "GlobalTV",
            "Pandora": "GlobalTV",
            "PBS": "GlobalTV",
            "Pornhub": "Pornhub",
            "Soundcloud": "GlobalTV",
            "ViuTV": "GlobalTV",
            "Telegram": "Telegram",
            "Crypto": "Telegram",
            "Discord": "Telegram",
            "Steam": "Steam",
            "Speedtest": "Speedtest",
            "PayPal": "PayPal",
            "Microsoft": "Microsoft",
            "ChatGPT": "Proxy",
            "Apple Music": "GlobalTV",
            "Apple News": "GlobalTV",
            "Apple TV": "GlobalTV",
            "Apple": "Apple",
            "Google FCM": "Scholar",
            "Scholar": "Scholar",
            "PROXY": "Proxy",
            "Domestic": "Domestic",
            "Domestic IPs": "Domestic",
            "LAN": "DIRECT"
          }

        port = int(metadata["dst_port"])

        if metadata["network"] == "UDP" and port == 443:
            ctx.log('[Script] matched QUIC traffic use reject')
            return "REJECT"

        port_list = [21, 22, 23, 53, 80, 123, 143, 194, 443, 465, 587, 853, 993, 995, 998, 2052, 2053, 2082, 2083, 2086, 2095, 2096, 3389, 5222, 5228, 5229, 5230, 8080, 8443, 8880, 8888, 8889]
        if port not in port_list:
            ctx.log('[Script] not common port use direct')
            return "DIRECT"

        if metadata["dst_ip"] == "":
            metadata["dst_ip"] = ctx.resolve_ip(metadata["host"])

        for ruleset in ruleset_action:
            if ctx.rule_providers[ruleset].match(metadata):
                return ruleset_action[ruleset]

        if metadata["dst_ip"] != "":
            code = ctx.geoip(metadata["dst_ip"])
            if code == "CN":
                ctx.log('[Script] Geoip CN')
                return "Domestic"

        ctx.log('[Script] FINAL')
        return "Others"
rules:
- DST-PORT,7895,REJECT
- DST-PORT,7892,REJECT
- IP-CIDR,198.18.0.1/16,REJECT,no-resolve
- IP-CIDR,172.31.255.2/32,Proxy
- IP-CIDR,124.156.137.104/32,DIRECT
- IP-CIDR,45.78.49.19/32,DIRECT
- IP-CIDR,199.180.117.236/32,DIRECT
- IP-CIDR,117.24.13.130/32,DIRECT
- IP-CIDR,103.10.124.0/24,DIRECT
- IP-CIDR,103.10.125.0/24,DIRECT
- IP-CIDR,103.28.54.0/24,DIRECT
- IP-CIDR,146.66.152.0/24,DIRECT
- IP-CIDR,146.66.155.0/24,DIRECT
- IP-CIDR,153.254.86.0/24,DIRECT
- IP-CIDR,155.133.224.0/23,DIRECT
- IP-CIDR,155.133.226.0/24,DIRECT
- IP-CIDR,155.133.227.0/24,DIRECT
- IP-CIDR,155.133.230.0/24,DIRECT
- IP-CIDR,155.133.232.0/24,DIRECT
- IP-CIDR,155.133.233.0/24,DIRECT
- IP-CIDR,155.133.234.0/24,DIRECT
- IP-CIDR,155.133.236.0/23,DIRECT
- IP-CIDR,155.133.238.0/24,DIRECT
- IP-CIDR,155.133.239.0/24,DIRECT
- IP-CIDR,155.133.240.0/23,DIRECT
- IP-CIDR,155.133.245.0/24,DIRECT
- IP-CIDR,155.133.246.0/24,DIRECT
- IP-CIDR,155.133.248.0/24,DIRECT
- IP-CIDR,155.133.249.0/24,DIRECT
- IP-CIDR,155.133.250.0/24,DIRECT
- IP-CIDR,155.133.251.0/24,DIRECT
- IP-CIDR,155.133.252.0/24,DIRECT
- IP-CIDR,155.133.253.0/24,DIRECT
- IP-CIDR,155.133.254.0/24,DIRECT
- IP-CIDR,155.133.255.0/24,DIRECT
- IP-CIDR,162.254.192.0/24,DIRECT
- IP-CIDR,162.254.193.0/24,DIRECT
- IP-CIDR,162.254.194.0/23,DIRECT
- IP-CIDR,162.254.195.0/24,DIRECT
- IP-CIDR,162.254.196.0/24,DIRECT
- IP-CIDR,162.254.197.0/24,DIRECT
- IP-CIDR,162.254.198.0/24,DIRECT
- IP-CIDR,162.254.199.0/24,DIRECT
- IP-CIDR,185.25.182.0/24,DIRECT
- IP-CIDR,185.25.183.0/24,DIRECT
- IP-CIDR,190.217.33.0/24,DIRECT
- IP-CIDR,192.69.96.0/22,DIRECT
- IP-CIDR,205.185.194.0/24,DIRECT
- IP-CIDR,205.196.6.0/24,DIRECT
- IP-CIDR,208.64.200.0/24,DIRECT
- IP-CIDR,208.64.201.0/24,DIRECT
- IP-CIDR,208.64.202.0/24,DIRECT
- IP-CIDR,208.64.203.0/24,DIRECT
- IP-CIDR,208.78.164.0/22,DIRECT
- DOMAIN,api.ipify.org,DIRECT
- DOMAIN,api.steampowered.com,DIRECT
- DOMAIN-SUFFIX,cm.steampowered.com,DIRECT
- DOMAIN-SUFFIX,steamserver.net,DIRECT
- DOMAIN-KEYWORD,cm.steampowered,DIRECT
- DOMAIN-KEYWORD,steamserver,DIRECT
- DOMAIN-KEYWORD,iexui,DIRECT
- DOMAIN-SUFFIX,api.warframe.com,DIRECT
- DOMAIN-SUFFIX,raw.githubusercontent.com,Proxy
- DOMAIN,object-bnolauncher-pf.bandainamco-ol.jp,softbank-jp
- DOMAIN,api-bnolauncher.bandainamco-ol.jp,softbank-jp
- DOMAIN,account.bandainamcoid.com,softbank-jp
- DOMAIN,account-api.bandainamcoid.com,softbank-jp
- DOMAIN-SUFFIX,bandainamco-ol.jp,softbank-jp
- DOMAIN-SUFFIX,bandainamcoid.com,softbank-jp
- DOMAIN-SUFFIX,blue-protocol.com,softbank-jp
- DOMAIN-SUFFIX,ipv6.microsoft.com,Proxy
- DOMAIN-SUFFIX,xboxlive.com,Proxy
- IP-CIDR,43.155.88.130/32,DIRECT
- IP-CIDR,45.78.54.254/32,DIRECT
- IP-CIDR,137.220.40.20/32,DIRECT
- IP-CIDR,192.46.231.64/32,DIRECT
- IP-CIDR,199.193.125.84/32,DIRECT
- IP-CIDR,212.50.255.167/32,DIRECT
- IP-CIDR,64.64.227.7/32,DIRECT
- SRC-PORT,4950,DIRECT
- SRC-PORT,4955,DIRECT
- DST-PORT,5555,DIRECT
- DST-PORT,5556,DIRECT
- RULE-SET,AmazonIp,Netflix
- RULE-SET,Amazon(By ACL4SSR),Netflix
- RULE-SET,Netflix(By ACL4SSR),Netflix
- RULE-SET,steam2022new,steam2022rule
- RULE-SET,origin-download,game-download
- RULE-SET,steam-download,steamdownload-hw
- RULE-SET,xboxLiverule,game-download
- RULE-SET,Reject,AdBlock
- RULE-SET,Special,DIRECT
- RULE-SET,Netflix,Netflix
- RULE-SET,Spotify,Spotify
- RULE-SET,YouTube,Youtube
- RULE-SET,Disney Plus,Disney
- RULE-SET,Bilibili,Bilibili
- RULE-SET,IQ,AsianTV
- RULE-SET,IQIYI,AsianTV
- RULE-SET,Letv,AsianTV
- RULE-SET,Netease Music,AsianTV
- RULE-SET,Tencent Video,AsianTV
- RULE-SET,Youku,AsianTV
- RULE-SET,WeTV,AsianTV
- RULE-SET,ABC,GlobalTV
- RULE-SET,Abema TV,GlobalTV
- RULE-SET,Amazon,GlobalTV
- RULE-SET,Bahamut,Bahamut
- RULE-SET,BBC iPlayer,GlobalTV
- RULE-SET,DAZN,Disney
- RULE-SET,Discovery Plus,Disney
- RULE-SET,encoreTVB,GlobalTV
- RULE-SET,F1 TV,GlobalTV
- RULE-SET,Fox Now,GlobalTV
- RULE-SET,Fox+,GlobalTV
- RULE-SET,HBO Go,HBO
- RULE-SET,HBO Max,HBO
- RULE-SET,Hulu Japan,GlobalTV
- RULE-SET,Hulu,GlobalTV
- RULE-SET,Japonx,GlobalTV
- RULE-SET,JOOX,GlobalTV
- RULE-SET,KKBOX,GlobalTV
- RULE-SET,KKTV,GlobalTV
- RULE-SET,Line TV,GlobalTV
- RULE-SET,myTV SUPER,GlobalTV
- RULE-SET,Niconico,GlobalTV
- RULE-SET,Pandora,GlobalTV
- RULE-SET,PBS,GlobalTV
- RULE-SET,Pornhub,Pornhub
- RULE-SET,Soundcloud,GlobalTV
- RULE-SET,ViuTV,GlobalTV
- RULE-SET,Telegram,Telegram
- RULE-SET,Crypto,Telegram
- RULE-SET,Discord,Telegram
- RULE-SET,Steam,Steam
- RULE-SET,Speedtest,Speedtest
- RULE-SET,PayPal,PayPal
- RULE-SET,Microsoft,Microsoft
- RULE-SET,ChatGPT,Proxy
- RULE-SET,Apple Music,GlobalTV
- RULE-SET,Apple News,GlobalTV
- RULE-SET,Apple TV,GlobalTV
- RULE-SET,Apple,Apple
- RULE-SET,Google FCM,Scholar
- RULE-SET,Scholar,Scholar
- RULE-SET,PROXY,Proxy
- RULE-SET,Domestic,Domestic
- RULE-SET,Domestic IPs,Domestic
- RULE-SET,LAN,DIRECT
- RULE-SET,国内域名白名单,DIRECT
- RULE-SET,国内IP白名单,DIRECT
- RULE-SET,Netflix(By lhie1),Netflix
- GEOIP,SG,qcloud-hk
- GEOIP,TW,qcloud-hk
- GEOIP,JP,softbank-jp
- GEOIP,CN,Domestic
- MATCH,Others

Clash log

No response

Description

openclash最新版本 随机出现极高cpu占用率 cpu占用100%

tony-sung commented 1 year ago

archlinux 也会时不时出现这样的情况,卡的我动弹不得

xianren78 commented 1 year ago

节点里有tuic吗?

xishang0128 commented 1 year ago

https://clash-meta.wiki/api/#debugpprof 参考这个上传一份cpu profile,路径是api/debug/pprof/profile

RhythmNz commented 1 year ago

节点里有tuic吗?

没有

remedynotavailable commented 1 year ago

grpc?

hkthomas commented 1 year ago

没法用了,我也这个情况,换了几个版本依旧,突然出现的,莫名其妙开始飙CPU然后吃内存,接着机器卡死。得等系统自动把进程杀了。

10ta commented 1 year ago

profile.zip heap.zip

1.15.1版本, tun模式 我的出现有点规律, 每30秒一次, 每次持续几秒. 我怀疑是我tuic的heartbeat (但也不是必现的 希望这个profile有帮助 :)

tuic 节点配置
  - name: xxx
    server: xxx
    port: xxx
    type: tuic
    uuid: xxx
    password: xxx
    ip: xxx
    heartbeat-interval: 30000
    alpn: [h3]
    reduce-rtt: false
    request-timeout: 2000
    udp-relay-mode: native
    congestion-controller: bbr
    max-udp-relay-packet-size: 1500
    fast-open: false
    skip-cert-verify: false

tuic server配置
    "server": xxx
    "users": xxx
    "certificate": xxx
    "private_key": xxx
    "congestion_control": "bbr",
    "alpn": ["h3"],
    "udp_relay_ipv6": true,
    "zero_rtt_handshake": false,
    "dual_stack": true,
    "auth_timeout": "3s",
    "task_negotiation_timeout": "3s",
    "max_idle_time": "30s",
    "max_external_packet_size": 1400,
    "send_window": 167772160,
    "receive_window": 16777216,
    "gc_interval": "3s",
    "gc_lifetime": "15s",
    "log_level": "info"
xianren78 commented 1 year ago

profile.zip heap.zip

1.15.1版本, tun模式 我的出现有点规律, 每30秒一次, 每次持续几秒. 我怀疑是我tuic的heartbeat (但也不是必现的 希望这个profile有帮助 :)

tuic 节点配置
  - name: xxx
    server: xxx
    port: xxx
    type: tuic
    uuid: xxx
    password: xxx
    ip: xxx
    heartbeat-interval: 30000
    alpn: [h3]
    reduce-rtt: false
    request-timeout: 2000
    udp-relay-mode: native
    congestion-controller: bbr
    max-udp-relay-packet-size: 1500
    fast-open: false
    skip-cert-verify: false

tuic server配置
    "server": xxx
    "users": xxx
    "certificate": xxx
    "private_key": xxx
    "congestion_control": "bbr",
    "alpn": ["h3"],
    "udp_relay_ipv6": true,
    "zero_rtt_handshake": false,
    "dual_stack": true,
    "auth_timeout": "3s",
    "task_negotiation_timeout": "3s",
    "max_idle_time": "30s",
    "max_external_packet_size": 1400,
    "send_window": 167772160,
    "receive_window": 16777216,
    "gc_interval": "3s",
    "gc_lifetime": "15s",
    "log_level": "info"

客户端节点配置里加上 cwnd: 10, 再测试。

10ta commented 1 year ago

客户端节点配置里加上 cwnd: 10, 再测试。

3天内已没有再出现 :) 感谢

xianren78 commented 1 year ago

客户端节点配置里加上 cwnd: 10, 再测试。

3天内已没有再出现 :) 感谢

和网络有关,网不好的时候容易出现,这个时候加上那个参数就好了

10ta commented 1 year ago

客户端节点配置里加上 cwnd: 10, 再测试。

3天内已没有再出现 :) 感谢

和网络有关,网不好的时候容易出现,这个时候加上那个参数就好了

配置了cwnd: 10, 用1.15.1也会出现 用最新Alpha不会出现 :)