gg icon indicating copy to clipboard operation
gg copied to clipboard

使用gg报错websocket: bad handshake,但使用windows客户端能正常使用该订阅

Open xtay573269555 opened this issue 7 months ago • 0 comments

使用 gg 测试的结果显示没有可用节点,报 websocket: bad handshake 错误

[me@test-archlinux tmp]$ ./gg-linux-x86_64 -vv -s https://sub.xxx.com/sub/uuidkey?clash=1 curl -v www.google.com
TRAC[0000] Version: v0.2.18                             
TRAC[0000] OS/Arch: linux/amd64                         
TRAC[0000] No config file found. Using default values.  
INFO[0000] subscription.cache_last_node will be disabled because the given subscription link is different from the configured one. 
TRAC[0000] Config:
test_url=https://connectivitycheck.gstatic.com/generate_204
subscription.cache_last_node=false
subscription.link=https://sub.xxx.com/sub/uuidkey?clash=1
subscription.select=first
no_udp=false
test_node_before_use=true
node=
cache.subscription.last_node=
allow_insecure= 
INFO[0000] Pulling the subscription...                  
TRAC[0001] try to resolve as SIP008                     
TRAC[0001] invalid character 'm' looking for beginning of value 
TRAC[0001] try to resolve as Clash                      
INFO[0001] Finding the first available node...          
TRAC[0001] test fail: 法国1t-xxxname节点: connectivity test failed: Get "https://connectivitycheck.gstatic.com/generate_204": [Ws]: dial to ws://fr1t-displayxxxname.domain:443: websocket: bad handshake 
TRAC[0002] test fail: 美国2t-xxxname节点: connectivity test failed: Get "https://connectivitycheck.gstatic.com/generate_204": [Ws]: dial to ws://us2t-videosxxxname.domain:443: websocket: bad handshake 
TRAC[0002] test fail: 美国1t-xxxname节点: connectivity test failed: Get "https://connectivitycheck.gstatic.com/generate_204": [Ws]: dial to ws://us1txxxname.domain:443: websocket: bad handshake 
TRAC[0002] test fail: 美国4-xxxname节点: connectivity test failed: Get "https://connectivitycheck.gstatic.com/generate_204": [Ws]: dial to ws://us4t-blockxxxname.domain:443: websocket: bad handshake 
TRAC[0002] test fail: 美国3-xxxname节点: connectivity test failed: Get "https://connectivitycheck.gstatic.com/generate_204": [Ws]: dial to ws://us3txxxname.domain:443: websocket: bad handshake 
FATA[0002] GetDialer:cannot find any available node in your subscription, and you can try again with argument '-vv' to get more information

直接 curl 订阅链接没问题,我本地windows使用这个订阅也能正常上互联网

[me@test-archlinux tmp]$ curl https://sub.xxx.com/sub/uuidkey?clash=1
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
dns:
  enable: false
  ipv6: false
  default-nameserver: [223.5.5.5, 119.29.29.29]
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  use-hosts: true
  nameserver: ['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query']
  fallback: ['https://doh.dns.sb/dns-query', 'https://dns.cloudflare.com/dns-query', 'https://dns.xxx.xx/dns-query', 'tls://8.8.4.4:853']
  fallback-filter: { geoip: true, geoip-code: CN, ipcidr: [240.0.0.0/4, 0.0.0.0/32] }
proxies:
  - { name: 法国1t-xxxname节点, server: fr1t-displayxxxname.domain, port: 443, type: trojan, password: d60fdb80-6d15-318f-9a37-ccb44f3899d4, udp: true, network: ws, ws-opts: { path: /3690dc09-26c3-57ab-b9cf-836523956698 } }
  - { name: 美国1t-xxxname节点, server: us1txxxname.domain, port: 443, type: trojan, password: d60fdb80-6d15-318f-9a37-ccb44f3899d4, udp: true, network: ws, ws-opts: { path: /3690dc09-26c3-57ab-b9cf-836523956698 } }
  - { name: 美国2t-xxxname节点, server: us2t-videosxxxname.domain, port: 443, type: trojan, password: d60fdb80-6d15-318f-9a37-ccb44f3899d4, udp: true, network: ws, ws-opts: { path: /3690dc09-26c3-57ab-b9cf-836523956698 } }
  - { name: 美国3-xxxname节点, server: us3txxxname.domain, port: 443, type: trojan, password: d60fdb80-6d15-318f-9a37-ccb44f3899d4, udp: true, network: ws, ws-opts: { path: /3690dc09-26c3-57ab-b9cf-836523956698 } }
  - { name: 美国4-xxxname节点, server: us4t-blockxxxname.domain, port: 443, type: trojan, password: d60fdb80-6d15-318f-9a37-ccb44f3899d4, udp: true, network: ws, ws-opts: { path: /3690dc09-26c3-57ab-b9cf-836523956698 } }

proxy-groups:
  - name: 🔰 节点选择
    type: select
    proxies:
      - ♻️ 自动选择
      - 🎯 不用代理
      - 法国1t-xxxname节点
      - 美国1t-xxxname节点
      - 美国2t-xxxname节点
      - 美国3-xxxname节点
      - 美国4-xxxname节点

  - name: ♻️ 自动选择
    type: url-test
    url: http://www.gstatic.com/generate_204
    interval: 86400
    proxies:
      - 法国1t-xxxname节点
      - 美国1t-xxxname节点
      - 美国2t-xxxname节点
      - 美国3-xxxname节点
      - 美国4-xxxname节点

...
后续很长,省略了

xtay573269555 avatar Jul 10 '24 03:07 xtay573269555