Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

zapret-lib: fix reconstruct handshake without record layer

This commit is contained in:
bol-van
2025-12-29 12:08:11 +03:00
parent eec9f3e87c
commit 8628c34941

View File

@@ -2261,8 +2261,12 @@ function tls_reconstruct(tdis)
if not rec.data then return nil end
end
tls = barray(tdis.rec, function(a) return (#a.data > 0) and (bu8(a.type) .. bu16(a.ver) .. bu16(#a.data) .. a.data) or "" end)
elseif tdis.handshake and tdis.handshake[1] then
tls = tdis.handshake[1].data
elseif tdis.handshake and #tdis.handshake==1 then
-- without record layer
for k,handshake in pairs(tdis.handshake) do
tls = handshake.data
break
end
end
return tls