Skip to content
Merged
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 docs/lambda-tunnel-modifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This document will help you understand all the modifiers/arguments used with Lam

| FLAG (SHORT) | FLAG (LONG) | DESCRIPTION | TYPE |
| :----------- | :-------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| | --allowHosts | Comma separated list of hosts to route via tunnel. Everything else will be routed via Internet. | String |
| | --allowHosts | Comma separated list of hosts to route via tunnel. Everything else will be routed via Internet. <br /> Learn how to use the [wildcard expressions](https://www.lambdatest.com/support/docs/tunnel-allowHost-wildcard-support/) in the `--allowHosts` flag | String |
| | --bypassHosts | Comma separated list of hosts to bypass from tunnel. These will be routed via internet. | String |
| | --callbackURL | Callback URL for tunnel status. | String |
| -c | --config | Path of the config file to use | String |
Expand Down
76 changes: 76 additions & 0 deletions docs/tunnel-allowHost-wildcard-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
id: tunnel-allowHost-wildcard-support
title: Support for Wildcard in --allowHosts Flag
hide_title: false
sidebar_label: Wildcard Support
description: Now you can use wildcard values for the -allow-Host flag for setting up the tunnel at lambdatest.
keywords:
- local app testing
- lambdatest local testing
- lambdatest local tunnel
- LambdaTest tunnel
- local app testing for linux
- ssh connection
- shared ssh
- secure-shell-tunnel
- docker compose ssh tunnel
- docker vpn tunnel
image: /assets/images/og-images/docker-tunnel.png
url: https://www.lambdatest.com/support/docs/tunnel-allowHost-wildcard-support/
site_name: LambdaTest
slug: tunnel-allowHost-wildcard-support/
---

<script type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "LambdaTest",
"item": "https://www.lambdatest.com"
},{
"@type": "ListItem",
"position": 2,
"name": "Support",
"item": "https://www.lambdatest.com/support/docs/"
},{
"@type": "ListItem",
"position": 3,
"name": "Docker Tunnel",
"item": "https://www.lambdatest.com/support/docs/tunnel-allowHost-wildcard-support/"
}]
})
}}
></script>
LambdaTest Tunnel now supports wildcard entries in the [`--allowHosts`](https://lambdatest.com/support/docs/lambda-tunnel-modifiers/#:~:text=TYPE-,%2D%2DallowHosts,-Comma%20separated%20list) flag. This enhancement allows users to specify patterns for hostnames instead of listing each subdomain separately, making it more flexible and efficient.

## Usage of `--allowHosts` with Wildcards
The `--allowHosts` flag enables users to define which domains should be routed through the LambdaTest Tunnel while allowing other traffic to bypass it. With the new wildcard support, you can match multiple subdomains easily.

### Formatting Domains with Wildcards
Follow these guidelines when using wildcards in domain names:

#### Use only the domain name
- Do not include `http://` or `https://`.
- ✅ Example: `example.com`.       

#### Comma-separated list without spaces
- Ensure that the list of domains is comma-separated with no spaces.
- ✅ Example: `example.com`, `testsite.com`, `anotherdomain.com`

#### Using Wildcards to Match Subdomains
- Prefix the domain with a dot `(.)` to match all its subdomains.
- Alternatively, you can use an asterisk `(*)` for the same effect.
- ✅ Example:
- `".example.com"` or `"*.example.com"` will match `sub.example.com`, `api.example.com`, `blog.example.com`, etc.

:::tip Note
Enclose the argument in **quotes** to prevent shell expansion of the **asterisk (*)**.
:::

## Benefits of Wildcard Support in `--allowHosts`
- **Simplifies Configuration :** No need to manually list each subdomain.
- **Increased Flexibility :** Easily manage multiple subdomains with a single entry.
- **Better Performance :** Reduces manual domain management, improving efficiency.
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,7 @@ module.exports = {
"load-balancing-in-lambda-tunnel",
"dedicated-proxy",
"charles-proxy",
"tunnel-allowHost-wildcard-support"
],
],

Expand Down
Loading