Skip to content

Commit 85b4e56

Browse files
authored
Merge pull request #1706 from Ishavyas9/DocStage
New Docs tunnel, socks proxy custom Header
2 parents c72ef88 + a1a27f2 commit 85b4e56

File tree

5 files changed

+297
-23
lines changed

5 files changed

+297
-23
lines changed

docs/custom-headers.md

Lines changed: 145 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ site_name: LambdaTest
1313
slug: custom-headers/
1414
---
1515

16-
# Bypassing Firewalls with CustomHeaders
16+
# Overcoming Firewalls: A Deep Dive into LambdaTest's customHeaders and customUrlFilters Capabilities
1717
---
1818

19-
With thе dеvеlopmеnt еnvironmеnt bеcoming incrеasingly complеx, thе tools wе usе for tеsting must also еvolvе to kееp pacе. Howеvеr, thеrе arе timеs whеn obstaclеs arisе that makе tеsting morе challеnging. Among thеsе obstaclеs is thе corporatе firеwall. Although thеsе firеwalls arе dеsignеd to kееp nеtworks sеcurе, thеy may occasionally intеrfеrе with thе tеsting procеss.
19+
Every modern software company knows the importance of robust testing. As the development environment becomes increasingly complex, the tools we use for testing have to evolve to keep up. But sometimes, obstacles arise that make testing more difficult—one such obstacle being corporate firewalls. Designed to keep networks secure, these firewalls can occasionally interfere with your testing process.
20+
21+
However, the software testing industry is nothing if not innovative. One solution that's gaining traction is the use of custom headers to bypass firewalls. Specifically, we'll explore how LambdaTest's customHeaders and customUrlFilters capabilities give developers precise control over network requests and firewall bypassing during testing.
2022

2123
In this documеntation, wе will look at LambdaTеst CustomHеadеrs, a capability that allows you to add custom hеadеrs to your tеsts and bypass firеwall rеstrictions whilе pеrforming automatеd browser tеsting.
2224

