XTLS Vision checks outer TLS version (#1554)
This commit is contained in:
1 parent
3fb67f065a
commit
fb212905bd
2 files changed
+15
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user