npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

wwws

v1.1.2

Published

a worldwide (node, bun, & deno) websocket socks5/h proxy implementation

Readme

wwws is a global websocket proxy implementation that works on every flavor of the javascript runtime: node, deno, and bun (as well as with require AND import)!

you can install wwws using any of your favorite PMs:

  • bun add wwws (recommended)
  • pnpm add wwws
  • npm install wwws

(yarn's main branch hasn't been updated in a year and is not recommended for everyday use, but you can if you wish)

wwws follows most of the syntax as the ws library. the only addition is the proxy param in the constructor:

import { WWWebSocket } from 'wwws'; // the WWWebSocket is exported as both default and as "WWWebSocket"

const ws = new WWWebSocket('wss://ip.villainsrule.xyz', {
    proxy: 'socks5://user:pass@host:port' // can be socks5 or socks5h
});

the goal of WWWebSocket is to always work, no matter what environment you're in. if you're in an environment that doesn't work, open an issue!

wwws supports:

it also supports both cjs & esm file formats.

[!WARNING] wwws does NOT support fake node hosting platforms! the main example of this is cloudflare workers. the reason? many of these platforms rewrite node internals to the point where there is massive compatbility loss.

wwws requires several node:* internals to run. it does not rely on any npm packages or platform-specific features. deno & bun fully support all of these internals without issues, so wwws works smoothly on all 3 runtimes! if you need a checklist for some reason, here you go:

  • node:crypto
    • crypto.randomBytes - required
  • node:dns
    • dns.lookup - required only if using socks5 proxies, socks5h works without
  • node:net
    • net.connect - required
  • node:tls
    • tls.connect - required
  • node:zlib
    • zlib.deflateRaw - required only if using the permessage-deflate feature
    • zlib.inflateRaw - required only if using the permessage-deflate feature

[!NOTE] if you are building your own runtime, you should make sure all of the above modules can be imported without issues at the top level. it's probably also a smart idea to stub the things that aren't required "just in case".

since this library rewrites the entire WebSocket object, the following things are supported:

class params

  • headers
  • proxy

[!NOTE] agent is supported to the extent that a proxy URL will try to be extracted from it. agent is not recommended and is only present so you can use wwws as a dropin solution.

methods

  • send(message)
  • close(code)

props

  • static CONNECTING = 0
  • static OPEN = 1
  • static CLOSING = 2
  • static CLOSED = 3
  • binaryType (default 'nodebuffer') [TODO]
  • url

events

  • onopen / open
  • onerror / error
  • onclose / close
  • onmessage / message
  • ping
  • pong

[!WARNING] events might not have all required properties on them; they are essentially polyfills...

if something here is missing that you require, you are encouraged to open an issue for support!

[!NOTE] there are no plans to officially use Deno.createHttpClient under the hood.

reading through hundreds of pages to add features 95% of users will not use is a waste of my time. if something is wrong or you need something implemented, open an issue and we'll figure out how to make it work.