Skip to content

Commit a263b18

Browse files
committed
update: output a proxy URL link
1 parent 59714b6 commit a263b18

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

bin/_helpers

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if test -t 1; then
3333
BG_B="$(tput setab $COLOR_B)" # Background - BLUE
3434
#BG_M="$(tput setab $COLOR_M)" # Background - MAGENTA
3535
#BG_C="$(tput setab $COLOR_C)" # Background - CYAN
36-
#BG_N="$(tput setab $COLOR_N)" # Background - NEUTRAL (GRAY)
36+
BG_N="$(tput setab $COLOR_N)" # Background - NEUTRAL (GRAY)
3737

3838
#FG_R="$(tput setaf $COLOR_R)" # Foreground - RED
3939
#FG_G="$(tput setaf $COLOR_G)" # Foreground - GREEN
@@ -62,12 +62,15 @@ function tag {
6262
echo "$@" "${STYLE} ${LABEL} ${RESET} "
6363
}
6464

65+
function output_tagged_string() {
66+
tag "$1" "$2" -n
67+
echo $3
68+
}
69+
6570
function output_error {
66-
tag "$BG_R" "ERROR" -n
67-
echo "$1"
71+
output_tagged_string "$BG_R" "ERROR" "$1"
6872
}
6973

7074
function output_info {
71-
tag "$BG_B" "INFO" -n
72-
echo "$1"
75+
output_tagged_string "$BG_B" "INFO" "$1"
7376
}

bin/proxy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,6 @@ fi
219219
echo
220220
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"
221221
echo
222+
output_tagged_string "$BG_N" "Proxy URL" "https://$PROXY_DOMAIN"
223+
echo
222224
ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} [email protected] sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT}

0 commit comments

Comments
 (0)