@@ -131,6 +133,147 @@ X-Session-ID: 1234567890 //custom header X-Session-ID to track user sessions.
131133
X-Session-ID: 1234567890 //custom header X-Session-ID to track user sessions.
132134
```
133135

136+
## LambdaTest: Testing Redefined
137+
138+
LambdaTest is a cloud-based cross-browser testing platform that allows you to perform both automated and live interactive testing on your web applications. The platform supports over 2,000 browser and operating system environments, making it a go-to tool for developers seeking comprehensive coverage.
139+
140+
## CustomHeader Capability: Your Key to Bypass Firewalls
141+
142+
Among LambdaTest's many features, the customHeaders capability stands out for teams dealing with firewall constraints. This capability allows you to inject custom headers into your HTTP requests, which can be used to bypass firewalls or simulate specific client behavior.
143+
144+
Custom headers are an integral part of HTTP requests and responses. They can carry essential information such as authentication tokens, user agents, API versioning, and more. By modifying these headers in your tests, you can adjust the network behavior of the browser and ensure compatibility with restricted environments.
145+
146+
## Targeted Control with customUrlFilters
147+
148+
To provide even more precise control, LambdaTest introduces the customUrlFilters capability. When used in conjunction with customHeaders, it allows you to specify exactly which URLs should receive the custom headers. This ensures that headers are not indiscriminately applied to every request—only those matching your defined filters will carry the custom headers.
149+
150+
### Key Behavior:
151+
152+
- If customHeaders are defined without customUrlFilters, the headers apply globally to all outgoing network requests.
153+
- If customUrlFilters are provided, the customHeaders only apply to requests matching the filter criteria.
154+
- Filters can be exact URLs or regular expressions, providing flexible targeting.
155+
156+
### Implementation Example
157+
158+
```java
159+
DesiredCapabilities capabilities = new DesiredCapabilities();
160+
161+
Map<String, String> headers = new HashMap<>();
162+
headers.put("WebView", "Enable");
163+
headers.put("X-Custom-Token", "secure-token-123");
164+
165+
List<String> urlFilters = Arrays.asList(
166+
"https://www.xhaus.com/headers",
167+
"https://.*\\.example\\.com/.*"
168+
);
169+
170+
capabilities.setCapability("customHeaders", headers);
171+
capabilities.setCapability("customUrlFilters", urlFilters);
172+
```
173+
174+
### Behavior of this Example:
175+
176+
The headers `WebView: Enable` and `X-Custom-Token: secure-token-123` will only be applied to:
177+
178+
- `https://www.xhaus.com/headers`
179+
- Any subpaths of domains like `https://api.example.com/`, etc.
180+
181+
A request to `https://lambdatest.github.io/sample-todo-app/` will not contain any of the custom headers since it is not listed in customUrlFilters.
182+
183+
## A Responsible Approach to Bypassing Firewalls
184+
185+
While the ability to add and control custom headers is powerful, it's crucial to use it responsibly. Always follow your organization's security and compliance policies. These capabilities are designed to facilitate secure, realistic testing—not to bypass security controls inappropriately.
186+
187+
## Use Cases
188+
189+
🔐 **User Identification and Session Management**
190+
191+
Send tokens or session IDs with headers like:
192+
193+
```java
194+
X-Session-ID: 1234567890
195+
```
196+
197+
📦 **Content Negotiation**
198+
199+
Specify expected response formats:
200+
201+
```java
202+
Accept: application/json
203+
```
204+
205+
📉 **Rate Limiting**
206+
207+
Get limits and usage from APIs:
208+
209+
```java
210+
X-RateLimit-Remaining: 10
211+
```
212+
213+
🐞 **Debugging and Performance Tracking**
214+
215+
Include trace info or timing metrics:
216+
217+
```java
218+
X-Execution-Time: 150ms
219+
```
220+
221+
🌍 **CORS (Cross-Origin Resource Sharing)**
222+
223+
Enable cross-origin requests:
224+
225+
```java
226+
Access-Control-Allow-Origin: *
227+
```
228+
229+
⚙️ **Custom Application Logic**
230+
231+
Pass app-level config:
232+
233+
```java
234+
X-App-Version: v2.3.1
235+
```
236+
237+
🔐 **Bypassing Firewalls/Proxies**
238+
239+
Mask the request with common headers:
240+
241+
```java
242+
User-Agent: Mozilla/5.0 (Windows NT 10.0...)
243+
```
244+
245+
🩺 **Server Health**
246+
247+
Return backend state:
248+
249+
```java
250+
X-Server-Status: All systems operational
251+
```
252+
253+
📈 **SEO Optimization**
254+
255+
Guide search engines:
256+
257+
```java
258+
Link: <https://example.com/page>; rel="canonical"
259+
```
260+
261+
🔬 **A/B Testing**
262+
263+
Track experimental groups:
264+
265+
```java
266+
X-Experiment-ID: variant_b
267+
```
268+
269+
## Conclusion
270+
271+
LambdaTest’s customHeaders and customUrlFilters capabilities empower you to simulate complex request scenarios, bypass firewalls responsibly, and selectively apply network rules—providing a flexible, developer-centric approach to browser testing.
272+
273+
By turning obstacles like firewalls into controllable conditions, LambdaTest not only simplifies testing but enhances the realism and effectiveness of your QA process.
274+
275+
Happy testing!
276+
134277
<nav aria-label="breadcrumbs">
135278
<ul className="breadcrumbs">
136279
<li className="breadcrumbs__item">

