MetaCubeX / mihomo

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

[Bug] 1.14.4使用tuic tcp fast open不能传回网页证书 #553

Open pty819 opened 1 year ago

pty819 commented 1 year ago

Verify steps

Clash version

Clash Meta v1.14.4 windows amd64 with go1.20.3 Fri Apr 28 17:12:00 UTC 2023 Use tags: with_gvisor

What OS are you seeing the problem on?

Windows

Clash config

mixed-port: 7890
allow-lan: true
bind-address: '*'
mode: rule
log-level: info
geodata-mode: true
external-controller: '127.0.0.1:9090'

sniffer:                         #【Meta专属】sniffer域名嗅探器
  enable: true                   #嗅探开关
  sniffing:                      #嗅探协议对象:目前支持tls/http
    - tls
    - http
  skip-domain:                   #列表中的sni字段,保留mapping结果,不通过嗅探还原域名
                                 #优先级比force-domain高
    - 'Mijia Cloud'              #米家设备,建议加
    - 'dlg.io.mi.com'
    - '+.apple.com'              #苹果域名,建议加

  force-domain:                  #需要强制嗅探的域名,默认只对IP嗅探
  # - '+'                        #去掉注释后等于全局嗅探
    - 'google.com'

dns:
    enable: true
    ipv6: false
    default-nameserver: [223.5.5.5, 119.29.29.29]
    enhanced-mode: redir-host
    fake-ip-range: 198.18.0.1/16
    use-hosts: true
    nameserver: ['tls://dot.pub:853', 'tls://dns.alidns.com:853']
    fallback: ['quic://dns.adguard-dns.com']
    fallback-filter: { geoip: true, ipcidr: [240.0.0.0/4, 0.0.0.0/32] }
proxies:
    - { name: 'hysteria-altlanta',  type: hysteria, server: , fast_open: true, port: 443, alpn: ['h3'], protocol: udp , up: '100 Mbps', down: '100 Mbps' }
    - { name: 'hysteria-amer1',     type: hysteria, server: ,   fast_open: true, port: 443, alpn: ['h3'], protocol: udp , up: '100 Mbps', down: '100 Mbps'  }
    - { name: 'hysteria-amer2',     type: hysteria, server: ,   fast_open: true, port: 443, alpn: ['h3'], protocol: udp , up: '100 Mbps', down: '100 Mbps' }
    - { name: 'tuic-amer1',         type: tuic,     server: ,     port: 2443, alpn: ['h3'],   token: xingping,    heartbeat-interval: 10000,  reduce-rtt: true,    udp-relay-mode: quic,    congestion-controller: bbr,    fast-open: true}
    - { name: 'tuic-amer2',         type: tuic,     server: ,     port: 2443, alpn: ['h3'],   token: xingping,    heartbeat-interval: 10000,  reduce-rtt: true,    udp-relay-mode: quic,    congestion-controller: bbr,    fast-open: true}
    - { name: 'tuic-altlanta',      type: tuic,     server: ,   port: 2443, alpn: ['h3'],   token: xingping,    heartbeat-interval: 10000,  reduce-rtt: true,    udp-relay-mode: quic,    congestion-controller: bbr}

proxy-groups:
    - { name: PROXY, type: select, proxies: ['自动选择','故障转移','hysteria-amer1','tuic-amer1','hysteria-amer2','tuic-amer2','hysteria-altlanta','tuic-altlanta'] }
    - { name: 自动选择, type: url-test, proxies: ['hysteria-amer1','tuic-amer1','hysteria-amer2','tuic-amer2','hysteria-altlanta','tuic-altlanta'], url: 'http://www.gstatic.com/generate_204', interval: 1800 }
    - { name: 故障转移, type: fallback, proxies: ['hysteria-amer1','tuic-amer1','hysteria-amer2','tuic-amer2','hysteria-altlanta','tuic-altlanta'], url: 'http://www.gstatic.com/generate_204', interval: 360 }

rules:
  - DOMAIN,clash.razord.top,DIRECT
  - DOMAIN,yacd.haishan.me,DIRECT
  - DOMAIN-KEYWORD,bing,PROXY
  - DOMAIN-SUFFIX,live.com,PROXY
  - GEOSITE,category-ads-all,REJECT
  - GEOSITE,icloud@cn,DIRECT
  - GEOSITE,apple@cn,DIRECT
  - GEOSITE,apple-cn,DIRECT
  - GEOSITE,microsoft@cn,DIRECT
  - GEOSITE,facebook,PROXY
  - GEOSITE,youtube,PROXY
  - GEOSITE,geolocation-cn,DIRECT
  - GEOSITE,geolocation-!cn,PROXY
  - GEOIP,telegram,PROXY,no-resolve
  - GEOIP,private,DIRECT,no-resolve
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT

  - MATCH,PROXY

Clash log

No response

Description

1.14.3中,tuic协议配置里加上tcp-fast-open可以正常使用,核心升级到1.14.4后,fast open打开网页失败,显示网页无证书,必须去除该字段才能正常使用。 image image

johntaiko commented 1 year ago

Same issue with me

KinoluKaslana commented 1 year ago

一样的,但是我看到tuic最新的(dev branch)server配置有一点变更,tuic服务消息为: [unauthenticated] handling incoming unidirectional stream error: error unmarshaling uni_stream: invalid version: 4 [unauthenticated] handling incoming bidirectional stream error: error unmarshaling bi_stream: invalid version: 4 我这里有两台服务器,较老的一台用的是稍老版本的tuic(并非dev branch),目前非dev branch的tuic可以正常使用。

Same issue with me,I noticed the config of dev branch tuic-server is different with the other branch, may be Clash.Meta has not fit the dev branch tuic-server. I have two VPS with different branch of tuic, the older one works, the dev branch console log is: [unauthenticated] handling incoming unidirectional stream error: error unmarshaling uni_stream: invalid version: 4 [unauthenticated] handling incoming bidirectional stream error: error unmarshaling bi_stream: invalid version: 4