sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

TLS handshake: REALITY: failed to dial dest

Open nextincn opened this issue 1 year ago • 1 comments

操作系统

Linux

系统版本

Ubuntu 22.04

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

sing-box version 1.12.0-alpha.2

Environment: go1.23.5 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 460c5236718b3bab9baf63f32333bae41a6f135e
CGO: disabled

描述

更新到1.12后,服务器报错 TLS handshake: REALITY: failed to dial dest: exchange6: http3: unsupported protocol scheme: http3 | exchange4: http3: unsupported protocol scheme: http3

重现方式

服务器端运行配置:

{
  "log": {
    "level": "warn",
    "output": "/var/log/sing-box/sing-box.log",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "doh3-cloudflare",
        "address": "h3://1.1.1.1/dns-query",
        "detour": "direct"
      }
    ]
  },
  "inbounds": [
    {
      "type": "vless",
      "tag": "vless-in",
      "listen": "0.0.0.0",
      "listen_port": 8080,
      "users": [
        {
          "uuid": "",
          "flow": "xtls-rprx-vision"
        }
      ],
      "tls": {
        "enabled": true,
        "server_name": "",
        "reality": {
          "enabled": true,
          "handshake": {
            "server": "",
            "server_port": 443
          },
          "private_key": "",
          "short_id": [
            ""
          ]
        }
      }
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    }
  ],
  "route": {
    "rules": [
      {
        "inbound": "vless-in",
        "action": "sniff"
      },
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "protocol": "dns"
          },
          {
            "port": 53
          }
        ],
        "action": "hijack-dns"
      },
      {
        "ip_is_private": true,
        "action": "reject"
      }
    ],
    "final": "direct"
  }
}

客户端连接,无法上网,查看服务器端日志。

日志

+0000 2025-02-01 15:50:12 ERROR [3982145990 0ms] inbound/vless[vless-in]: process connection from x.x.x.x:5587: TLS handshake: REALITY: failed to dial dest: exchange6: http3: unsupported protocol scheme: http3 | exchange4: http3: unsupported protocol scheme: http3

支持我们

完整性要求

  • [x] 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • [x] 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • [x] 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • [x] 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

nextincn avatar Feb 01 '25 16:02 nextincn

这个问题我也遇到了,但是它并不是Reality协议的问题,显示是不支持doh3,目前实测1.12.0-alpha.x都存在这个问题,与outbound协议无关,log显示类似这样:

25-02-11 12:41:14[ error ][3089907048 3ms] connection: open outbound connection: exchange6: http3: unsupported protocol scheme: http3 | exchange4: http3: unsupported protocol scheme: http3

客户端或者服务器配置:

{
    "dns": {
        "servers": [
            {
                "tag": "RESOLVER",
                "type": "h3",
                "server": "223.5.5.5",
                "server_port": 443,
                "detour": "CHINA_OUT"
            }
        ],
        "rules": [],
        "final": "RESOLVER",
        "reverse_mapping": true
    }
}

只要type是h3就有这个问题

HXHGTS avatar Feb 11 '25 04:02 HXHGTS