Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed some options that changed in v3 #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ You simply have to link the Ngrok container to the application under the `app` o

Additionally, you can specify one of several environment variable (via `-e`) to configure your Ngrok tunnel:

* `NGROK_AUTHTOKEN` - Authentication Token for your Ngrok account. This is needed for custom subdomains, custom domains, and HTTP authentication.
* `NGROK_AUTH` - Authentication Token for your Ngrok account. This is needed for custom subdomains, custom domains, and HTTP authentication.
* `NGROK_SUBDOMAIN` - Name of the custom subdomain to use for your tunnel. You must also provide the authentication token.
* `NGROK_HOSTNAME` - Paying Ngrok customers can specify a custom domain. Only one subdomain or domain can be specified, with the domain taking priority.
* `NGROK_REMOTE_ADDR` - Name of the reserved TCP address to use for a TCP tunnel. You must also provide the authentication token.
Expand Down
12 changes: 7 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ else
fi

# Set the TLS binding flag
if [ -n "$NGROK_BINDTLS" ]; then
ARGS="$ARGS -bind-tls=$NGROK_BINDTLS "
if [ -n "$NGROK_BINDTLS" ] && [ "$NGROK_BINDTLS" = "true" ]; then
ARGS="$ARGS --scheme=https"
elif [ -n "$NGROK_BINDTLS" ] && [ "$NGROK_BINDTLS" = "false" ]; then
ARGS="$ARGS --scheme=http"
fi

# Set the authorization token.
Expand All @@ -41,7 +43,7 @@ fi

# Set the subdomain or hostname, depending on which is set
if [ -n "$NGROK_HOSTNAME" ] && [ -n "$NGROK_AUTH" ]; then
ARGS="$ARGS -hostname=$NGROK_HOSTNAME "
ARGS="$ARGS --domain=$NGROK_HOSTNAME "
elif [ -n "$NGROK_SUBDOMAIN" ] && [ -n "$NGROK_AUTH" ]; then
ARGS="$ARGS -subdomain=$NGROK_SUBDOMAIN "
elif [ -n "$NGROK_HOSTNAME" ] || [ -n "$NGROK_SUBDOMAIN" ]; then
Expand Down Expand Up @@ -70,7 +72,7 @@ if [ -n "$NGROK_HEADER" ]; then
fi

if [ -n "$NGROK_USERNAME" ] && [ -n "$NGROK_PASSWORD" ] && [ -n "$NGROK_AUTH" ]; then
ARGS="$ARGS -auth=$NGROK_USERNAME:$NGROK_PASSWORD "
ARGS="$ARGS --basic-auth=$NGROK_USERNAME:$NGROK_PASSWORD "
elif [ -n "$NGROK_USERNAME" ] || [ -n "$NGROK_PASSWORD" ]; then
if [ -z "$NGROK_AUTH" ]; then
echo "You must specify a username, password, and Ngrok authentication token to use the custom HTTP authentication."
Expand All @@ -80,7 +82,7 @@ elif [ -n "$NGROK_USERNAME" ] || [ -n "$NGROK_PASSWORD" ]; then
fi

if [ -n "$NGROK_DEBUG" ]; then
ARGS="$ARGS -log stdout"
ARGS="$ARGS --log=stdout"
fi

# Set the port.
Expand Down