From 5b3014496bdd493211bfd376f26dc91cddb1eece Mon Sep 17 00:00:00 2001 From: William Wernert Date: Wed, 7 Apr 2021 10:35:59 -0400 Subject: [PATCH] Proxy fixes * Adjust proxy test timeout * Don't show proxy on error * Add echo statement so user knows what setup is doing --- setup/so-functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index e2e779775..0724f5851 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -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"