perf(relay): reduce encrypted binary traffic overhead (#2480)

Preserve application frame identity through encryption so negotiated binary traffic avoids base64 expansion while mixed-version peers remain compatible.
This commit is contained in:
Mohamed Boudra
2026-07-27 12:12:02 +02:00
committed by GitHub
parent 1a1ff8828f
commit 1d1132de9c
22 changed files with 397 additions and 113 deletions
+2 -2
View File
@@ -171,7 +171,7 @@ describe("Live relay (relay.paseo.sh) E2E", () => {
daemonReceivedCiphertext.byteOffset + daemonReceivedCiphertext.byteLength,
),
);
expect(decryptedOnDaemon).toBe(plaintextFromClient);
expect(new TextDecoder().decode(decryptedOnDaemon)).toBe(plaintextFromClient);
const plaintextFromDaemon = "hello-from-daemon";
const ciphertextFromDaemon = encrypt(daemonSharedKey, plaintextFromDaemon);
@@ -190,7 +190,7 @@ describe("Live relay (relay.paseo.sh) E2E", () => {
clientReceivedCiphertext.byteOffset + clientReceivedCiphertext.byteLength,
),
);
expect(decryptedOnClient).toBe(plaintextFromDaemon);
expect(new TextDecoder().decode(decryptedOnClient)).toBe(plaintextFromDaemon);
} finally {
daemonControlWs.close();
daemonWs?.close();