check if proxy variables are set

This commit is contained in:
Catalin-Emil Fetoiu 2023-10-20 17:24:36 -07:00
parent bf268b1088
commit b17df298ee
1 changed files with 9 additions and 3 deletions

View File

@ -11,9 +11,15 @@ ip route show table all
ip neighbor
ip link
# This will include the HTTP proxy env variables, if present
echo "Printing all environment variables"
printenv
set +u
[[ ! -v http_proxy ]] && echo "http_proxy is not set" || echo "http_proxy is set"
[[ ! -v HTTP_PROXY ]] && echo "HTTP_PROXY is not set" || echo "HTTP_PROXY is set"
[[ ! -v https_proxy ]] && echo "https_proxy is not set" || echo "https_proxy is set"
[[ ! -v HTTPS_PROXY ]] && echo "HTTPS_PROXY is not set" || echo "HTTPS_PROXY is set"
[[ ! -v no_proxy ]] && echo "no_proxy is not set" || echo "no_proxy is set"
[[ ! -v NO_PROXY ]] && echo "NO_PROXY is not set" || echo "NO_PROXY is set"
[[ ! -v WSL_PAC_URL ]] && echo "WSL_PAC_URL is not set" || echo "WSL_PAC_URL is set"
set -u
echo "Printing DNS configuration"
cat /etc/resolv.conf