mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-04-01 15:33:37 +02:00
Allow square bracket notation for IPv6 proxy
This commit is contained in:
parent
e81b09176d
commit
36a58e2b3e
@ -21959,11 +21959,14 @@ check_proxy() {
|
||||
[[ -z "$PROXY" ]] && PROXY="${http_proxy#*\/\/}"
|
||||
[[ -z "$PROXY" ]] && fatal "you specified \"--proxy=auto\" but \"\$http(s)_proxy\" is empty" $ERR_CMDLINE
|
||||
fi
|
||||
# strip off http/https part if supplied:
|
||||
# strip http/https part if supplied:
|
||||
PROXY="${PROXY/http\:\/\//}"
|
||||
PROXY="${PROXY/https\:\/\//}" # this shouldn't be needed
|
||||
PROXYPORT="${PROXY##*:}"
|
||||
PROXYNODE="${PROXY%:*}"
|
||||
# strip square brackets in IPv6 notation, but we may enter them later
|
||||
PROXYNODE="${PROXYNODE/\[/}"
|
||||
PROXYNODE="${PROXYNODE/\]/}"
|
||||
is_number "$PROXYPORT" || fatal "Proxy port cannot be determined from \"$PROXY\"" $ERR_CMDLINE
|
||||
|
||||
#FIXME: finish IPv6 proxy support, see #1105.
|
||||
|
Loading…
x
Reference in New Issue
Block a user