Browse Source

Transport: Add REALITY TLS1.3 support warning (#3774)

pull/3784/head
风扇滑翔翼 2 months ago committed by GitHub
parent
commit
3d0feae462
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      transport/internet/reality/reality.go

3
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 { if err != nil {
return nil, errors.New("REALITY: publicKey == 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) uConn.AuthKey, _ = uConn.HandshakeState.State13.EcdheKey.ECDH(publicKey)
if uConn.AuthKey == nil { if uConn.AuthKey == nil {
return nil, errors.New("REALITY: SharedKey == nil") return nil, errors.New("REALITY: SharedKey == nil")

Loading…
Cancel
Save