MetaCubeX / mihomo

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

[Bug] hysteria2节点无法使用 #997

Closed kingvsliuzhi closed 9 months ago

kingvsliuzhi commented 9 months ago

Verify steps

Mihomo version

Mihomo Meta v1.18.0

What OS are you seeing the problem on?

Linux

Mihomo config

######### 锚点 start #######
# proxy 相关
pr: &pr {type: select, proxies: [默认,香港,台湾,日本,新加坡,美国,其它地区,全部节点,自动选择,DIRECT]}

#这里是订阅更新和延迟测试相关的
p: &p {type: http, interval: 3600, health-check: {enable: true, url: http://www.google.com/generate_204, interval: 300}}

use: &use
  type: select
  use:
  - provider1
  - provider2

######### 锚点 end #######

# url 里填写自己的订阅,名称不能重复
proxy-providers:
  provider1:
    <<: *p
    url: "https://eXG1MQjwb86k1c9d?clash=1"

  provider2:
    <<: *p
    url: "https://api/v1/client/subscribe?token="

mode: rule
ipv6: false
log-level: info
allow-lan: true
mixed-port: 7890
unified-delay: false
tcp-concurrent: true
external-controller: 0.0.0.0:9090
secret: ''

geodata-mode: true
geox-url:
  geoip: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
  geosite: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
  mmdb: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb"

profile:
  store-selected: true
  store-fake-ip: true
  # tracing: true

sniffer:
  enable: true
  sniff:
    TLS:
      ports: [443, 8443]
    HTTP:
      ports: [80, 8080-8880]
      override-destination: true
interface-name: eth0
tun:
  device: utun
  enable: true
  stack: system
  auto-route: true
  auto-detect-interface: false

dns:
  enable: true
  listen: :1053
  ipv6: false
  enhanced-mode: redir-host
  fake-ip-range: 192.18.0.1/16
  fake-ip-filter:
    - '*'
    - '+.lan'
    - '+.local'
  default-nameserver:
    - 10.88.88.38
  nameserver:
    - 10.88.88.38
  proxy-server-nameserver:
    - 10.88.88.38
  nameserver-policy:
    "geosite:cn,private":
      - 10.88.88.38

proxies:
  - name: Hysteria2
    type: hysteria2
    server: hytt.123.cc
    port: 13248
    password: fsdfsdfadsaf
    sni: hytt.123.cc
    skip-cert-verify: false

  # - name: "WARP"
  #   type: wireguard
  #   server: engage.cloudflareclient.com
  #   port: 2408
  #   ip: "172.16.0.2/32"
  #   ipv6: "2606::1/128"        # 自行替换
  #   private-key: "private-key" # 自行替换
  #   public-key: "public-key"   # 自行替换
  #   udp: true
  #   reserved: "abba"           # 自行替换
  #   mtu: 1280
  #   dialer-proxy: "dns"
  #   remote-dns-resolve: true
  #   dns:
  #     - https://dns.cloudflare.com/dns-query

proxy-groups:

  - {name: 默认, type: select, proxies: [DIRECT,Hysteria2, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点, 自动选择]}
# - {name: dns, type: select, proxies: [DIRECT, WARP, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点, 自动选择]}  # 加入 WARP  
#分隔,下面是地区分组
  - {name: 香港, type: url-test,<<: *use,filter: "(?i)港|hk|hongkong|hong kong"}

  - {name: 台湾, type: url-test,<<: *use, filter: "(?i)台|tw|taiwan"}

  - {name: 日本, type: url-test,<<: *use, filter: "(?i)日本|jp|japan"}

  - {name: 美国, type: url-test,<<: *use, filter: "(?i)美|us|unitedstates|united states"}

  - {name: 新加坡, type: url-test,<<: *use, filter: "(?i)(新|sg|singapore)"}

  - {name: 其它地区, type: url-test,<<: *use, filter: "(?i)^(?!.*(?:🇭🇰|🇯🇵|🇺🇸|🇸🇬|🇨🇳|港|hk|hongkong|台|tw|taiwan|日|jp|japan|新|sg|singapore|美|us|unitedstates)).*"}

  - {name: 全部节点, <<: *use}

  - {name: 自动选择, <<: *use, tolerance: 2, type: url-test}

  - {name: Hy, type: select, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Direct.png, proxies: [DIRECT,Hysteria2]}

rule-providers:
  applications:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
    path: ./ruleset/applications.yaml
    interval: 86400

  Apple:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple.yaml"
    path: ./ruleset/Apple.yaml
    interval: 86400

  Apple_Domain:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple_Domain.yaml"
    path: ./ruleset/Apple_Domain.yaml
    interval: 86400

  Microsoft:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Microsoft/Microsoft.yaml"
    path: ./ruleset/Microsoft.yaml
    interval: 86400

  OpenAI:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/OpenAI/OpenAI.yaml"
    path: ./ruleset/OpenAI.yaml
    interval: 86400

  Google:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Google/Google.yaml"
    path: ./ruleset/Google.yaml
    interval: 86400

  GoogleFCM:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GoogleFCM/GoogleFCM.yaml"
    path: ./ruleset/GoogleFCM.yaml
    interval: 86400

  GoogleEarth:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GoogleEarth/GoogleEarth.yaml"
    path: ./ruleset/GoogleEarth.yaml
    interval: 86400  

  YouTube:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/YouTube/YouTube.yaml"
    path: ./ruleset/YouTube.yaml
    interval: 86400   

  YouTubeMusic:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/YouTubeMusic/YouTubeMusic.yaml"
    path: ./ruleset/YouTubeMusic.yaml
    interval: 86400   

  GitHub:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GitHub/GitHub.yaml"
    path: ./ruleset/GitHub.yaml
    interval: 86400   

  Copilot:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Copilot/Copilot.yaml"
    path: ./ruleset/Copilot.yaml
    interval: 86400   

  Synology:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Synology/Synology.yaml"
    path: ./ruleset/Synology.yaml
    interval: 86400    

rules:
  # - AND,(AND,(DST-PORT,443),(NETWORK,UDP)),(NOT,((GEOSITE,cn))),REJECT # quic
  - RULE-SET,applications,DIRECT
  - RULE-SET,Synology,香港
  - RULE-SET,Apple,香港
  - RULE-SET,Apple_Domain,香港  
  - RULE-SET,Microsoft,香港
  - RULE-SET,Google,香港
  - RULE-SET,GoogleFCM,香港
  - RULE-SET,GoogleEarth,香港
  - RULE-SET,YouTube,Hysteria2
  - RULE-SET,YouTubeMusic,香港
  - RULE-SET,GitHub,香港
  - RULE-SET,OpenAI,新加坡
  - RULE-SET,Copilot,新加坡  
  - MATCH,默认

Mihomo log

24-01-20 03:06:25[ warn ][TCP] dial 默认 (match Match/) 10.88.88.88:6222 --> 154.197.49.2:3190 error: context deadline exceeded
24-01-20 03:06:24[ warn ][UDP] dial 默认 (match Match/) 10.88.88.88:49937 --> 5.5.5.5:55555 error: context deadline exceeded

Description

hysteria2节点无法使用?小火箭直接使用该节点可以使用

yyxida commented 9 months ago

请问您能否提供更多log信息呢?我前几天题了一个差不多的问题https://github.com/MetaCubeX/mihomo/issues/993 ,也会提示context deadline exceeded,但是也有x509问题的提示,同样是Linux环境,如果有的话可能是相同的问题。

kingvsliuzhi commented 9 months ago

24-01-20 11:16:13[ debug ][Process] find process 5.5.5.5 error: process not found 24-01-20 11:16:13[ debug ][Rule] use default rules 24-01-20 11:16:10[ debug ][DNS] cache hit for hytt.123.cc., expire at 2024-01-20 11:20:54 24-01-20 11:16:10[ warn ][UDP] dial 默认 (match Match/) 10.88.88.88:61242 --> 5.5.5.5:55555 error: context deadline exceeded 24-01-20 11:16:10[ debug ][DNS] cache hit for hytt.123.cc., expire at 2024-01-20 11:20:54 24-01-20 11:16:10[ warn ][UDP] dial 默认 (match Match/) 10.88.88.88:61241 --> 142.250.217.174:443 error: context deadline exceeded

itiao commented 8 months ago

我也遇到同样问题,ABC3个机场,A机场正常,BC机场一直health check。

[warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:58985 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout -- | -- 9 | [warning] | because  SG failed multiple times, active health check 8 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:54523 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 7 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:54153 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 6 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:60582 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 5 | [warning] | because 1Y failed multiple times, active health check 4 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:51556 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 3 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:51042 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 2 | [warning] | [UDP] dial Proxy (match Match/) 192.168.2.3:59707 --> 5.5.5.5:55555 error: pqsg5.aiopen.sbs:443 connect error: connect failed: dial tcp 13.212.180.97:443: i/o timeout 1 | [warning] | because  SG failed multiple times, active health check

节点没问题,但是ping不到,然后我切到A机场正常,可以ping到BC机场的节点。 这时候我切到BC机场,就又不行了。 对了,机场协议包括vless和trojan。 我使用的是主路由ros通过BGP分流,国外流量才跑mihomo,dns使用的是easymosdns