Proxy fixes

* Adjust proxy test timeout
* Don't show proxy on error
* Add echo statement so user knows what setup is doing
This commit is contained in:
William Wernert
2021-04-07 10:35:59 -04:00
parent 88c565feae
commit 5b3014496b

View File

@@ -1872,12 +1872,13 @@ print_salt_state_apply() {
}
proxy_validate() {
echo "Testing proxy..."
local test_url="https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS"
proxy_test_err=$(curl -sS "$test_url" --proxy "$so_proxy" 2>&1)
proxy_test_err=$(curl -sS "$test_url" --proxy "$so_proxy" --connect-timeout 5 2>&1) # set short connection timeout so user doesn't sit waiting for proxy test to timeout
local ret=$?
if [[ $ret != 0 ]]; then
error "Could not reach $test_url using proxy $so_proxy"
error "Could not reach $test_url using proxy provided"
error "Received error: $proxy_test_err"
if [[ -n $TESTING ]]; then
error "Exiting setup"