Skip to content

Commit

Permalink
replace all instances of --domain with --url, except for error messag…
Browse files Browse the repository at this point in the history
…es and one-offs
  • Loading branch information
KristopherPaulsen committed Aug 21, 2024
1 parent 963fcd4 commit 53dbf3d
Show file tree
Hide file tree
Showing 44 changed files with 71 additions and 71 deletions.
14 changes: 7 additions & 7 deletions docs/agent/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ ngrok http [address:port | port] [flags]
```sh
ngrok http 8080 # forwards provided ngrok URL to port 80
ngrok http example.com:9000 # forward traffic to example.com:9000
ngrok http --domain=bar.ngrok.dev 80 # request subdomain name: 'bar.ngrok.dev'
ngrok http --domain=www.ex.com 1234 # request tunnel 'www.ex.com' (DNS CNAME)
ngrok http --url=bar.ngrok.dev 80 # request subdomain name: 'bar.ngrok.dev'
ngrok http --url=www.ex.com 1234 # request tunnel 'www.ex.com' (DNS CNAME)
ngrok http --basic-auth='falken:joshua' 80 # enforce basic auth on tunnel endpoint
ngrok http --host-header=ex.com 80 # rewrite the Host header to 'ex.com'
ngrok http file:///var/log # serve local files in /var/log
Expand All @@ -391,7 +391,7 @@ ngrok http https://localhost:8443 # forward to a local https server
| `--circuit-breaker float` | reject requests when 5XX responses exceed this ratio |
| `--compression` | gzip compress http responses from your web service |
| `--config strings` | path to config files; they are merged if multiple |
| `--domain string` | host tunnel on a custom domain |
| `--url string` | host tunnel on a custom domain |
| `-h`, `--help` | help for this command |
| `--host-header string` | set Host header; if `rewrite` use local address hostname |
| `--inspect` | enable/disable http introspection (default true) |
Expand Down Expand Up @@ -536,7 +536,7 @@ The `ngrok tls` command starts a TLS tunnel listening for traffic on port 443 wi

The ngrok server does not terminate TLS connections forwarded with this command. Any underlying protocol may be used. You may optionally specify a TLS key/cert pair which will be used to terminate the traffic at the ngrok agent before it is forwarded. If not specified, the traffic will be forwarded still encrypted.

Using this command is only recommended with the `--domain` option. Other uses will work, but will always result in certificate mismatch warnings.
Using this command is only recommended with the `--url` option. Other uses will work, but will always result in certificate mismatch warnings.

### Usage

Expand All @@ -548,7 +548,7 @@ ngrok tls [address:port | port] [flags]

```sh
# forward TLS traffic for www.example.com to port 443 (requires CNAME)
ngrok tls --domain=www.example.com 443
ngrok tls --url=www.example.com 443
```

```sh
Expand All @@ -558,7 +558,7 @@ ngrok tls 1234

```sh
# terminate TLS traffic for t.co before forwarding
ngrok tls --domain=t.co --crt=/path/to/t.co.crt --key=/path/to/t.co.key 443
ngrok tls --url=t.co --crt=/path/to/t.co.crt --key=/path/to/t.co.key 443
```

