1
0
mirror of https://github.com/bol-van/zapret.git synced 2025-05-24 22:32:58 +03:00

tpws: tlsrec preserve trailing bytes after ClientHello

This commit is contained in:
bol-van 2023-10-12 13:57:34 +03:00
parent bf54816832
commit 508d11811d
12 changed files with 1 additions and 1 deletions
binaries
aarch64
arm
freebsd-x64
mac64
mips32r1-lsb
mips32r1-msb
mips64r2-msb
ppc
x86
x86_64
tpws

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -251,7 +251,7 @@ void modify_tcp_segment(uint8_t *segment,size_t segment_buffer_size,size_t *size
// length is checked in IsTLSClientHello and cannot exceed buffer size // length is checked in IsTLSClientHello and cannot exceed buffer size
if (tpos>=l) tpos=1; if (tpos>=l) tpos=1;
VPRINT("making 2 TLS records at pos %zu",tpos) VPRINT("making 2 TLS records at pos %zu",tpos)
memmove(segment+5+tpos+5,segment+5+tpos,l-tpos); memmove(segment+5+tpos+5,segment+5+tpos,*size-(5+tpos));
segment[5+tpos] = segment[0]; segment[5+tpos] = segment[0];
segment[5+tpos+1] = segment[1]; segment[5+tpos+1] = segment[1];
segment[5+tpos+2] = segment[2]; segment[5+tpos+2] = segment[2];