From ed9c56d6799e922750d6e10d3398657ef7e0e4d0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 25 May 2023 20:35:54 -0500 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/inc/sites.inc b/inc/sites.inc index 5b38a532..f8be0985 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -551,15 +551,33 @@ SITEINFO(){ else ssl='-' fi + + if [ "$(grep include/proxy.conf ${sitefile})" != "" ]; then + type='Proxy' + server=$(grep 'set $server' ${sitefile}) + server=${server#*\"}; server=${server%\"*} + port=$(grep 'set $port' ${sitefile}) + port=${port##* }; port=${port%;*} + c=0; spc7=''; spct=$((${cw_spc7}-${#server})); until [ $c = ${spct} ]; do spc7="${spc7} "; c=`expr $c + 1`; done + proxyhost="${server}${spc7}:${port}" + else + type='HTTP' + proxyhost='' + fi [ "$(grep include/hsts-support.conf ${sitefile})" != "" ] && hsts='Yes' || hsts='-' [ "$(grep include/websocket-support.conf ${sitefile})" != "" ] && wbskt='Yes' || wbskt='-' [ "$(grep include/secure-access.conf ${sitefile})" != "" ] && lock='Yes' || lock='-' - echo -e "${idsCL[Cyan]}!) Site: ${idsST[Bold]}${site}${idsST[Reset]}" - echo -e "${idsCL[Cyan]}!) SSL: ${idsST[Bold]}${ssl}${idsST[Reset]} - ${idsCL[LightCyan]}${SUBJECTNAMES}" - echo -e "${idsCL[Cyan]}3) HSTS ${idsST[Bold]}${hsts}${idsST[Reset]}" - echo -e "${idsCL[Cyan]}4) WbSkt: ${idsST[Bold]}${wbskt}${idsST[Reset]}" - echo -e "${idsCL[Cyan]}5) Lock: ${idsST[Bold]}${lock}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}!) Site Address: ${idsST[Bold]}${site}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}!) SiteType: ${idsST[Bold]}${ssl}${idsST[Reset]} - ${idsCL[LightCyan]}${SUBJECTNAMES}" + echo -e "${idsCL[Cyan]}!) SSL Secure: ${idsST[Bold]}${type}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}4) HSTS Enabled ${idsST[Bold]}${hsts}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}5) Web Sockets: ${idsST[Bold]}${wbskt}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}6) Secured: ${idsST[Bold]}${lock}${idsST[Reset]}" + if [ "${type}" == "Proxy" ]; then + echo -e "${idsCL[Cyan]}7) Proxy Server: ${idsST[Bold]}${server}${idsST[Reset]}" + echo -e "${idsCL[Cyan]}8) Proxy Port: ${idsST[Bold]}${port}${idsST[Reset]}" + fi echo -en "\n${idsCL[LightCyan]}Enter the line number to edit: ${idsCL[Default]}" read edit echo