Skip to content

Commit 36a58e2

Browse files
committed
Allow square bracket notation for IPv6 proxy
1 parent e81b091 commit 36a58e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testssl.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21959,11 +21959,14 @@ check_proxy() {
2195921959
[[ -z "$PROXY" ]] && PROXY="${http_proxy#*\/\/}"
2196021960
[[ -z "$PROXY" ]] && fatal "you specified \"--proxy=auto\" but \"\$http(s)_proxy\" is empty" $ERR_CMDLINE
2196121961
fi
21962-
# strip off http/https part if supplied:
21962+
# strip http/https part if supplied:
2196321963
PROXY="${PROXY/http\:\/\//}"
2196421964
PROXY="${PROXY/https\:\/\//}" # this shouldn't be needed
2196521965
PROXYPORT="${PROXY##*:}"
2196621966
PROXYNODE="${PROXY%:*}"
21967+
# strip square brackets in IPv6 notation, but we may enter them later
21968+
PROXYNODE="${PROXYNODE/\[/}"
21969+
PROXYNODE="${PROXYNODE/\]/}"
2196721970
is_number "$PROXYPORT" || fatal "Proxy port cannot be determined from \"$PROXY\"" $ERR_CMDLINE
2196821971

2196921972
#FIXME: finish IPv6 proxy support, see #1105.

0 commit comments

Comments
 (0)