mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 18:11:27 +00:00
Fix Vision reader
This commit is contained in:
parent
92bec537f1
commit
585d5ba7c8
|
@ -159,22 +159,16 @@ func (w *VisionReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buffer = mb2
|
buffer = mb2
|
||||||
if w.trafficState.RemainingContent == 0 && w.trafficState.RemainingPadding == 0 {
|
if w.trafficState.RemainingContent > 0 || w.trafficState.RemainingPadding > 0 || w.trafficState.CurrentCommand == 0 {
|
||||||
if w.trafficState.CurrentCommand == 1 {
|
w.trafficState.WithinPaddingBuffers = true
|
||||||
|
} else if w.trafficState.CurrentCommand == 1 {
|
||||||
w.trafficState.WithinPaddingBuffers = false
|
w.trafficState.WithinPaddingBuffers = false
|
||||||
} else if w.trafficState.CurrentCommand == 2 {
|
} else if w.trafficState.CurrentCommand == 2 {
|
||||||
w.trafficState.WithinPaddingBuffers = false
|
w.trafficState.WithinPaddingBuffers = false
|
||||||
w.trafficState.ReaderSwitchToDirectCopy = true
|
w.trafficState.ReaderSwitchToDirectCopy = true
|
||||||
} else if w.trafficState.CurrentCommand == 0 {
|
|
||||||
w.trafficState.WithinPaddingBuffers = true
|
|
||||||
} else {
|
} else {
|
||||||
newError("XtlsRead unknown command ", w.trafficState.CurrentCommand, buffer.Len()).WriteToLog(session.ExportIDToError(w.ctx))
|
newError("XtlsRead unknown command ", w.trafficState.CurrentCommand, buffer.Len()).WriteToLog(session.ExportIDToError(w.ctx))
|
||||||
}
|
}
|
||||||
} else if w.trafficState.RemainingContent > 0 || w.trafficState.RemainingPadding > 0 {
|
|
||||||
w.trafficState.WithinPaddingBuffers = true
|
|
||||||
} else {
|
|
||||||
w.trafficState.WithinPaddingBuffers = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if w.trafficState.NumberOfPacketToFilter > 0 {
|
if w.trafficState.NumberOfPacketToFilter > 0 {
|
||||||
XtlsFilterTls(buffer, w.trafficState, w.ctx)
|
XtlsFilterTls(buffer, w.trafficState, w.ctx)
|
||||||
|
|
Loading…
Reference in a new issue