Skip to content

Commit

Permalink
update: output a proxy URL link
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonej committed Oct 18, 2024
1 parent 59714b6 commit a263b18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions bin/_helpers
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if test -t 1; then
BG_B="$(tput setab $COLOR_B)" # Background - BLUE
#BG_M="$(tput setab $COLOR_M)" # Background - MAGENTA
#BG_C="$(tput setab $COLOR_C)" # Background - CYAN
#BG_N="$(tput setab $COLOR_N)" # Background - NEUTRAL (GRAY)
BG_N="$(tput setab $COLOR_N)" # Background - NEUTRAL (GRAY)

#FG_R="$(tput setaf $COLOR_R)" # Foreground - RED
#FG_G="$(tput setaf $COLOR_G)" # Foreground - GREEN
Expand Down Expand Up @@ -62,12 +62,15 @@ function tag {
echo "$@" "${STYLE} ${LABEL} ${RESET} "
}

function output_tagged_string() {
tag "$1" "$2" -n
echo $3
}

function output_error {
tag "$BG_R" "ERROR" -n
echo "$1"
output_tagged_string "$BG_R" "ERROR" "$1"
}

function output_info {
tag "$BG_B" "INFO" -n
echo "$1"
output_tagged_string "$BG_B" "INFO" "$1"
}
2 changes: 2 additions & 0 deletions bin/proxy
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,6 @@ fi
echo
output_info "Starting proxy... $FG_C${LOCAL_DOMAIN}$FG_N:$FG_M${LOCAL_PORT}$RESET -> $FG_C${PROXY_DOMAIN}$FG_N:$FG_M${PROXY_PORT}$RESET"
echo
output_tagged_string "$BG_N" "Proxy URL" "https://$PROXY_DOMAIN"
echo
ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} [email protected] sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT}

0 comments on commit a263b18

Please sign in to comment.