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

@standuply/socket-tunnel

v2.1.5

Published

Tunnel HTTP Connections via socket.io streams.

Downloads

4

Readme

socket-tunnel

Tunnel HTTP Connections via socket.io streams.

Note: this doc may be outdated. Look at DEV.md for the latest instructions.

It's a fork of not popular, but very strong implementation of tunneling requests over socket.io. Original repo.

Changes from the original describes in Pull Request

Usage

Server

  1. Run npm i -g @standuply/socket-tunnel

  2. Run st-server --help

Usage: node ./bin/server --hostname [string] --port [number] --subdomain [string]

Options:
  -h, --hostname   Accepts connections on the hostname                                        [default: "127.0.0.1"]
  -p, --port       Listens port in OS                                                         [default: 3000]
  -s, --subdomain  Name of subdomain uses. It's required when server listens on a subdomain.  [default: ""]
  1. If using Nginx as proxy to your server, then configure Nginx by sample below:
# Example of Nginx config to proxying requests to socket-tunnel server
server {
    # 10.10.0.1 is an external ip of your server
    # Also, may use https 443 port    
    listen 10.10.0.1:80;
        
    server_name subdomain.example.com *.subdomain.example.com;
    
    # Uncomment these lines if using 443 port
    # ssl on;
    # ssl_certificate /path/to/certificate/file.crt;
    # ssl_certificate_key /path/to/key/file.key;
    # ssl_prefer_server_ciphers on;

    location / {
        # 127.0.0.1:3000 is address of your ran socket-tunnel server
        proxy_pass http://127.0.0.1:3000/;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        
        # Use 'https' instead if using 443 port
        proxy_set_header X-Forwarded-Proto http;
        
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';

        proxy_redirect off;
    }
}
  1. Add DNS entry like *.domain.com or *.subdomain.domain.com

  2. Run st-server with your options and enjoy :clap:

Client

  1. Run npm i -g @standuply/socket-tunnel

  2. Run st-client --help

Usage: node ./bin/client --server [string] --subdomain [string] --hostname [string] --port [number]

Options:
  -s, --server        (Required) Tunnel server endpoint                                
  --sub, --subdomain  (Required) Name of tunneling resource                            
  -h, --hostname      Address of local server for forwarding over socket-tunnel          [default: "127.0.0.1"]
  -p, --port          (Required) Port of local server for forwarding over socket-tunnel
  1. Run st-client with your options and enjoy :clap:

Credits

Forked by Igor Perevozchikov.

License

This project is licensed under the MIT License - see the LICENSE file for details