0.0.28 • Published 11 months ago

@duskim/http-tunnel v0.0.28

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
11 months ago

Description

HTTP tunneler

Usage: Rendevzous (Remote) Server

package.json

"scripts": {
  "start": "npx http-tunneler <options>"
}

Usage: Host App

import { TunnelManager, Mode } from "@dukim/http-tunnel"

const tunnelManager = new TunnelManager({
  max: 2, /* open a maximum of 2 tunnels at a time */
  mode: Mode.HTTP_LONG_POLLING,
  proxyHost: "my.domain.com",
  proxyPort: 3000,
  agentPort: 3001,
  localport: 3002,
  secure: true,
  websocketKey: "path/to/tls1.key",
  tlsServerKey: "path/to/tls2.key",
  tlsServerCert: "path/to/cert.crt"
});

Yargs help

Usage: yargs.js [options]

Options:
      --version                 Show version number                    [boolean]
  -c, --cap                     Cap number of tunnels opened
                                                           [number] [default: 2]
  -h, --help                    Show help                              [boolean]
  -s, --ssl                     Enable SSL/TLS for both API server and remote tu
                                nnels                                  [boolean]
      --ap, --agentPort         Agent server port number     [number] [required]
      --pp, --proxyPort         Proxy server port number     [number] [required]
      --ph, --proxyHost         API proxy server host                   [string]
      --ip, --proxyIp           API proxy server ip                     [string]
      --wp, --websocketPort     Websocket server port        [number] [required]
      --wk, --websocketKey      Path to an RSA 2048/4096-bit private key file. e
                                .g my/path/websocket.key                [string]
  -m, --microservice            An additional microservice that will be attached
                                 to the proxy server e.g path/to/my/microservice
                                .js                                     [string]
      --mp, --microservicePort  Microservice port number[number] [default: 3001]
      --pkey, --proxyKey        Path to an RSA 2048/4096-bit private key file. e
                                .g. /my/path/myKey.key                  [string]
      --pcrt, --proxyCert       Path to a X.509 digital certificate file. e.g. /
                                my/path/certificate.crt                 [string]
      --le, --letsencrypt       Path to your letsencrypt directory. Ensure that
                                your domain is also included and that is contain
                                s both fullchain.pem and privkey.pem. e.g /etc/l
                                etsencrypt/live/domain.com              [string]
      --tkey, --tlsKey          Path to an RSA 2048/4096-bit private key. e.g.
                                /my/path/myKey.key.                     [string]
      --tcrt, --tlsCert         Path to a X.509 digital certificate file. e.g. /
                                my/path/certificate.crt                 [string]

Copyright 2023 Inquries: <dusgotmail@gmail.com>

Q&A

Q: How do I generate self-signed keys? A: OpenSSL tool can generate self-signed keys and certificates.

0.0.28

11 months ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago