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

@dotrino/tunnel

v0.1.3

Published

Túnel reverso autohospedado del ecosistema Dotrino: expón un puerto/servicio local en una URL pública. Lib + CLI.

Readme

@dotrino/tunnel

Túnel reverso autohospedado del ecosistema Dotrino. Expón un puerto o servicio local en una URL pública — como código o como CLI.

CLI

npx @dotrino/tunnel 3000                       # expone http://localhost:3000
npx @dotrino/tunnel http://localhost:8080/api  # expone esa URL local
npx @dotrino/tunnel 3000 --key <llave 16-48 alfanum>
npx @dotrino/tunnel 3000 --server https://r.dotrino.com

Imprime tu URL pública (https://r.dotrino.com/<llave>) y registra cada request.

Librería

import { createTunnel } from '@dotrino/tunnel'

// 1) exponer un puerto local
const t = await createTunnel({ target: 3000 })
console.log(t.url)            // https://r.dotrino.com/<llave>

// 2) exponer una URL local con base
createTunnel({ target: 'http://localhost:8080/api' })

// 3) responder con un handler (sin servidor local)
createTunnel({ target: (req) => ({ status: 200, headers: { 'content-type': 'application/json' }, body: JSON.stringify({ ok: true, path: req.path }) }) })

t.close()

Opciones

| opción | descripción | |---|---| | target | número (puerto), URL string, o función (req) => { status, headers, body }. Por defecto 3000. | | key | llave del túnel (va en la URL). Por defecto se genera (32 alfanum). | | server | relay a usar. Por defecto https://r.dotrino.com. | | onReady(url) / onRequest(req) | callbacks opcionales. | | quiet | silencia logs. |

req = { method, path, headers, body } (body es Buffer|null).

Llaves

La llave identifica tu túnel y va en la URL pública. Es un secreto aleatorio alfanumérico con formato ^[A-Za-z0-9]{16,48}$. Para crear una válida desde tu código usa el helper exportado (así no tienes que conocer el formato ni la entropía):

import { createTunnel, generateKey } from '@dotrino/tunnel'

const key = generateKey()        // 32 alfanuméricos, formato válido garantizado
// guárdala: tu URL pública será https://r.dotrino.com/<key>
const t = await createTunnel({ target: 3000, key })
  • Si no pasas key, createTunnel genera una y la devuelve en t.key.
  • También puedes traer la tuya (cualquier string que cumpla el formato):
    dotrino-tunnel 3000 --key $(openssl rand -hex 16)
    El relay rechaza llaves con formato inválido (guiones, demasiado cortas, etc.); generateKey() te evita ese error.

Notas

  • La llave va en la URL pública e identifica el túnel: quien tenga la URL puede usarlo. Es un tool de dev/testing.
  • Payload limitado a 1 MB por request/response; timeout 30 s.
  • Reconecta solo si el WebSocket se cae.

MIT · parte de Dotrino.