mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-18 01:58:41 +00:00
Add VLESS seed tests
This commit is contained in:
parent
76d7609051
commit
f37e37632e
3 changed files with 227 additions and 3 deletions
|
@ -229,7 +229,7 @@ func (w *VisionReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
|||
switchToDirectCopy = &w.trafficState.Outbound.DownlinkReaderDirectCopy
|
||||
}
|
||||
|
||||
if *withinPaddingBuffers || !ShouldStopSeed(w.addons, w.trafficState) {
|
||||
if *withinPaddingBuffers || w.trafficState.NumberOfPacketReceived <= 8 || !ShouldStopSeed(w.addons, w.trafficState) {
|
||||
mb2 := make(buf.MultiBuffer, 0, len(buffer))
|
||||
for _, b := range buffer {
|
||||
newbuffer := XtlsUnpadding(b, w.trafficState, w.isUplink, w.ctx)
|
||||
|
|
|
@ -49,8 +49,8 @@ func(s *Scheduler) mainLoop() {
|
|||
if err != nil {
|
||||
errors.LogWarningInner(s.ctx, err, "failed to generate delay", trigger)
|
||||
}
|
||||
d = time.Duration(uint32(l.Int64()) + s.addons.Delay.MinMillis)
|
||||
time.Sleep(d * time.Millisecond)
|
||||
d = time.Duration(uint32(l.Int64()) + s.addons.Delay.MinMillis) * time.Millisecond
|
||||
time.Sleep(d)
|
||||
}
|
||||
|
||||
s.bufferReadLock.Lock() // guard against multiple trigger threads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue