diff --git a/bin/_helpers b/bin/_helpers index 61a1e74..91368a2 100644 --- a/bin/_helpers +++ b/bin/_helpers @@ -73,4 +73,4 @@ function output_error { function output_info { output_tagged_string "$BG_B" "INFO" "$1" -} \ No newline at end of file +} diff --git a/bin/proxy b/bin/proxy index 887c077..0e62de1 100755 --- a/bin/proxy +++ b/bin/proxy @@ -69,7 +69,7 @@ while :; do exit ;; --local-domain|--local-port|--proxy-port|--proxy-domain) - parsed_value=$(parse_arg $@) + parsed_value=$(parse_arg "$@") ;; --local-domain=?*|--local-port=?*|--proxy-port=?*|--proxy-domain=?*) parsed_value=$(parse_arg ${1%%=*} ${1#*=}) @@ -104,6 +104,9 @@ while :; do ;; esac + if [ $1 == $option ]; then + shift + fi shift done @@ -146,7 +149,7 @@ function pick_one_virtual_host_from_file() { fi done - if [ -z "HOST" ]; then + if [ -z "$HOST" ]; then output_error "No VIRTUAL_HOST found in $FILE." exit 1 fi @@ -221,4 +224,4 @@ output_info "Starting proxy... $FG_C${LOCAL_DOMAIN}$FG_N:$FG_M${LOCAL_PORT}$RESE echo output_tagged_string "$BG_N" "Proxy URL" "https://$PROXY_DOMAIN" echo -ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} proxy@local.sourcetoadtest.com sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT} +#ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} proxy@local.sourcetoadtest.com sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT}