A cross-runtime WebSocket implementation (Node, Bun, Deno) with built-in SOCKS5/SOCKS5h proxy support. Version 1.3.3 is the latest stable release, published in 2023. It provides a drop-in replacement for the 'ws' library, adding a 'proxy' constructor parameter. Unlike similar proxy-focused WebSocket packages, wwws works natively across all three major JavaScript runtimes without platform-specific polyfills. It supports both ESM and CommonJS module formats and ships TypeScript type definitions. The library reimplements the full WebSocket class with event handling, message sending, and connection management, though it is not fully spec-compliant (e.g., missing some standard properties on event objects).
npm install wwwsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket connection through a SOCKS5 proxy and handles basic events.
If you need full spec compliance, consider using standard WebSocket API or 'ws' library for browser/Node respectively.
Run wwws only on Node.js, Deno, or Bun. For Cloudflare Workers, use a different WebSocket library that supports their runtime.
Use the 'proxy' parameter directly instead of 'agent' for reliable proxy configuration.
Use socks5h:// proxy URL to avoid dependency on node:dns.
Ensure node:zlib is available in your runtime, or avoid using permessage-deflate.
Run `npm install wwws` or `bun add wwws` or `pnpm add wwws`.
Use `const { WWWebSocket } = require('wwws');`Switch to a socks5h:// proxy URL, or ensure node:dns is properly polyfilled.
Ensure the proxy parameter is a string like 'socks5://host:port' or an object with a toProxyURL() method.
No dependency data recorded yet.