From 3d0feae462040c243a0ff388269dc4d0a9181643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Mon, 9 Sep 2024 23:37:39 +0800 Subject: [PATCH] Transport: Add REALITY TLS1.3 support warning (#3774) --- transport/internet/reality/reality.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/internet/reality/reality.go b/transport/internet/reality/reality.go index 8c77e79f..44402f31 100644 --- a/transport/internet/reality/reality.go +++ b/transport/internet/reality/reality.go @@ -140,6 +140,9 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati if err != nil { return nil, errors.New("REALITY: publicKey == nil") } + if uConn.HandshakeState.State13.EcdheKey == nil { + return nil, errors.New("Current fingerprint ", uConn.ClientHelloID.Client, uConn.ClientHelloID.Version, " does not support TLS 1.3, REALITY handshake cannot establish.") + } uConn.AuthKey, _ = uConn.HandshakeState.State13.EcdheKey.ECDH(publicKey) if uConn.AuthKey == nil { return nil, errors.New("REALITY: SharedKey == nil")