docs/http2-support.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
id: http2-support
3+
title: HTTP/2 Support in LambdaTest Tunnel
4+
hide_title: false
5+
sidebar_label: HTTP/2 Support
6+
description: Learn how LambdaTest Tunnel supports HTTP/2 for modern, high-performance web application testing.
7+
keywords:
8+
- http2
9+
- lambdatest tunnel
10+
- performance testing
11+
- web protocol
12+
- automatic proxy
13+
image: /assets/images/og-images/Sharing-Lambda-Tunnel.jpg
14+
url: https://www.lambdatest.com/support/docs/http2-support/
15+
site_name: LambdaTest
16+
slug: http2-support/
17+
---
18+
19+
# HTTP/2 Support in LambdaTest Tunnel
20+
21+
## Overview
22+
23+
LambdaTest Tunnel provides out-of-the-box support for HTTP/2, enabling users to test their web applications using the latest web protocol without any additional configuration. HTTP/2 support is essential for performance testing, as it includes improvements such as multiplexing, server push, and header compression. This document provides an overview of HTTP/2 support within LambdaTest Tunnel and its benefits.
24+
25+
## Key Features
26+
27+
- **Automatic HTTP/2 Proxying:** LambdaTest Tunnel automatically proxies both HTTP/1 and HTTP/2 traffic, simplifying the testing process for applications that use the latest web protocols.
28+
- **Improved Performance Testing:** With HTTP/2 support, users can test their applications' performance characteristics, such as load times and response behavior, under conditions that mirror modern browser-server communication.
29+
- **Seamless Integration:** No additional flags or configurations are required to enable HTTP/2 support, ensuring a smooth integration into existing testing workflows.
30+
31+
## Usage
32+
33+
Using HTTP/2 with LambdaTest Tunnel does not require any special configuration or flags. The tunnel automatically detects and proxies HTTP/2 traffic alongside HTTP/1, ensuring that your tests accurately reflect the behavior of web applications under real-world conditions.
34+
35+
To start using LambdaTest Tunnel with HTTP/2 support, simply initiate the tunnel as you normally would:
36+
37+
```sh
38+
./LambdaTestTunnel --user YourLambdaTestUsername --key YourLambdaTestAccessKey
39+
```
40+
41+
With the tunnel running, any HTTP/2 traffic between your local development environment and the LambdaTest cloud platform will be automatically proxied, allowing you to conduct thorough performance and functionality testing on your web applications.
42+
43+
## Conclusion
44+
45+
The inherent support for HTTP/2 in LambdaTest Tunnel is a testament to LambdaTest's commitment to providing developers and QA professionals with cutting-edge tools for web application testing. By automating the proxying of HTTP/2 traffic, LambdaTest Tunnel ensures that users can effortlessly test their applications in environments that utilize the latest web protocols, leading to faster, more reliable web applications.
46+
47+
<nav aria-label="breadcrumbs">
48+
<ul className="breadcrumbs">
49+
<li className="breadcrumbs__item">
50+
<a className="breadcrumbs__link" href="https://www.lambdatest.com">
51+
Home
52+
</a>
53+
</li>
54+
<li className="breadcrumbs__item">
55+
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/">
56+
Support
57+
</a>
58+
</li>
59+
<li className="breadcrumbs__item breadcrumbs__item--active">
60+
<span className="breadcrumbs__link">
61+
HTTP/2 Protocol
62+
</span>
63+
</li>
64+
</ul>
65+
</nav>

docs/selenium-geolocation-capabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: selenium-geolocation-capabilities
33
title: Selenium Testing from different Geolocations
44
hide_title: false
5-
sidebar_label: Geolocation
5+
sidebar_label: IP Geolocation
66
description: Selenium Geolocation capabilities documentation provides you the insights about the countries and region with their timezone LambdaTest supports so that you can test your application in that particular timezone.
77
keywords:
88
- lambdatest automation

