Created
November 9, 2012 18:51
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome idea. How do you stop the tunnel though?