simplify: remove ws bridge; wrangler-based relay tests

This commit is contained in:
Mohamed Boudra
2026-02-05 10:45:51 +07:00
parent 36e105ed30
commit 574bdc16f6
16 changed files with 785 additions and 1276 deletions
+8 -6
View File
@@ -54,11 +54,13 @@ interface DurableObjectStub {
/**
* Durable Object that handles WebSocket relay for a single session.
*
* Two WebSockets connect to this DO:
* - role=server: The Paseo daemon
* - role=client: The mobile/web app
* WebSockets connect to this DO in three shapes:
* - role=server (no clientId): daemon control socket (one per serverId)
* - role=server&clientId=...: daemon per-client data socket (one per clientId)
* - role=client&clientId=...: app/client socket (one per clientId)
*
* Messages are forwarded between them. The DO hibernates when idle.
* Messages are forwarded between the per-client data sockets and their matching
* client sockets. The DO hibernates when idle.
*/
interface CFResponseInit extends ResponseInit {
webSocket?: WebSocket;
@@ -139,8 +141,8 @@ export class RelayDurableObject {
return new Response("Missing serverId parameter", { status: 400 });
}
// v2 relay protocol: clients must provide a clientId so the daemon can create
// an independent E2EE channel per client connection.
// Clients must provide a clientId so the daemon can create an independent
// E2EE channel per client connection.
if (role === "client" && !clientId) {
return new Response("Missing clientId parameter", { status: 400 });
}