From ec080d920215a3117bc93c98f8a1a61a8ea52ca0 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:27:04 -0500 Subject: [PATCH] New Vision traffic pattern: wide range+ test --- proxy/proxy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxy/proxy.go b/proxy/proxy.go index e8adb7e2..8de97861 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -284,14 +284,14 @@ func XtlsPadding(b *buf.Buffer, command byte, userUUID *[]byte, longPadding bool if b != nil { contentLen = b.Len() } - if contentLen < 900 && longPadding { - l, err := rand.Int(rand.Reader, big.NewInt(500)) + if contentLen < 600 && longPadding { + l, err := rand.Int(rand.Reader, big.NewInt(3400)) if err != nil { newError("failed to generate padding").Base(err).WriteToLog(session.ExportIDToError(ctx)) } - paddingLen = int32(l.Int64()) + 900 - contentLen + paddingLen = int32(l.Int64()) + 600 - contentLen } else { - l, err := rand.Int(rand.Reader, big.NewInt(256)) + l, err := rand.Int(rand.Reader, big.NewInt(2000)) if err != nil { newError("failed to generate padding").Base(err).WriteToLog(session.ExportIDToError(ctx)) }