### Flags
Expand All @@ -570,7 +570,7 @@ ngrok tls --domain=t.co --crt=/path/to/t.co.crt --key=/path/to/t.co.key 443
| `--cidr-deny strings` | reject connections that match the given CIDRs |
| `--config strings` | path to config files; they are merged if multiple |
| `--crt string` | path to a TLS certificate for TLS termination |
| `--domain string` | host tunnel on a custom domain |
| `--url string` | host tunnel on a custom domain |
| `-h`, `--help` | help for this command |
| `--key string` | path to a TLS key for TLS termination |
| `--log string` | path to log file, `stdout`, `stderr` or `false` (default `false`) |
Expand Down
2 changes: 1 addition & 1 deletion docs/errors/_err_ngrok_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10207,7 +10207,7 @@
<a id="ERR_NGROK_15002" href="/docs/errors/err_ngrok_15002">ERR_NGROK_15002</a>
</td>
<td class="pre-wrapped">
Your account is on the <code>&lt;PLAN&gt;</code> plan, which requires you to register a Domain or TCP Address through the ngrok Dashboard before starting an Endpoint. Visit <a href="https://dashboard.ngrok.com/cloud-edge/domains">https://dashboard.ngrok.com/cloud-edge/domains</a>, for HTTP and TLS endpoints, or <a href="https://dashboard.ngrok.com/cloud-edge/tcp-addresses">https://dashboard.ngrok.com/cloud-edge/tcp-addresses</a>, for TCP endpoints, to register a domain or address. Then use the `--domain` flag when starting an HTTP or TLS tunnel with your Agent. For TCP tunnels, use `--remote_addr`.
Your account is on the <code>&lt;PLAN&gt;</code> plan, which requires you to register a Domain or TCP Address through the ngrok Dashboard before starting an Endpoint. Visit <a href="https://dashboard.ngrok.com/cloud-edge/domains">https://dashboard.ngrok.com/cloud-edge/domains</a>, for HTTP and TLS endpoints, or <a href="https://dashboard.ngrok.com/cloud-edge/tcp-addresses">https://dashboard.ngrok.com/cloud-edge/tcp-addresses</a>, for TCP endpoints, to register a domain or address. Then use the `--url` flag when starting an HTTP or TLS tunnel with your Agent. For TCP tunnels, use `--remote_addr`.
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/errors/err_ngrok_15002.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ErrorDetails from "/src/components/ErrorDetails";

### Message

Your account is on the `PLAN` plan, which requires you to register a Domain or TCP Address through the ngrok Dashboard before starting an Endpoint. Visit https://dashboard.ngrok.com/cloud-edge/domains, for HTTP and TLS endpoints, or https://dashboard.ngrok.com/cloud-edge/tcp-addresses, for TCP endpoints, to register a domain or address. Then use the `--domain` flag when starting an HTTP or TLS tunnel with your Agent. For TCP tunnels, use `--remote_addr`.
Your account is on the `PLAN` plan, which requires you to register a Domain or TCP Address through the ngrok Dashboard before starting an Endpoint. Visit https://dashboard.ngrok.com/cloud-edge/domains, for HTTP and TLS endpoints, or https://dashboard.ngrok.com/cloud-edge/tcp-addresses, for TCP endpoints, to register a domain or address. Then use the `--url` flag when starting an HTTP, TLS, or TCP tunnel with your Agent.

<ErrorDetails error="err_ngrok_15002" />

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ Open the Forwarding URL in your browser and you will see your web application.

