Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

`android` 等客户端指纹导致 panic

Open davidxuang opened this issue 2 years ago • 2 comments

  • 服务端
    • xray-core 1.8.0 on Debian Testing x86-64
  • 客户端
    • xray-core 1.8.0 on Windows 11 22H2 x86-64
    • NekoBox for Android 1.0.0 (sing-box-extra 1.2.2-2)
  • 脱敏客户端 outbound
    {
      "tag": "proxy",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "1.1.1.1",
            "port": 443,
            "users": [
              {
                "id": "00000000-0000-0000-0000-000000000000",
                "alterId": 0,
                "email": "[email protected]",
                "security": "auto",
                "encryption": "none",
                "flow": "xtls-rprx-vision"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "reality",
        "realitySettings": {
          "serverName": "a.com",
          "fingerprint": "android", // 已控制唯一变量
          "show": false,
          "publicKey": "ggggggggggggggggggggggggggggggggggggggggggg",
          "shortId": "",
          "spiderX": ""
        }
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    }
    
  • 示例 log
    • 测试命令 aria2c https://google.com --all-proxy=http://localhost:8080
    • android 指纹
      Xray 1.8.0 (Xray, Penetrates Everything.) Custom (go1.20.2 windows/amd64)
      A unified platform for anti-censorship.
      2023/04/04 13:02:24 [Info] infra/conf/serial: Reading config: .\reality-android.json
      2023/04/04 13:02:24 [Warning] core: Xray 1.8.0 started
      2023/04/04 13:03:26 127.0.0.1:54057 accepted //google.com:443 [http -> proxy]
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal 0xc0000005 code=0x0 addr=0x28 pc=0x105b47f]
      
      goroutine 40 [running]:
      github.com/xtls/xray-core/transport/internet/reality.UClient({0x1b203a8, 0xc0018940a0}, 0xc000738160, {0xc00023f768?, 0x0?}, {{0x1b18b90?, 0xc00023f768?}, 0x0?, 0x0?})
              github.com/xtls/xray-core/transport/internet/reality/reality.go:132 +0x8df
      github.com/xtls/xray-core/transport/internet/tcp.Dial({0x1b171c0, 0xc0002d8ae0}, {{0x1b18b90, 0xc00023f768}, 0x1bb, 0x2}, 0xc00052ee60)
              github.com/xtls/xray-core/transport/internet/tcp/dialer.go:34 +0x250
      github.com/xtls/xray-core/transport/internet.Dial({0x1b171c0, 0xc0002d8ae0}, {{0x1b18b90?, 0xc00023f768?}, 0xf768?, 0xc0?}, 0x0?)
              github.com/xtls/xray-core/transport/internet/dialer.go:57 +0x1ef
      github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dial(0xc000169f80, {0x1b171c0?, 0xc0002d8ae0?}, {{0x1b18b90, 0xc00023f768}, 0x1bb, 0x2})
              github.com/xtls/xray-core/app/proxyman/outbound/handler.go:218 +0xad7
      github.com/xtls/xray-core/proxy/vless/outbound.(*Handler).Process.func1()
              github.com/xtls/xray-core/proxy/vless/outbound/outbound.go:80 +0xa3
      github.com/xtls/xray-core/common/retry.(*retryer).On(0xc000263bd0, 0xc000263c38)
              github.com/xtls/xray-core/common/retry/retry.go:27 +0xdb
      github.com/xtls/xray-core/proxy/vless/outbound.(*Handler).Process(0xc0002d88d0, {0x1b171c0, 0xc0002d8ae0}, 0xc0007160c0, {0x1b0ee00, 0xc000169f80})
              github.com/xtls/xray-core/proxy/vless/outbound/outbound.go:77 +0x1ec
      github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dispatch(0xc0002f45a0?, {0x1b171c0, 0xc0002d8ae0}, 0xc0007160c0)
              github.com/xtls/xray-core/app/proxyman/outbound/handler.go:147 +0x211
      github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).routedDispatch(0xc0004c67e0, {0x1b171c0, 0xc0002d8ae0}, 0xc0007160c0, {{0x1b18b58, 0xc00007c8e0}, 0x1bb, 0x2})
              github.com/xtls/xray-core/app/dispatcher/default.go:492 +0xbfe
      created by github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch
              github.com/xtls/xray-core/app/dispatcher/default.go:302 +0x4ea
      
    • edge 指纹
      Xray 1.8.0 (Xray, Penetrates Everything.) Custom (go1.20.2 windows/amd64)
      A unified platform for anti-censorship.
      2023/04/04 13:03:50 [Info] infra/conf/serial: Reading config: .\reality-edge.json
      2023/04/04 13:03:50 [Warning] core: Xray 1.8.0 started
      2023/04/04 13:03:52 127.0.0.1:54062 accepted //google.com:443 [http -> proxy]
      2023/04/04 13:03:53 127.0.0.1:54072 accepted //www.google.com:443 [http -> proxy]
      
  • 补充信息 该问题亦会在其他配置情形下复现,如 1.7.5 on Debian 11 服务端下的 vmess-grpc-tlsvless-tcp-vision360 指纹似乎亦有类似问题。

davidxuang avatar Apr 04 '23 05:04 davidxuang

It's been 9 months and no one has ever fixed this. @RPRX please help. At least remove the non-existant fingerprints.

cccp6 avatar Jan 30 '24 16:01 cccp6

唔 panic

Fangliding avatar Jan 30 '24 16:01 Fangliding