pantheon-systems/terminus — pull request #17 by mikemilano (2013-09-02 15:50:42+00:00)
Title: Tunnel support

This is a working start for tunnel support. See #5 for more detail.

- allows user to create an ssh tunnel by sitename and environment.
- tunnels will be re-used when a tunnel is opened to the same site/env/binding/port
- error will be displayed when a tunnel is opened to a different service that has a port already opened
- ports can be closed all at once, or one at a time
- local connection info will be displayed when opening a tunnel (mysql only currently)

```
# Create tunnel to mysql
$ drush psite-tunnel mysite dev
$ drush psite-tunnel mysite dev mysql

# Create tunnel to redis
$ drush psite-tunnel mysite dev redis

# Create tunnel to mysql with a local port of 4000
$ drush psite-tunnel mysite dev mysql 4000

# List tunnels
$ drush psite-tunnels

# Close all tunnels
$ drush psite-tclose

# Close tunnel for pid 1234 (pid is displayed when listing tunnels)
$ drush psite-tclose 1234
```