MetaCubeX / mihomo

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

[Bug] 崩溃退出 panic 错误 #1268

Closed snakem982 closed 6 months ago

snakem982 commented 6 months ago

Verify steps

操作系统

MacOS

系统版本

macOS 12.7.5 (21H1222)

Mihomo 版本

Mihomo Meta alpha-1bc3c16 darwin amd64 with go1.22.2 Wed May 15 02:45:27 UTC 2024 Use tags: with_gvisor

配置文件

port: 7890
mode: Rule
log-level: info
proxies:
  - {
      name: "@proxy48",
      server: 94.182.129.21,
      port: 58930,
      client-fingerprint: chrome,
      type: vless,
      uuid: 5c402efa-95ff-49fd-a55c-fbc7770f9c06,
      tls: false,
      tfo: false,
      servername: jr1YbGyG.ahvaz1.irancell.ir%2C+jr1YbGyG.speedtest1.shatel.ir%2C+jr1YbGyG.AHESPD2.mci.ir%2C+jr1YbGyG.intraspeedtest2.mobinnet.ir%2C+jr1YbGyG.st1.aminidc.com%2C+jr1YbGyG.speedtest.aionet.ir%2C+jr1YbGyG.esfahan1.irancell.ir%2C+jr1YbGyG.speedtest.faradez.ir,
      skip-cert-verify: false,
      network: http,
      http-opts:
        {
          method: GET,
          path: [/],
          headers:
            {
              Host:
                [
                  jr1YbGyG.ahvaz1.irancell.ir%2C+jr1YbGyG.speedtest1.shatel.ir%2C+jr1YbGyG.AHESPD2.mci.ir%2C+jr1YbGyG.intraspeedtest2.mobinnet.ir%2C+jr1YbGyG.st1.aminidc.com%2C+jr1YbGyG.speedtest.aionet.ir%2C+jr1YbGyG.esfahan1.irancell.ir%2C+jr1YbGyG.speedtest.faradez.ir,
                ],
            },
        },
    }
proxy-groups:
  - name: 🚀 节点选择
    type: select
    proxies:
      - ♻️ 自动选择
  - name: ♻️ 自动选择
    type: url-test
    url: http://www.gstatic.com/generate_204
    interval: 300
    tolerance: 50
    proxies:
      - "@proxy48"

描述

崩溃退出 panic 错误

INFO[2024-05-15T13:40:25.593293+08:00] Start initial configuration in progress      
INFO[2024-05-15T13:40:25.593749+08:00] Geodata Loader mode: memconservative         
INFO[2024-05-15T13:40:25.593764+08:00] Geosite Matcher implementation: succinct     
INFO[2024-05-15T13:40:25.594009+08:00] Initial configuration complete, total time: 0ms 
INFO[2024-05-15T13:40:25.597373+08:00] Sniffer is closed                            
INFO[2024-05-15T13:40:25.597566+08:00] HTTP proxy listening at: 127.0.0.1:7890      
INFO[2024-05-15T13:40:25.602051+08:00] Start initial Compatible provider ♻️ 自动选择    
INFO[2024-05-15T13:40:25.60209+08:00] Start initial Compatible provider 🚀 节点选择     
INFO[2024-05-15T13:40:25.6021+08:00] Start initial Compatible provider default    
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x586b8e7]

goroutine 83 [running]:
github.com/metacubex/mihomo/transport/vmess.(*httpConn).Write(0xc0003c4180, {0xc0000a0000, 0x7c, 0x80})
    github.com/metacubex/mihomo/transport/vmess/http.go:71 +0x467
github.com/metacubex/mihomo/transport/vless.(*Conn).sendRequest(0xc0002500e0, {0xc000027000, 0x56, 0x1000})
    github.com/metacubex/mihomo/transport/vless/conn.go:154 +0x6e3
github.com/metacubex/mihomo/transport/vless.(*Conn).Write(0xc0002500e0, {0xc000027000, 0x56, 0x1000})
    github.com/metacubex/mihomo/transport/vless/conn.go:61 +0x94
net/http.persistConnWriter.Write({0x5e0e8a0?}, {0xc000027000?, 0xc00011e040?, 0x5eb92c0?})
    net/http/transport.go:1815 +0x29
bufio.(*Writer).Flush(0xc000312180)
    bufio/bufio.go:639 +0x55
net/http.(*persistConn).writeLoop(0xc00027c900)
    net/http/transport.go:2460 +0x1df
created by net/http.(*Transport).dialConn in goroutine 81
    net/http/transport.go:1800 +0x1585

重现方式

直接命令行运行即可报错 mihono -f panic.yaml

日志

No response

wwqgtxx commented 6 months ago

https://github.com/MetaCubeX/mihomo/commit/87877d1b80587edb674fcd5bb65e7345eb871b18