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

0.0.3 • Public • Published

HolyMoly Tunnel Manager

HolyMoly helps developer manage their SSH Tunnels

oclif Version Downloads/week License

Description

This is a cli tunnel manager. HolyMoly allows you to define ssh tunnels in a config file then open/close them using simple commands. Each tunnel is defined by a name and one or multiple targets. Each tunnel can be opened to a single target at a time.

Motivation

When working with multiple developement / test environments it can be cumbersome to relaunch each microservice with a different configuration when targeting a different environment. One solution is to setup your microservice with a single static sharable configuration that targets SSH tunnels. The output of each tunnel defines which environement is used by the microservice.

Usage

$ npm install -g holymoly
 
$ holymoly open config
Opens the config file where you need to define your tunnels. For an example, see below.
 
$ holymoly status
ID  Tunnel               Target
--  -------------------  ------
1   tunnel-1             CLOSED
2   tunnel-2             CLOSED
 
$ holymoly open tunnel-1 local
Tunnel opened
 
$ holymoly open tunnel-2 staging
Tunnel opened
 
$ holymoly status
ID  Tunnel               Target
--  -------------------  ------
1   tunnel-1             local
2   tunnel-2             staging
 
$ holymoly close tunnel-1
Tunnel closed
 
$ holymoly status
ID  Tunnel               Target
--  -------------------  ------
1   tunnel-1             CLOSED
2   tunnel-2             staging

Configuration

The confirguration file is located in ~/.config/holymoly/config.json

Here is a sample config file that defines two tunnels named tunnel-1 and tunnel-2 with two possible targets named local and staging

{
  "tunnel-1": {
    "local": {
      "bin": "socat",
      "args": ["tcp-listen:7000,reuseaddr,fork", "tcp:localhost:3306"]
    },
    "staging": {
      "bin": "ssh",
      "args": ["-N", "-L", "7000:your-aurora.cluster-abcdef.eu-west-1.rds.amazonaws.com:3306", "username@bastion.com"]
    }
  },
  "tunnel-2": {
    "local": {
      "bin": "socat",
      "args": ["tcp-listen:7001,reuseaddr,fork", "tcp:localhost:27017"]
    },
    "staging": {
      "bin": "ssh",
      "args": ["-N", "-L", "7001:37.87.56.24:27017", "username@bastion.com"]
    }
  }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    2
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i holymoly

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

20.9 kB

Total Files

23

Last publish

Collaborators

  • almathie