If you want to keep the same URL each time you use ngrok, [create a static
domain on your dashboard](https://dashboard.ngrok.com/cloud-edge/domains) and
then use the `--domain` flag to ask the ngrok agent to use it. First, stop
then use the `--url` flag to ask the ngrok agent to use it. First, stop
ngrok with `Ctrl+C` and then run ngrok again:

```
ngrok http 8080 --domain jumpy-red-mollusk.ngrok-free.app
ngrok http 8080 --url jumpy-red-mollusk.ngrok-free.app
```

## Step 5: Secure your app
Expand All @@ -133,7 +133,7 @@ ngrok http http://localhost:8080 --oauth=google --oauth-allow-email=alan@example

Anyone accessing your app will be prompted to log in with Google and only your
account will be allowed to access it. Keep in mind that when you restart ngrok,
if you don't specify the `--domain` flag that your app's URL changed, so make
if you don't specify the `--url` flag that your app's URL changed, so make
sure to visit the new one.

<img width="400" height="400" src="/docs/img/docs/ngrok-oauth.png" />
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ $ ngrok -h
EXAMPLES:
ngrok http 80 # secure public URL for port 80 web server
ngrok http --domain baz.ngrok.dev 8080 # port 8080 available at baz.ngrok.dev
ngrok http --url baz.ngrok.dev 8080 # port 8080 available at baz.ngrok.dev
ngrok http foo.dev:80 # tunnel to host:port instead of localhost
ngrok http https://localhost # expose a local https server
ngrok tcp 22 # tunnel arbitrary TCP traffic to port 22
ngrok tls --domain=foo.com 443 # TLS traffic for foo.com to port 443
ngrok tls --url=foo.com 443 # TLS traffic for foo.com to port 443
ngrok start foo bar baz # start tunnels from the configuration file
COMMANDS:
Expand Down Expand Up @@ -170,7 +170,7 @@ ngrok http 8000 --basic-auth 'ngrok:issecure'
Now when you access the new ngrok URL in your browser, you should be prompted for a username and password.
By the way, if you have a paid plan and want to keep the same URL each time you restart, use the [`--domain`](/agent/cli/#ngrok-http) flag when starting the agent.
By the way, if you have a paid plan and want to keep the same URL each time you restart, use the [`--url`](/agent/cli/#ngrok-http) flag when starting the agent.
![](/img/docs/ngrok-basic-auth.png)
Expand All @@ -196,7 +196,7 @@ Now when you try to visit your new ngrok URL, you will be prompted to log in wit
That's it, but there's a lot more you can do with ngrok!
- Configure ngrok to use the same domain each time with [`--domain`](/http/#static-domains)
- Configure ngrok to use the same domain each time with [`--url`](/http/#static-domains)
- Tunnel other non-HTTP services such as SSH, RDP, or game servers using [TCP Tunnels](/tcp/)
- Bring your own [custom domains to ngrok](/http/#bring-your-own-domain)
- Add your [API key and automate via the `ngrok api` command](/agent/cli/#ngrok-api).
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/godaddy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ For more details, refer to [GoDaddy's guide on adding a CNAME record](https://ww

1. Once you've configured the DNS records in GoDaddy, you can return to the ngrok dashboard and click the "Check Status" button on the bottom of the DNS Details page. It may take a few minutes to an hour for the DNS records to propagate. ngrok will continue to check at a regular interval after your domain is configured. Once you see a green checkmark, you are good to go.

Finally, whenever you want to use your new domain in the ngrok agent, be sure to add `--domain your.domain.com` to the end of any command, such as `ngrok http 80 --domain your.domain.com`.
Finally, whenever you want to use your new domain in the ngrok agent, be sure to add `--url your.domain.com` to the end of any command, such as `ngrok http 80 --url your.domain.com`.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Let’s reserve a subdomain on `ngrok.app`:

```bash
ngrok api reserved-domains create \
--domain ${NGROK_SUBDOMAIN}.ngrok.app
--url ${NGROK_SUBDOMAIN}.ngrok.app
```

- Replace or set `NGROK_SUBDOMAIN` as the subdomain you'd like to use for this guide.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Let’s reserve a subdomain on `ngrok.app`:

```bash
ngrok api reserved-domains create \
--domain ${NGROK_SUBDOMAIN}.ngrok.app
--url ${NGROK_SUBDOMAIN}.ngrok.app
```

- Replace or set `NGROK_SUBDOMAIN` as the subdomain you'd like to use for this guide.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/how-to-set-up-a-custom-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Address: 203.0.113.94
Once your DNS record is in place you can create a tunnel using your new domain. Try running:

```bash
ngrok http --domain=foo.example.com 8080
ngrok http --url=foo.example.com 8080
```

and presuming you're actually running an application on port 8080 then making an HTTP request to `https://foo.example.com` should return a response from your app.
2 changes: 1 addition & 1 deletion docs/http/basic-auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This module is available on all plans.
Start ngrok in one terminal:

```bash
ngrok http https://httpbin.org --domain your-domain.ngrok.app --basic-auth "falken:joshuahunter2"
ngrok http https://httpbin.org --url your-domain.ngrok.app --basic-auth "falken:joshuahunter2"
```

In another terminal, curl that endpoint.
Expand Down
4 changes: 2 additions & 2 deletions docs/http/compression.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ First let's see what this looks like without using compression by running the
following in your `test-dir` directory:

```bash
ngrok http file://`pwd` --domain your-domain.ngrok.app
ngrok http file://`pwd` --url your-domain.ngrok.app
```

Then in another terminal while ngrok is still running:
Expand Down Expand Up @@ -180,7 +180,7 @@ Now let's try it again with compression. Stop your ngrok agent and restart it
by changing the command to:

```bash
ngrok http file://`pwd` --domain your-domain.ngrok.app --compression
ngrok http file://`pwd` --url your-domain.ngrok.app --compression
```

Rerun the same curl command:
Expand Down
2 changes: 1 addition & 1 deletion docs/http/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ ngrok will randomly assign a domain when you create HTTP endpoints unless you
specify one. This is okay for one-off uses, but usually you'll want to use a
static domain that doesn't change.

You can ask ngrok to always use the same name with the `--domain` option in the
You can ask ngrok to always use the same name with the `--url` option in the
agent or an equivalent option with other connectivity choices.

**Example**: [Static Domains](#static-domain)
Expand Down
2 changes: 1 addition & 1 deletion docs/http/ip-restrictions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Then run ngrok with IP Restrictions with the IPv4 and IPv6 addresses you got in

```bash
ngrok http 80 \
--domain your-domain.ngrok.app \
--url your-domain.ngrok.app \
--allow-cidr 2600:8c00::a03c:91ee:fe69:9695/32 \
--allow-cidr 78.227.75.230/32
```
Expand Down
4 changes: 2 additions & 2 deletions docs/http/request-headers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ This module is available on all plans.
To try out the request headers module we're going to foward to httpbin.

```bash
ngrok http https://httpbin.org --domain your-domain.ngrok.app
ngrok http https://httpbin.org --url your-domain.ngrok.app
```

In another terminal, curl that endpoint:
Expand All @@ -243,7 +243,7 @@ with `Ctrl+C` and then restart ngrok with a new command.

```bash
ngrok http https://httpbin.org \
--domain your-domain.ngrok.app \
--url your-domain.ngrok.app \
--request-header-remove='user-agent' \
--request-header-add='country: ${conn.geo.country_code}'
```
Expand Down
2 changes: 1 addition & 1 deletion docs/http/user-agent-filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Run ngrok with User Agent Filter's `allow` and `deny` set to the following:

```bash
ngrok http 80 \
--domain your-domain.ngrok.app \
--url your-domain.ngrok.app \
--ua-filter-allow="(GoingMerry/(\d)+.(\d)+)","(GomuGomu/(\d)+.(\d)+)" \
--ua-filter-deny="(Xebec/(\d)+.(\d)+)"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/alchemy/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ This is a quick step to add extra protection to your application.
**Note**: After restarting the ngrok agent, the address of the agent will be modified.
Because Alchemy doesn't allow you to edit your webhook registration,
it's recommended that you create a domain on your ngrok account, and run the agent using the following parameter `--domain myexample.ngrok.dev`
it's recommended that you create a domain on your ngrok account, and run the agent using the following parameter `--url myexample.ngrok.dev`
1. Access the [Alchemy dashboard](https://dashboard.alchemy.com/) and test the webhook endpoint or create an event by using the Alchemy SDK.
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/auth0/sso-oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ngrok can leverage Auth0 SSO in two ways:
- Auth0_CLIENT_ID: The client id you copied from Auth0.
- Auth0_CLIENT_SECRET: The client secret you copied from Auth0.

Alternatively, add the `--domain YOUR_DOMAIN` argument to get your custom URL, replacing `YOUR_DOMAIN` with your URL of preference.
Alternatively, add the `--url YOUR_DOMAIN` argument to get your custom URL, replacing `YOUR_DOMAIN` with your URL of preference.

1. Copy the URL available next to **Forwarding** (for example, `https://Auth0-sso-test.ngrok.dev`).

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/curity/sso-oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ngrok can leverage Curity Identity Server in two ways:
ngrok http 3000 --oidc=<curity_url> \
--oidc-client-id=<curity_client_id> \
--oidc-client-secret=<curity_client_secret> \
--domain=curity-sso-test.ngrok.dev
--url=curity-sso-test.ngrok.dev
```

1. [Skip to **Step 4**: ](#test-sso) Test the integration
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/descope/sso-oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ngrok can leverage Descope SSO in two ways:
- `DESCOPE_CLIENT_ID`: This is your Descope Project ID, which can be found under [Project Settings](https://app.descope.com/settings/project).
- `DESCOPE_CLIENT_SECRET`: The is the Descope Access Key that you created from earlier.

Alternatively, add the `--domain YOUR_DOMAIN` argument to get your custom URL, replacing `YOUR_DOMAIN` with your URL of preference.
Alternatively, add the `--url YOUR_DOMAIN` argument to get your custom URL, replacing `YOUR_DOMAIN` with your URL of preference.

1. Copy the URL available next to **Forwarding** (for example, `https://descope-sso-test.ngrok.dev`).

Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/facebook-messenger/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Develop and test Facebook Messenger webhooks from localhost
To integrate Facebook Messenger webhooks with ngrok:

1. [Launch your local webhook.](#start-your-app) `node appFB`
1. [Launch ngrok.](#start-ngrok) `ngrok http 3000 --domain myexample.ngrok.dev`
1. [Launch ngrok.](#start-ngrok) `ngrok http 3000 --url myexample.ngrok.dev`
1. [Configure Facebook webhooks with your ngrok URL.](#setup-webhook)
1. [Secure your webhook requests with verification.](#security)

Expand Down Expand Up @@ -76,7 +76,7 @@ Once your app is running successfully on localhost, let's get it on the internet
1. Start ngrok by running the following command in a terminal on your local desktop:

```bash
ngrok http 3000 --domain myexample.ngrok.dev
ngrok http 3000 --url myexample.ngrok.dev
```

1. ngrok will display a URL where your localhost application is exposed to the internet (copy this URL for use with Facebook).
Expand Down Expand Up @@ -191,7 +191,7 @@ This is a quick step to add extra protection to your application.
1. Restart your ngrok agent by running the command, replacing `{your app secret}` with the value you have copied before:
```bash
ngrok http 3000 --domain myexample.ngrok.dev --verify-webhook facebook_messenger --verify-webhook-secret {your app secret}
ngrok http 3000 --url myexample.ngrok.dev --verify-webhook facebook_messenger --verify-webhook-secret {your app secret}
```
1. Access the Facebook page you have assigned to your webhook and send a message to another Facebook user.
Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/facebook/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Develop and test Facebook webhooks from localhost
To integrate Facebook webhooks with ngrok:

1. [Launch your local webhook.](#start-your-app) `npm run startFacebook`
1. [Launch ngrok.](#start-ngrok) `ngrok http 3000 --domain myexample.ngrok.dev`
1. [Launch ngrok.](#start-ngrok) `ngrok http 3000 --url myexample.ngrok.dev`
1. [Configure Facebook webhooks with your ngrok URL.](#setup-webhook)
1. [Secure your webhook requests with verification.](#security)

Expand Down Expand Up @@ -76,7 +76,7 @@ Once your app is running successfully on localhost, let's get it on the internet
1. Start ngrok by running the following command in a terminal on your local desktop:

```bash
ngrok http 3000 --domain myexample.ngrok.dev
ngrok http 3000 --url myexample.ngrok.dev
```

1. ngrok will display a URL where your localhost application is exposed to the internet (copy this URL for use with Facebook).
Expand Down Expand Up @@ -169,7 +169,7 @@ This is a quick step to add extra protection to your application.
1. Restart your ngrok agent by running the command, replacing `{your app secret}` with the value you have copied before:
```bash
ngrok http 3000 --domain myexample.ngrok.dev --verify-webhook facebook_graph_api --verify-webhook-secret {your app secret}
ngrok http 3000 --url myexample.ngrok.dev --verify-webhook facebook_graph_api --verify-webhook-secret {your app secret}
```
1. Access the Facebook page you have assigned to your webhook and send a message to another Facebook user.
Expand Down
Loading

0 comments on commit 53dbf3d

Please sign in to comment.