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 🙏

© 2026 – Pkg Stats / Ryan Hefner

proxyhub

v0.2.0

Published

ProxyHub CLI - Test your APIs with ease

Readme

ProxyHub

MIT License Node.js npm

Expose localhost to the internet. Open-source and self-hostable.

Quick Start

npx proxyhub -p 3000

That's it! Your local server running on port 3000 is now accessible from the internet.

Installation

Using npx (no install needed)

npx proxyhub -p <port>

Global install

npm install -g proxyhub
proxyhub -p <port>

Usage

Basic

proxyhub -p 3000

Request Inspector

Enable the built-in inspector to monitor all proxied requests and responses through a local web UI:

# Enable inspector (opens on port + 1000 by default)
proxyhub -p 3000 --inspect

# Custom inspector port
proxyhub -p 3000 --inspect --inspect-port 9000

Once enabled, open the inspector URL shown in the terminal (e.g., http://localhost:4000) to view requests in real-time.

Inspector features:

  • Filter by method, status code, and path
  • View full request/response headers and bodies
  • Resend captured requests with one click
  • API Composer — click "Compose" to build requests from scratch, or "Edit in Composer" on any captured request to pre-fill the form with its method, URL, headers, and body
  • cURL export — expand the cURL section on any request detail page to get a ready-to-copy command
  • Light/dark theme

Mock Mode

Define mock API responses without needing a real backend server. Mock mode includes a web UI for managing mocks and supports exact, prefix, and regex path matching.

# Pure mock mode (no local server needed)
proxyhub --mock

# Hybrid mode (mocked paths return mock data, others proxy to localhost)
proxyhub --mock -p 3000

# Inspector automatically enables mock mode
proxyhub -p 3000 --inspect

Once running, open the Mock Manager URL shown in the terminal (e.g., http://localhost:3001/mocks) to create and manage mocks.

Mock features:

  • Pure mock mode — no local server required, define all responses via the UI
  • Hybrid mode — combine mocks with a real backend; mocked paths return mock data, non-mocked paths proxy normally
  • Path matching — exact, prefix, or regex matching with configurable priority
  • Response customization — set status codes, headers, body, and response delay
  • Inspector integration — mocked requests appear in the inspector with a MOCK badge
  • Enable/disable individual mocks without deleting them

Token Protection

Secure your tunnel so only requests with the correct token can access it:

proxyhub -p 3000 --token mysecrettoken

Requests must then include the X-Proxy-Token header:

curl -H "X-Proxy-Token: mysecrettoken" https://your-tunnel.proxyhub.cloud/

Debug Mode

proxyhub -p 3000 --debug

CLI Options

| Option | Description | |--------|-------------| | -p, --port <port> | Port number to proxy | | -m, --mock | Enable mock mode | | -t, --token <token> | Token for tunnel protection | | -i, --inspect | Enable request inspector UI | | --inspect-port <port> | Port for inspector UI (default: port + 1000) | | -k, --auth-key <key> | Authentication key for the ProxyHub server | | -d, --debug | Enable debug mode | | -V, --version | Output version number | | -h, --help | Display help |

Either --port or --mock is required. Using --inspect automatically enables mock mode.

Self-Hosted Server

Connect to your own ProxyHub server using environment variables:

PROXYHUB_SOCKET_URL=https://your-server.com proxyhub -p 3000

See the self-hosting guide for server setup instructions.

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | PROXYHUB_SOCKET_URL | https://connect.proxyhub.cloud | ProxyHub server URL | | PROXYHUB_SOCKET_PATH | /socket.io | Socket.IO path | | PROXYHUB_TOKEN | - | Token for tunnel protection | | PROXYHUB_AUTH_KEY | - | Authentication key for the server | | PROXYHUB_ALLOW_INSECURE | - | Allow self-signed TLS certificates |

How It Works

  1. Client connects to the ProxyHub server via WebSocket
  2. Server assigns a unique public URL (e.g., https://abc123.proxyhub.cloud)
  3. Incoming requests to that URL are forwarded through the WebSocket to the client
  4. Client proxies them to your local server and streams responses back

Security

Server Authentication

If the ProxyHub server requires authentication, provide the shared key:

proxyhub -p 3000 --auth-key your-secret-key

# Or via environment variable
PROXYHUB_AUTH_KEY=your-secret-key proxyhub -p 3000

TLS Certificate Verification

TLS certificate verification is enabled by default. To connect to servers with self-signed certificates:

PROXYHUB_ALLOW_INSECURE=1 proxyhub -p 3000

Tunnel IDs

Tunnel IDs are cryptographically random and persisted in ~/.proxyhub/tunnel-ids.json for stability across restarts.

The server also enforces rate limits: 5000 HTTP requests per 10-minute window and 30 WebSocket connections per minute per IP. These are configurable via server environment variables (RATE_LIMIT_MAX_REQUESTS, RATE_LIMIT_WINDOW_MS, SOCKET_MAX_CONNECTIONS_PER_MINUTE).

See the SECURITY.md for full security documentation.

Links

License

MIT