docs/socks-proxy.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
id: socks5-proxy-support
3+
title: SOCKS5 Proxy Support in LambdaTest Tunnel
4+
hide_title: false
5+
sidebar_label: SOCKS5 Proxy Support
6+
description: Learn how to use LambdaTest Tunnel with SOCKS5 proxy for secure, private, and flexible local testing.
7+
keywords:
8+
- socks5 proxy
9+
- lambdatest tunnel
10+
- secure proxy testing
11+
- local app testing
12+
- bypass network restrictions
13+
image: /assets/images/og-images/Sharing-Lambda-Tunnel.jpg
14+
url: https://www.lambdatest.com/support/docs/socks5-proxy-support/
15+
site_name: LambdaTest
16+
slug: socks5-proxy-support/
17+
---
18+
19+
# SOCKS5 Proxy Support in LambdaTest Tunnel
20+
21+
## Overview
22+
23+
LambdaTest Tunnel offers comprehensive support for SOCKS5 proxy, enabling secure and private connections between your local development environment and the LambdaTest cloud platform. This support is crucial for users operating within networks that require advanced proxy configurations for security and privacy. This document outlines the key features, benefits, and usage of the SOCKS5 proxy support in LambdaTest Tunnel.
24+
25+
## Key Features
26+
27+
- **Enhanced Security:** By using a SOCKS5 proxy, LambdaTest Tunnel facilitates more secure data transmission by routing traffic through a proxy server, providing an additional layer of security.
28+
- **Easy Configuration:** The LambdaTest Tunnel can be easily configured to use a SOCKS5 proxy with minimal setup, allowing for straightforward integration into your testing workflow.
29+
- **Bypass Network Restrictions:** The SOCKS5 proxy support helps navigate corporate firewalls and network restrictions, enabling testing of local and internal web applications seamlessly.
30+
31+
## Usage
32+
33+
To use LambdaTest Tunnel with a SOCKS5 proxy, follow the steps outlined below:
34+
35+
1. **Start LambdaTest Tunnel:** Open your command-line interface (CLI) and navigate to the directory where the LambdaTest Tunnel is installed.
36+
2. **Activate SOCKS5 Proxy:** Use the `--proxy-type` flag with the value `socks5` to specify the SOCKS5 proxy type for tunneling. Here is an example command:
37+
38+
```sh
39+
./LambdaTestTunnel --user YourLambdaTestUsername --key YourLambdaTestAccessKey --proxy-type socks5
40+
```
41+
Replace `YourLambdaTestUsername` and `YourLambdaTestAccessKey` with your actual LambdaTest credentials.
42+
43+
3. **Run Your Tests:** With the tunnel running and configured to use a SOCKS5 proxy, you can now execute your tests against local or internal web applications as if they were accessible on the public internet.
44+
45+
## Conclusion
46+
47+
The SOCKS5 proxy support in LambdaTest Tunnel is an essential feature for users who require secure, encrypted traffic transmission and the ability to bypass network restrictions during the testing process. By leveraging this feature, developers and QA professionals can ensure that their web applications are thoroughly tested in environments that closely mimic real-world scenarios.
48+
49+
<nav aria-label="breadcrumbs">
50+
<ul className="breadcrumbs">
51+
<li className="breadcrumbs__item">
52+
<a className="breadcrumbs__link" href="https://www.lambdatest.com">
53+
Home
54+
</a>
55+
</li>
56+
<li className="breadcrumbs__item">
57+
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/">
58+
Support
59+
</a>
60+
</li>
61+
<li className="breadcrumbs__item breadcrumbs__item--active">
62+
<span className="breadcrumbs__link">
63+
Socks5 Proxy Tunnel
64+
</span>
65+
</li>
66+
</ul>
67+
</nav>

sidebars.js

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,16 +2186,20 @@ module.exports = {
21862186
"selenium-set-browser-options",
21872187
],
21882188
},
2189-
{
2189+
{
21902190
type: "category",
21912191
collapsed: true,
2192-
label: "Network",
2193-
items: ["network-throttling", "custom-dns-map"],
2192+
label: "Organize Tests",
2193+
items: [
2194+
"command-annotations",
2195+
"build-split",
2196+
"selenium-add-test-meta-data",
2197+
],
21942198
},
21952199
{
21962200
type: "category",
21972201
collapsed: true,
2198-
label: "Performance",
2202+
label: "Web Performance",
21992203
items: [
22002204
"view-lighthouse-performance-metrics",
22012205
"lighthouse-reports-hooks",
@@ -2210,26 +2214,19 @@ module.exports = {
22102214
{
22112215
type: "category",
22122216
collapsed: true,
2213-
label: "Test Execution",
2214-
items: ["smart-wait"],
2215-
},
2216-
{
2217-
type: "category",
2218-
collapsed: true,
2219-
label: "Security",
2220-
items: ["custom-header"],
2221-
},
2222-
{
2223-
type: "category",
2224-
collapsed: true,
2225-
label: "Other Capabilities",
2217+
label: "Advance Use Cases",
22262218
items: [
22272219
"auto-heal",
2228-
"command-annotations",
2229-
"har-log-viewer",
22302220
"selenium-geolocation-capabilities",
22312221
"selenium-mask-your-data",
2232-
"selenium-add-test-meta-data",
2222+
"custom-header",
2223+
"smart-wait",
2224+
"network-throttling",
2225+
"custom-dns-map",
2226+
"upload-files-using-lambdatest",
2227+
"setup-pre-run-executable",
2228+
"har-log-viewer",
2229+
"daily-usage-limit",
22332230
],
22342231
},
22352232
],
@@ -3506,6 +3503,8 @@ module.exports = {
35063503
"load-balancing-in-lambda-tunnel",
35073504
"charles-proxy",
35083505
"dedicated-proxy",
3506+
"socks5-proxy-support",
3507+
"http2-support", // Added HTTP/2 support doc
35093508
],
35103509
},
35113510
{

0 commit comments

Comments
 (0)