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

@conn.lt/tunnel

v0.0.5

Published

A lightweight tool to connect local ports to the internet over tunnel.

Readme

@conn.lt/tunnel

@conn.lt/tunnel is a Node.js SDK that enables secure tunneling through conn.lt servers. It allows you to create reliable and secure tunnels for your applications, services, or IoT devices, even if they are behind firewalls or NATs. With this SDK, you can effortlessly establish HTTP and TCP tunnels to your Mac, PC, server, or IoT device. Designed for simplicity, it empowers developers to proxy HTTP and TCP traffic securely via an uplink server with minimal configuration.

The SDK currently supports both HTTP and TCP forwarding capabilities. For HTTP tunnels, our cloud proxy server automatically handles SSL/TLS termination (offloading), ensuring secure HTTPS connections without requiring any SSL configuration on your local server. This makes it easy to expose your local HTTP services with automatic HTTPS encryption.

All tunnels are encrypted, ensuring your data remains secure and private during transmission.

Installation

npm install @conn.lt/tunnel
yarn add @conn.lt/tunnel
pnpm add @conn.lt/tunnel

Getting Started

Example Usage

HTTP forwarding

With HTTP forwarding, you can add authentication, and custom headers for your requests, and our proxy server automatically handles HTTPS offloading to secure your HTTP sessions.

import { connect } from '@conn.lt/tunnel';

// Connect to the uplink server
const connection = await connect();
connection.on('close', () => {
  console.log('Connection closed');
});
console.log('Connected with ID:', connection.id);
// Forward local HTTP server traffic
const forwarder = await connection.forward(3000); // 'localhost:3000' is also supported.
forwarder.on('close', () => {
  console.log('Forwarder closed');
});
console.log('Forwarder URL:', forwarder.url); // returns https://xxx.conn.lt

console.log(
  `Connection closed with ID: ${connection.id} has total ${connection.forwarders.length} forwarders.`,
);

// Close the forwarder and connection
await forwarder.close();
await connection.close();

TCP forwarding

import { connect } from '@conn.lt/tunnel';

// Connect to the uplink server
const connection = await connect({ type: 'tcp' });
connection.on('close', () => {
  console.log('Connection closed');
});
console.log('Connected with ID:', connection.id);
// Forward to a TCP server in local network
const forwarder = await connection.forward(22); // 'localhost:22' is also supported.
forwarder.on('close', () => {
  console.log('Forwarder closed');
});
console.log('Forwarder URL:', forwarder.url); // returns tcp://xxx.conn.lt:yyyy

console.log(
  `Connection closed with ID: ${connection.id} has total ${connection.forwarders.length} forwarders.`,
);

TCP forwarding to another TCP server on local network

Both HTTP and TCP forwarders can point to another host on your local network. For example, you can forward traffic to 192.168.1.100:3000 for HTTP or 192.168.1.100:22 for TCP connections.

import { connect } from '@conn.lt/tunnel';

// Connect to the uplink server
const connection = await connect({ type: 'tcp' });
connection.on('close', () => {
  console.log('Connection closed');
});
console.log('Connected with ID:', connection.id);
// Forward to a TCP server in local network
const forwarder = await connection.forward('192.168.1.100:22');
forwarder.on('close', () => {
  console.log('Forwarder closed');
});
console.log('Forwarder URL:', forwarder.url); // returns tcp://xxx.conn.lt:yyyy

console.log(
  `Connection closed with ID: ${connection.id} has total ${connection.forwarders.length} forwarders.`,
);

Forwarding to reserved domain/port

To use custom permanent domains and ports, you must first obtain a token from the conn.lt dashboard and then use it in the connection options.

import { connect } from '@conn.lt/tunnel';

// Connect to the uplink server
const connection = await connect({ type: 'tcp', token: 'reserved-host-token' });
connection.on('close', () => {
  console.log('Connection closed');
});
console.log('Connected with ID:', connection.id);
// Forward to a TCP server in local network
const forwarder = await connection.forward('192.168.1.100:22');
forwarder.on('close', () => {
  console.log('Forwarder closed');
});
console.log('Forwarder URL:', forwarder.url); // returns tcp://reserved-host.conn.lt:reserved-port

console.log(
  `Connection closed with ID: ${connection.id} has total ${connection.forwarders.length} forwarders.`,
);

License

This work is licensed under MIT.