Skip to content

Commit 4dff390

Browse files
authored
Merge pull request LambdaTest#1328 from amanchopra1905/stage
tunnel modifier - allowHost flag
2 parents f2121bd + 15db695 commit 4dff390

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

docs/lambda-tunnel-modifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This document will help you understand all the modifiers/arguments used with Lam
5050

5151
| FLAG (SHORT) | FLAG (LONG) | DESCRIPTION | TYPE |
5252
| :----------- | :-------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
53-
| | --allowHosts | Comma separated list of hosts to route via tunnel. Everything else will be routed via Internet. | String |
53+
| | --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 |
5454
| | --bypassHosts | Comma separated list of hosts to bypass from tunnel. These will be routed via internet. | String |
5555
| | --callbackURL | Callback URL for tunnel status. | String |
5656
| -c | --config | Path of the config file to use | String |
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
id: tunnel-allowHost-wildcard-support
3+
title: Support for Wildcard in --allowHosts Flag
4+
hide_title: false
5+
sidebar_label: Wildcard Support
6+
description: Now you can use wildcard values for the -allow-Host flag for setting up the tunnel at lambdatest.
7+
keywords:
8+
- local app testing
9+
- lambdatest local testing
10+
- lambdatest local tunnel
11+
- LambdaTest tunnel
12+
- local app testing for linux
13+
- ssh connection
14+
- shared ssh
15+
- secure-shell-tunnel
16+
- docker compose ssh tunnel
17+
- docker vpn tunnel
18+
image: /assets/images/og-images/docker-tunnel.png
19+
url: https://www.lambdatest.com/support/docs/tunnel-allowHost-wildcard-support/
20+
site_name: LambdaTest
21+
slug: tunnel-allowHost-wildcard-support/
22+
---
23+
24+
<script type="application/ld+json"
25+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
26+
"@context": "https://schema.org",
27+
"@type": "BreadcrumbList",
28+
"itemListElement": [{
29+
"@type": "ListItem",
30+
"position": 1,
31+
"name": "LambdaTest",
32+
"item": "https://www.lambdatest.com"
33+
},{
34+
"@type": "ListItem",
35+
"position": 2,
36+
"name": "Support",
37+
"item": "https://www.lambdatest.com/support/docs/"
38+
},{
39+
"@type": "ListItem",
40+
"position": 3,
41+
"name": "Docker Tunnel",
42+
"item": "https://www.lambdatest.com/support/docs/tunnel-allowHost-wildcard-support/"
43+
}]
44+
})
45+
}}
46+
></script>
47+
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.
48+
49+
## Usage of `--allowHosts` with Wildcards
50+
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.
51+
52+
### Formatting Domains with Wildcards
53+
Follow these guidelines when using wildcards in domain names:
54+
55+
#### Use only the domain name
56+
- Do not include `http://` or `https://`.
57+
- ✅ Example: `example.com`.       
58+
59+
#### Comma-separated list without spaces
60+
- Ensure that the list of domains is comma-separated with no spaces.
61+
- ✅ Example: `example.com`, `testsite.com`, `anotherdomain.com`
62+
63+
#### Using Wildcards to Match Subdomains
64+
- Prefix the domain with a dot `(.)` to match all its subdomains.
65+
- Alternatively, you can use an asterisk `(*)` for the same effect.
66+
- ✅ Example:
67+
- `".example.com"` or `"*.example.com"` will match `sub.example.com`, `api.example.com`, `blog.example.com`, etc.
68+
69+
:::tip Note
70+
Enclose the argument in **quotes** to prevent shell expansion of the **asterisk (*)**.
71+
:::
72+
73+
## Benefits of Wildcard Support in `--allowHosts`
74+
- **Simplifies Configuration :** No need to manually list each subdomain.
75+
- **Increased Flexibility :** Easily manage multiple subdomains with a single entry.
76+
- **Better Performance :** Reduces manual domain management, improving efficiency.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,7 @@ module.exports = {
32303230
"load-balancing-in-lambda-tunnel",
32313231
"dedicated-proxy",
32323232
"charles-proxy",
3233+
"tunnel-allowHost-wildcard-support"
32333234
],
32343235
],
32353236

0 commit comments

Comments
 (0)