#!/bin/sh set -o errexit if [ "$1" = "/usr/bin/dumbproxy" ]; then if [ -n "$AUTH" ]; then ARGS="-bind-address $ADDRESS -auth $AUTH $OPTIONS" elif [ -n "$USERNAME" ] && [ -n "$PASSWORD" ]; then if [ -n "$HIDDEN_DOMAIN" ]; then AUTH="static://?username=$USERNAME&password=$PASSWORD&hidden_domain=$HIDDEN_DOMAIN" else AUTH="static://?username=$USERNAME&password=$PASSWORD" fi ARGS="-bind-address $ADDRESS -auth $AUTH $OPTIONS" else ARGS="-bind-address $ADDRESS $OPTIONS" fi fi # shellcheck disable=SC2086 exec "$@" $ARGS