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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ssh-tuna

v1.0.3

Published

This Node application spawns an http server and an SSH Server in order to create a single hub where to receive http(s) requests and tunnel them to several different clients via SSH. One can connect to the server using the `tunnelPort` function exported fr

Downloads

2

Readme

SSH-Tuna

This Node application spawns an http server and an SSH Server in order to create a single hub where to receive http(s) requests and tunnel them to several different clients via SSH. One can connect to the server using the tunnelPort function exported from the client.ts file, therefore installing this as a library with npm allows the connection to a running server.

The Server

The server will first create a ssh folder and initialize it with a fresh ssh_host_dsa and ssh_host_rsa, and will generate and use a authorized_keys file with the same structure as the one in ~/.ssh/authorized_keys. This will be the only way to authenticate to the ssh server, so be sure to copy the allowed keys here, otherwise no one will be able to connect.

Then the SSH server will start on a port (default: 2222) different from the usual ssh one, and with a different rsa_key signature. Remeber to allow it to be seen from the network if you are using a firewall like ufw.

The http server will only handle 2 kind of requests on the main domain:

  • POST: will allocate a subdomain for an incoming SSH connection. The query param subdomain is necessary to allocate a subdomain.

  • GET: will return a list of currently open tunnels.

Also, an instance of redbird will run as reverse proxy, to dispatch every request to the correct tunnel. Once a subdomain is allocated, a port is reserved and if the ssh connection arrives before 5 seconds, the proxy is kept alive until the tunnel is open.

The Client

The client will first reserve a subdomain, then open the reverse tunnel to the server.

TODO

  • Use a shared secret to be sure that the same origin reserves the subdomain and creates the tunnel

  • Tests