idz: Ignore ServerBox traffic

This commit is contained in:
b166fe48b91eb09f279b79a4ecf57b2f8f0d3705 2021-02-03 17:02:14 -05:00 committed by da5669c09fdb0a288ba01e259a609d7779ac7fc9
parent f2434cef7e
commit 206d12742a

View File

@ -48,6 +48,12 @@ function writeServerHello(aesKey: Buffer, rsaKey: RsaKey): Buffer {
function readClientHello(buf: Buffer) {
const magic = buf.readUInt32LE(0x00);
if (magic === 0xFE78571D) {
throw new Error(
"Server Box data, ignore."
);
}
if (magic !== 0x01020304) {
throw new Error(
"Invalid magic number, cryptographic processing probably incorrect."