proxy=${http_proxy#http://} host=${proxy##*@} auth=${proxy%@*} if test "${auth}" != "${proxy}"; then export HTTP_PROXY_USER=${auth%%:*} export HTTP_PROXY_PASSWORD=${auth##*:} fi connect -H ${host} $1 $2