jstunnel
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

JsTunnel - secure tunnels to localhost

NPM Version Package License

Table of Contents

Description

JsTunnel provides unique public URLs allowing you to easily share a web service on your local development machine with the world through a secure tls tunnel.

Installation

Globally via npm

npm install -g jstunnel

Running on-demand:

npx jstunnel [options]

Usage

Start a webserver on some local port (e.g. 3000) and use the cli to request a tunnel to your local server.

example: http tunnel

npx jstunnel -p 3000

example: print help

npx jstunnel --help

Custom subdomain

example:

npx jstunnel -p 3000 -s subdomain

Serving local directory

example:

npx jstunnel --directory ./

Password protection

example: basic auth

npx jstunnel -p 3000 --auth username:password

example: include path

npx jstunnel -p 3000 --auth user:pass:+/private

example: exclude path

npx jstunnel -p 3000 --auth user:pass:-/public

Web interface

example: enable

npx jstunnel -p 3000 --web

example: disable

npx jstunnel -p 3000 --web false

HTTP logs

example: raw

npx jstunnel -p 3000 --log raw

example: compact

npx jstunnel -p 3000 --log compact

example: combined

npx jstunnel -p 3000 --log combined

example: body limiter

npx jstunnel -p 3000 --log [type]:200

example: disable

npx jstunnel -p 3000 --log false

Server

Globally via npm

npm install -g jstunnel
jstunnel-server --help

Running on-demand:

npx -p jstunnel jstunnel-server [options]

Docker:

# svtslv/jstunnel or ghcr.io/svtslv/jstunnel
docker run \
  -d \
  --name jstunnel-server \
  --restart unless-stopped \
  -p 9000:9000 \
  svtslv/jstunnel \
  jstunnel-server

Docker Compose:

cat ./docker-compose.yaml

Kubernetes:

cat ./kubernetes.yaml

Examples:

# With SSl (Single or Wildcard)
jstunnel -p 3000 -s tunnel --domain domain.com --api https://tunnel.domain.com

# Without SSL (Net connect)
jstunnel -p 3000 --domain domain.com --remoteTls false --api http://net.domain.com

Sponsored by

Your stars on GitHub

License

MIT

Package Sidebar

Install

npm i jstunnel

Homepage

jstunnel.com

Weekly Downloads

123

Version

0.2.1

License

MIT

Unpacked Size

1.19 MB

Total Files

66

Last publish

Collaborators

  • svtslv