Skip to content

Commit

Permalink
fix: use provide proxy user and password if possible (#11)
Browse files Browse the repository at this point in the history
* fix: use provide proxy user and password if possible

* fix: just override var if proxy user and pw is present
  • Loading branch information
patrickskowronekdkfz authored Sep 26, 2023
1 parent c3a7475 commit b388775
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fi
: ${https_proxy:=$http_proxy}

if [ ! -z $https_proxy ]; then

echo "Configuring proxy $https_proxy"
## All credit to https://stackoverflow.com/a/6174447
# extract the protocol
Expand All @@ -41,6 +42,13 @@ if [ ! -z $https_proxy ]; then
# by request - try to extract the port
PORT="$(echo $HOSTPORT | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')"

if [ ! -z $HTTPS_PROXY_PASSWORD ]; then
PROXY_PASSWORD = $HTTPS_PROXY_PASSWORD
PROXY_USERNAME = $HTTPS_PROXY_USERNAME
fi



IP=""
if [[ $HOST =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
IP="$HOST"
Expand Down

0 comments on commit b388775

Please sign in to comment.