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

pixcap-connector

v1.1.0

Published

Pixcap VPN Connector - Capture screenshots from inside your network

Downloads

203

Readme

Pixcap VPN Connector

Capture screenshots of internal websites through the Pixcap API. Deploy this connector inside your network to screenshot private dashboards, staging environments, and internal applications.

Quick Start

Docker (Recommended)

docker run -d \
  -e PIXCAP_CONNECTOR_TOKEN=pxc_your_token \
  --restart unless-stopped \
  --name pixcap-connector \
  dashah2/pixcap-connector

npm

npm install -g pixcap-connector
PIXCAP_CONNECTOR_TOKEN=pxc_your_token pixcap-connector

From Source

git clone https://github.com/dan-shah/pixcap.git
cd dashah2/pixcap-connector
npm install
PIXCAP_CONNECTOR_TOKEN=pxc_your_token npm start

Get Your Token

  1. Log in to pixcap.dev/dashboard
  2. Scroll to VPN Connectors section
  3. Click Create New Connector
  4. Copy the token (shown only once!)
  5. Note your Connector ID for API requests

Take a Screenshot

Once your connector is running and shows "Online" in the dashboard:

curl "https://pixcap.dev/api/v1/screenshot?url=http://internal.example.com&connector_id=conn_YOUR_ID" \
  -H "X-API-Key: pix_YOUR_API_KEY" \
  -o screenshot.png

POST Request (JSON)

curl -X POST "https://pixcap.dev/api/v1/screenshot" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: pix_YOUR_API_KEY" \
  -d '{
    "url": "http://internal.example.com",
    "connectorId": "conn_YOUR_ID",
    "width": 1920,
    "height": 1080
  }' \
  -o screenshot.png

Configuration

| Environment Variable | Default | Description | |---------------------|---------|-------------| | PIXCAP_CONNECTOR_TOKEN | (required) | Your connector token from the dashboard | | PIXCAP_API_URL | wss://pixcap.dev/ws/connector | WebSocket endpoint URL | | SCREENSHOT_TIMEOUT | 30000 | Screenshot timeout in milliseconds | | PUPPETEER_EXECUTABLE_PATH | (auto-detect) | Path to Chrome/Chromium executable | | DEFAULT_VIEWPORT_WIDTH | 1280 | Default viewport width | | DEFAULT_VIEWPORT_HEIGHT | 800 | Default viewport height |

How It Works

┌─────────────────┐      ┌──────────────────┐      ┌─────────────────┐
│  Your App       │      │  Pixcap Cloud    │      │  Connector      │
│                 │      │                  │      │  (Your Network) │
└────────┬────────┘      └────────┬─────────┘      └────────┬────────┘
         │                        │                         │
         │ 1. API Request         │                         │
         │ with connector_id      │                         │
         │───────────────────────>│                         │
         │                        │                         │
         │                        │ 2. Route via WebSocket  │
         │                        │────────────────────────>│
         │                        │                         │
         │                        │              3. Capture screenshot
         │                        │                 of internal URL
         │                        │                         │
         │                        │ 4. Return image         │
         │                        │<────────────────────────│
         │                        │                         │
         │ 5. Screenshot response │                         │
         │<───────────────────────│                         │

The connector establishes an outbound WebSocket connection to Pixcap cloud. This means:

  • No inbound firewall rules needed
  • Works behind NAT and corporate firewalls
  • Your internal URLs are never exposed to the internet

Docker Compose

version: '3.8'
services:
  pixcap-connector:
    image: dashah2/pixcap-connector:latest
    environment:
      - PIXCAP_CONNECTOR_TOKEN=${PIXCAP_CONNECTOR_TOKEN}
    restart: unless-stopped

Use Cases

  • Internal Dashboards: Capture Grafana, Kibana, or custom dashboards
  • Staging Environments: Screenshot staging sites before deployment
  • CI/CD Integration: Generate visual diffs in your pipeline
  • Private Applications: Document internal tools and wikis
  • Monitoring: Periodic screenshots of internal services

Troubleshooting

Connector shows "Offline"

  1. Check the connector is running: docker logs pixcap-connector
  2. Verify your token is correct
  3. Ensure outbound WebSocket connections are allowed (port 443)

Screenshots timeout

  1. Increase SCREENSHOT_TIMEOUT environment variable
  2. Check if the target URL is accessible from the connector host
  3. Verify Chrome/Chromium is installed correctly

Browser launch fails

Set the Chrome path explicitly:

PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium docker run ...

Or on macOS:

PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

Security

  • Connector tokens are hashed (SHA-256) before storage
  • All communication uses TLS encryption
  • Tokens can be regenerated at any time from the dashboard
  • Each connector has a unique ID for access control

Documentation

Full documentation: pixcap.dev/docs#connectors

Support

License

MIT