Git Product home page Git Product logo

turbotunnel's Introduction

TurboTunnel

TurboTunnel creates on-demand ssh tunnels. It listens on local ports, starts up ssh connections when something connects to those ports, and proxies data through the remote tunnel.

Trust me, it's magic.

Building

$ go get github.com/zwily/turbotunnel
$ go build github.com/zwily/turbotunnel

Sample Config

tunnels:
  - name: Work Intranet
    localPort: 10001
    jumpHost: jump1.example.com
    remoteHost: 10.0.13.10
    remotePort: 80
  - name: Work Active Directory RDP
    localPort: 10002
    jumpHost: [email protected]
    remoteHost: 10.0.0.4
    remotePort: 3389

Running

$ ./turbotunnel -config /path/to/config.yml

Using

Once TurboTunnel is running, you can then open http://localhost:10001 in your browser. TurboTunnel will see the connection to port 10001 and initiate an ssh connection to jump1.example.com forwarding a local port to 10.0.13.10:80. TurboTunnel will then proxy all data between the opened connection and the local tunnel.

Notifications

If you're using OS X, you can get desktop notifications when a tunnel is started by installing terminal-notifier:

$ brew install terminal-notifier

Running as a Daemon

I run TurboTunnel via launchd. Sample configuration, placed in ~/Library/LaunchAgents/com.github.zwily.turbotunnel.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.github.zwily.turbotunnel</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/turbotunnel</string>
        <string>-config</string>
        <string>/Users/zach/.turbotunnel.yml</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

To start it after putting the file in place:

$ launchctl load ~/Library/LaunchAgents/com.github.zwily.turbotunnel.plist

turbotunnel's People

Contributors

zwily avatar

Watchers

James Cloos avatar  avatar

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.