Archived
1
0
This commit is contained in:
MatMoul 2025-08-22 02:50:53 +02:00
parent e978d05450
commit 58e086416b

View File

@ -43,8 +43,7 @@ PROXY=""
if [ "${3}" == "" ]; then
#echo "Use Profile - ${2}"
##echo "Use Profile or tmpFile - ${2}"
PROFILE_NAME=${2}
#PROFILE_NAME=${2}
PROFILE_FILE=~/.config/ssh-proxy/${2}
if [ ! -f "${PROFILE_FILE}" ]; then
echo "Error: Profile doesn't exist"
@ -85,7 +84,7 @@ if [[ "${PROXY_SERVER}" == *:* ]]; then
PROXY_SERVER="${PROXY_SERVER%:*}"
fi
TMP_FILE=/tmp/ssh-proxy-$(whoami)/proxy-${LOCAL_PORT}-${PROXY_USER}@${PROXY_SERVER}
TMP_FILE=/tmp/ssh-proxy-${USER}/${LOCAL_PORT}
if [ ! -d /tmp/ssh-proxy-"${USER}" ]; then
mkdir /tmp/ssh-proxy-"${USER}"
@ -107,12 +106,12 @@ function startProxy() {
exit 1
fi
{
if [ ! "${PROFILE_NAME}" == "" ]; then
echo "PROFILE_NAME=${PROFILE_NAME}"
fi
echo "LOCAL_PORT=${LOCAL_PORT}"
#if [ ! "${PROFILE_NAME}" == "" ]; then
# echo "PROFILE_NAME=${PROFILE_NAME}"
#fi
#echo "LOCAL_PORT=${LOCAL_PORT}"
#echo "PROXY_USER=${PROXY_USER}"
echo "PROXY_SERVER=${PROXY_SERVER}"
#echo "PROXY_SERVER=${PROXY_SERVER}"
#echo "PROXY_SERVER_PORT=${PROXY_SERVER_PORT}"
echo "PID=${PID}"
} > "${TMP_FILE}"