Skip to content

Commit daed32e

Browse files
authored
Transport: Add REALITY TLS1.3 support warning (XTLS#3774)
1 parent 3782eae commit daed32e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

transport/internet/reality/reality.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
140140
if err != nil {
141141
return nil, errors.New("REALITY: publicKey == nil")
142142
}
143+
if uConn.HandshakeState.State13.EcdheKey == nil {
144+
return nil, errors.New("Current fingerprint ", uConn.ClientHelloID.Client, uConn.ClientHelloID.Version, " does not support TLS 1.3, REALITY handshake cannot establish.")
145+
}
143146
uConn.AuthKey, _ = uConn.HandshakeState.State13.EcdheKey.ECDH(publicKey)
144147
if uConn.AuthKey == nil {
145148
return nil, errors.New("REALITY: SharedKey == nil")

0 commit comments

Comments
 (0)