mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
XTLS Vision checks outer TLS version (#1554)
This commit is contained in:
parent
3fb67f065a
commit
fb212905bd
2 changed files with 15 additions and 0 deletions
|
@ -5,6 +5,7 @@ package inbound
|
|||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
gotls "crypto/tls"
|
||||
"io"
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
@ -470,6 +471,9 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
|
|||
var t reflect.Type
|
||||
var p uintptr
|
||||
if tlsConn, ok := iConn.(*tls.Conn); ok {
|
||||
if tlsConn.ConnectionState().Version != gotls.VersionTLS13 {
|
||||
return newError(`failed to use ` + requestAddons.Flow + `, found outer tls version `, tlsConn.ConnectionState().Version).AtWarning()
|
||||
}
|
||||
netConn = tlsConn.NetConn()
|
||||
if pc, ok := netConn.(*proxyproto.Conn); ok {
|
||||
netConn = pc.Raw()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue