Skip to content

Instantly share code, notes, and snippets.

@benknight
Created November 9, 2012 18:51
Show Gist options
  • Save benknight/4047491 to your computer and use it in GitHub Desktop.
Save benknight/4047491 to your computer and use it in GitHub Desktop.
Alfred Shell Script Extension for opening an SSH tunnel via BrowserStack's Java command line tool to test multiple internal hosts.
#!/bin/bash
# BrowserStack SSH Tunnel Setup
# Find your key by logging into BrowserStack and finding your command line tunnel setup info
KEY=YOUR_KEY_HERE
# Add your internal hosts here
INTERNAL_HOSTS=( dev alpha beta whatever whocares )
for host in ${INTERNAL_HOSTS[@]} ; do
TUNNEL_OPTIONS="${TUNNEL_OPTIONS}${TUNNEL_OPTIONS:+,}${host}.example.com,80,0,${host}.example.com,443,1"
done
open 'http://www.browserstack.com'
java -jar BrowserStackTunnel.jar $KEY $TUNNEL_OPTIONS
@jgallen23
Copy link

awesome idea. How do you stop the tunnel though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment