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

@dfanso/tunnel-client

v1.0.9

Published

Create secure WebSocket tunnels to expose local servers to the internet

Downloads

111

Readme

@dfanso/tunnel-client

A powerful command-line tool that creates secure WebSocket tunnels to expose your local servers to the internet. Perfect for development, testing, and sharing your local work with others.

Version License

Features

  • Instant Tunnels: Create secure tunnels to your local servers in seconds
  • Secure WebSocket: Uses wss:// for secure connections
  • Custom Subdomains: Choose your own subdomain or get a random one
  • Auto Port Detection: Automatically finds available ports for the tunnel server
  • Request Logging: Detailed logging of incoming requests and responses
  • Error Handling: Robust error handling and informative error messages

Installation

# Install globally (recommended)
sudo npm install -g @dfanso/[email protected]

# Or install locally in your project
npm install @dfanso/[email protected]

Quick Start

  1. Start a tunnel:
ltunnel start
  1. Follow the interactive prompts:

    • Enter the local port to tunnel (e.g., 3000, 8000)
    • Choose a subdomain (optional)
    • Confirm the tunnel server details
  2. Your tunnel is ready! You'll see:

    • Local server URL
    • Public tunnel URL
    • Connection status

Usage Examples

Basic Usage

# Start a tunnel with interactive prompts
ltunnel start

# Start a tunnel with specific port
ltunnel start --port 3000

# Start a tunnel with custom subdomain
ltunnel start --port 3000 --subdomain myapp

Common Scenarios

Development Server

# Start your development server
npm run dev  # Usually runs on port 3000

# In another terminal, start the tunnel
ltunnel start --port 3000

API Testing

# Start your API server
node server.js  # Running on port 8000

# Create a tunnel to expose your API
ltunnel start --port 8000 --subdomain myapi

Configuration

The tunnel client connects to:

  • Default Server: dfanso.dev
  • Default Port: 8080
  • Protocol: wss:// (WebSocket Secure)

You can override these settings during tunnel creation.

Troubleshooting

Common Issues

  1. Port Already in Use

    # Check what's using the port
    lsof -i :[PORT]
       
    # Kill the process
    kill -9 [PID]
  2. Connection Timeout

    • Verify the tunnel server is running
    • Check your internet connection
    • Ensure the port isn't blocked by a firewall
  3. Permission Denied

    • Use sudo for global installation
    • Check file permissions

Development

Want to contribute? Great!

  1. Clone the repo:
git clone https://github.com/dfanso/dfanso-tunnel-client.git
cd dfanso-tunnel-client
  1. Install dependencies:
npm install
  1. Start developing:
npm start

License

MIT dfanso

Support

Having issues? Open an issue on GitHub.