WebSocket Relay
WebSocket Relay
The WebSocket relay lets the Voyager server dispatch LinkedIn API calls through the user’s real Chrome browser instead of issuing them from the server. The Chrome extension holds a WebSocket to the server, receives requests, executes them with fetch() and credentials: 'include', and streams the response back. LinkedIn sees requests coming from the user’s actual browser with real cookies and a real residential IP.
Why use it
- Session fidelity. Requests carry the user’s real browser cookies, User-Agent, TLS fingerprint, and IP. No datacenter-IP tell, no fingerprint mismatch.
- Zero LinkedIn tabs needed. The extension’s service worker handles fetches directly — users don’t have to keep a LinkedIn tab open.
- Self-healing cookies. When the server detects a stale session, it sends a
cookie_sync_request; the extension grabs fresh cookies from Chrome’s cookie store and syncs them back automatically. - Graceful fallback. When the relay isn’t available (Chrome closed, extension uninstalled, WebSocket drop), every endpoint falls back to direct HTTP + residential proxy using the stored cookies — just regular HTTPS. There is no third tier; Puppeteer was removed 2026-04-22.
- Authwall detection. If the extension observes a redirect to a LinkedIn authwall or checkpoint page while loading content, it alerts the server immediately.
How it works
- The Chrome extension connects to
wss://<server>/api/relayon startup. - It sends an
authmessage with the API key and user ID. - The server validates the key and registers the connection.
- When Voyager needs to call LinkedIn, it picks the relay if available, or falls back to direct HTTP + residential proxy.
- The extension executes the request, Chrome attaches real cookies, the response comes back through the WebSocket.
- Voyager returns the result to the endpoint caller.
The relay is transparent to all Voyager endpoints. Whether a request goes through the relay or direct HTTP, the API response format is identical.
Protocol
Authentication
The first message on the WebSocket must be an auth message:
The server responds:
If authentication fails, or no auth message arrives within 10 seconds, the server closes the connection.
Request / Response
The server sends request messages:
The extension replies with the same id:
Or on failure:
Ping / Pong Keepalive
The server pings every 20 seconds to keep the MV3 service worker alive:
The extension replies with { "type": "pong" }.
MV3 service workers are killed after 30s of inactivity. The 20s ping keeps the worker warm. As a backup, the extension also maintains a Chrome alarm (relay-keepalive) that fires every 24s — if the worker was killed and restarted, it reconnects automatically.
Auto-Reconnect
If the WebSocket disconnects (server redeploy, network change, Chrome sleep, etc.), the extension reconnects with exponential backoff:
The backoff resets to 1s on successful connection. When the user changes the API key, user ID, or server URL in options, the extension closes and immediately reconnects.
Voyager’s retry layer is explicitly aware of relay drops. An outbound call that fails with "Relay connection closed" is classified as a retryable transport error — the next attempt falls through to direct HTTP + proxy, so a momentary relay drop rarely surfaces to the caller as a failure.
Extension Badge
The Chrome extension icon reflects the relay status:
Status Endpoints
Check relay status (user-scoped)
relayConnected— WebSocket is open for this userfetcherSet— the relay fetcher is wired intoVoyagerApiandSalesNavApi
Admin relay status
Fallback Behaviour
When the relay isn’t usable, Voyager falls back to direct HTTP + residential proxy — not to a headless browser.
SalesNav endpoints that fingerprint a real Chrome session are more robust through the relay, but most still work on Tier 2 as well. If SalesNav specifically fails on direct HTTP for a tenant, check whether li_a and li_ep_auth_context are synced.
Configuration
The server side needs no configuration — the relay is always available at /api/relay. The extension needs:
- API key — set in the extension options page
- User ID — set in the extension options page
- Server URL — defaults to
https://li.scaleabm.org, configurable in options
The extension connects the relay automatically on startup. No manual activation is needed.