UNPKG

navflow-browser-server

Version:

Standalone Playwright browser server for NavFlow - enables browser automation with API key authentication, workspace device management, session sync, LLM discovery tools, and requires Node.js v22+

71 lines 1.72 kB
/** * Tunnel Client - Connects to proxy server and handles HTTP request forwarding */ import WebSocket from 'ws'; import { EventEmitter } from 'events'; interface TunnelInfo { tunnelId: string; password: string; } declare class TunnelClient extends EventEmitter { private localServerPort; private proxyServerUrl; private ws; private connected; private tunnelInfo; private pendingRequests; private reconnectAttempts; private maxReconnectAttempts; private reconnectDelay; constructor(localServerPort?: number, proxyServerUrl?: string); /** * Connect to the proxy server */ connect(): Promise<void>; /** * Handle incoming messages from proxy server */ private handleMessage; /** * Handle HTTP request from proxy server */ private handleHttpRequest; /** * Make HTTP request to local server */ private makeLocalRequest; /** * Display tunnel information in console */ private displayTunnelInfo; /** * Attempt to reconnect to proxy server */ private attemptReconnect; /** * Send ping to proxy server */ ping(): void; /** * Get current tunnel information */ getTunnelInfo(): TunnelInfo | null; /** * Check if connected to proxy */ isConnected(): boolean; /** * Send WebRTC signaling message through tunnel */ sendWebRTCMessage(message: any): void; /** * Get WebSocket instance for direct access */ getWebSocket(): WebSocket | null; /** * Disconnect from proxy server */ disconnect(): void; } export default TunnelClient; //# sourceMappingURL=tunnelClient.d.ts.map