WebSocket Relay
WebSocket Relay
The WebSocket relay routes Voyager’s LinkedIn API calls through your real Chrome browser instead of the headless Chromium instance. The extension opens a WebSocket connection to the server, receives API requests, executes them with fetch() and credentials: 'include', and returns the responses. LinkedIn sees requests coming from your actual browser with real cookies and your real IP address.
Why use it
- Session fidelity — requests use your real browser cookies, User-Agent, and IP address. No fingerprint mismatch risk.
- No proxy needed — traffic originates from your machine, not a datacenter IP.
- Zero LinkedIn tabs — the extension’s service worker handles everything. You do not need a LinkedIn tab open.
- Automatic fallback — when Chrome is closed or the extension disconnects, Voyager falls back to its headless Chromium browser seamlessly.
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 any Voyager API call needs to reach LinkedIn, the server sends a
requestmessage through the WebSocket - The extension executes the request using
fetch()withcredentials: 'include'— Chrome attaches real cookies - The extension sends the
responseback through the WebSocket - Voyager returns the result to the original API caller
The relay is transparent to all Voyager endpoints. Whether a request goes through the relay or headless Chromium, the API response format is identical. You can enable and disable the relay at any time without changing your integration code.
Protocol
Authentication
The first message on the WebSocket must be an auth message:
The server responds with:
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 responds with the same id:
Or on failure:
Ping / Pong Keepalive
The server sends a ping every 20 seconds to keep the Manifest V3 service worker alive:
The extension replies:
MV3 service workers are killed after 30 seconds of inactivity. The 20-second ping interval keeps the worker alive. As a backup, the extension also creates a Chrome alarm (relay-keepalive) that fires every 24 seconds — if the worker was killed and restarted, it reconnects automatically.
Auto-Reconnect
If the WebSocket disconnects (server restart, network change, etc.), the extension reconnects with exponential backoff:
The backoff resets to 1 second on successful connection. When settings change (API key, user ID, or server URL), the extension closes and immediately reconnects.
Extension Badge
The Chrome extension icon shows relay status:
Status Endpoints
Check Relay Status (User)
relayConnected— WebSocket connection is open for this userfetcherSet— the relay fetcher is wired into VoyagerApi and SalesNavApi
Admin Relay Status
Fallback Behavior
When the relay is not available, Voyager automatically falls back to headless Chromium:
Individual relay requests time out after 30 seconds. If the extension is connected but Chrome is unresponsive (e.g., system sleep), requests will time out before falling back. The fallback only activates when the WebSocket connection itself is closed.
Configuration
The relay requires no server-side configuration — it is always available at /api/relay. The extension side 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 extension options
The extension connects the relay automatically on startup. No manual activation is needed.