mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-05 04:29:19 +02:00
XRV should work without rawConn
This commit is contained in:
parent
828a632076
commit
6d8fe7315f
|
@ -247,7 +247,11 @@ func XtlsRead(reader buf.Reader, writer buf.Writer, timer signal.ActivityUpdater
|
|||
}
|
||||
}
|
||||
}
|
||||
reader = buf.NewReadVReader(conn, rawConn, nil)
|
||||
if rawConn != nil {
|
||||
reader = buf.NewReadVReader(conn, rawConn, nil)
|
||||
} else {
|
||||
reader = buf.NewReader(conn)
|
||||
}
|
||||
ct = counter
|
||||
newError("XtlsRead readV").WriteToLog(session.ExportIDToError(ctx))
|
||||
}
|
||||
|
|
|
@ -539,7 +539,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
|
|||
|
||||
var err error
|
||||
|
||||
if rawConn != nil {
|
||||
if requestAddons.Flow == vless.XRV {
|
||||
var counter stats.Counter
|
||||
if statConn != nil {
|
||||
counter = statConn.ReadCounter
|
||||
|
@ -591,7 +591,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
|
|||
}
|
||||
|
||||
var err error
|
||||
if rawConn != nil && requestAddons.Flow == vless.XRV {
|
||||
if requestAddons.Flow == vless.XRV {
|
||||
var counter stats.Counter
|
||||
if statConn != nil {
|
||||
counter = statConn.WriteCounter
|
||||
|
|
|
@ -247,7 +247,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
|||
}
|
||||
|
||||
var err error
|
||||
if rawConn != nil && requestAddons.Flow == vless.XRV {
|
||||
if requestAddons.Flow == vless.XRV {
|
||||
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()
|
||||
|
@ -292,7 +292,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
|||
serverReader = xudp.NewPacketReader(conn)
|
||||
}
|
||||
|
||||
if rawConn != nil {
|
||||
if requestAddons.Flow == vless.XRV {
|
||||
var counter stats.Counter
|
||||
if statConn != nil {
|
||||
counter = statConn.ReadCounter
|
||||
|
|
Loading…
Reference in New Issue