Coder Social home page Coder Social logo

tunneler's Introduction

Tunneler

Stuff to make stuff tunnels with stuff

Configuration

You need to either have a tunnels.cfg file in your directory or a .tunneler.cfg in your home folder.

If you have both then the current directory (local) settings will override the home folder's (global).

Create ~/.tunneler.cfg or tunnels.cfg with something similar to this:

# Common settings section (optional)
[common]
# If a tunnel does not specify a user this one will be used
default_user = YOUR_DEFAULT_USER

# Tunnel groups (optional)
[groups]
# Multiple names are allowed. These must be defined in the file
tunnel_group_1 =
		tunnel1
		tunnel2:port  # Specifying a local port here overrides the tunnel's default

# Tunnel information - copy at will. 'user' is optional
# This translates to ssh -g -f -N -L{local_port}:{host}:{remote_port} {user}@{server}
[TUNNEL-NAME]
name = TUNNEL_LONG_NAME
local_port = LOCAL_MACHINE_PORT
remote_port = SERVER_PORT
server = SERVER_NAME
user = OPTIONAL_USER_NAME # defaults to common's default_user
host = OPTIONAL_HOST # defaults to localhost

Usage

Usage: tunneler [OPTIONS] COMMAND [ARGS]...

Options:
  --verbose  Show verbose information
  --help     Show this message and exit.

Commands:
  check    Check the state of a tunnel
  restart  Stop and start specific or all active tunnels
  show     Show active/inactive (tunnels|groups|all)
  start    Start one or more tunnels
  stop     Stop one or more or ALL tunnels

License

Tunneler is licensed under the BSD ISC License

tunneler's People

Contributors

alastairatfanduel avatar judy2k avatar xoliver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

judy2k waldyrious

tunneler's Issues

Checking a non-configured tunnel results in a stack-trace

Steps to reproduce:

  1. Configure tunneler
  2. Run tunneler check non-existent-tunnel
  3. Observe a stack-trace:
Traceback (most recent call last):
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/bin/tunneler", line 9, in <module>
    load_entry_point('tunneler==0.5.1', 'console_scripts', 'tunneler')()
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/venv/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/src/tunneler/main.py", line 52, in check
    if ctx.obj['TUNNELER'].is_tunnel_active(name):
  File "/Users/mark/Documents/Development/devstacks/tunneler-fork/src/tunneler/tunneler.py", line 22, in wrap
    raise ConfigNotFound()
tunneler.tunneler.ConfigNotFound

Expected behaviour:

Probably an error message that explains that the tunnel does not exist in the configuration, and no stack--trace.

Please note the stack trace is from my own fork of tunneler that I'm in the middle of refactoring, so the exact lines of code will be different.

Speed up multiple tunnels to single machine

SSH allows the -L flag to be supplied multiple times. This means that in a tunneler config that requires multiple tunnels to a single server, these could all be executed with one SSH call, speeding up the connection time massively.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.