
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@lambdatest/node-tunnel
Advanced tools
npm i @lambdatest/node-tunnel
var lambdaTunnel = require('@lambdatest/node-tunnel');
//Creates an instance of Tunnel
var tunnelInstance = new lambdaTunnel();
// Replace <lambdatest-user> with your user and <lambdatest-accesskey> with your key.
var tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>'
};
// Callback Style
// Atarts the Tunnel instance with the required arguments
tunnelInstance.start(tunnelArguments, function(error, status) {
if (!error) {
console.log('Tunnel is Running Successfully');
}
});
// Promise Style
tunnelInstance
.start(tunnelArguments)
.then(status => {
console.log('Tunnel is Running Successfully');
})
.catch(error => {
console.log(error);
});
// Async/Await Style
(async function() {
try {
const istunnelStarted = await tunnelInstance.start(tunnelArguments);
console.log('Tunnel is Running Successfully');
} catch (error) {
console.log(error);
}
})();
Start tunnel Instance.
tunnelArguments
: credentials for secure tunnel connection.
user
: The username for the LambdaTest account.key
: The accessKey for the LambdaTest account.callback
(function(error, status)
): A callback to invoke when the API call is
complete.// Callback Style
tunnelInstance.start(tunnelArguments, function(error, status) {
if (!error) {
console.log('Tunnel is Running Successfully');
}
});
// Promise Style
tunnelInstance
.start(tunnelArguments)
.then(status => {
console.log('Tunnel is Running Successfully');
})
.catch(error => {
console.log(error);
});
// Async/Await Style
(async function() {
try {
const istunnelStarted = await tunnelInstance.start(tunnelArguments);
console.log('Tunnel is Running Successfully');
} catch (error) {
console.log(error);
}
})();
Get Status of tunnel Instance.
// Callback Style
tunnelInstance.start(tunnelArguments, function(error, status) {
if (!error) {
console.log('Tunnel is Running Successfully');
var tunnelRunningStatus = tunnelInstance.isRunning();
console.log('Tunnel is Running ? ' + tunnelRunningStatus);
}
});
// Promise Style
tunnelInstance
.start(tunnelArguments)
.then(status => {
console.log('Tunnel is Running Successfully');
const tunnelRunningStatus = tunnelInstance.isRunning();
console.log('Tunnel is Running ? ' + tunnelRunningStatus);
})
.catch(error => {
console.log(error);
});
// Async/Await Style
(async function() {
try {
const istunnelStarted = await tunnelInstance.start(tunnelArguments);
console.log('Tunnel is Running Successfully');
const tunnelRunningStatus = tunnelInstance.isRunning();
console.log('Tunnel is Running ? ' + tunnelRunningStatus);
} catch (error) {
console.log(error);
}
})();
Get name of the Running tunnel Instance.
callback
(function(tunnelName)
): A callback to invoke when the API call is
complete.// Callback Style
tunnelInstance.start(tunnelArguments, function(error, status) {
if (!error) {
console.log('Tunnel is Running Successfully');
tunnelInstance.getTunnelName(function(tunnelName) {
console.log('Tunnel Name : ' + tunnelName);
});
}
});
// Promise Style
tunnelInstance
.start(tunnelArguments)
.then(status => {
console.log('Tunnel is Running Successfully');
tunnelInstance.getTunnelName().then(tunnelName => {
console.log('Tunnel Name : ' + tunnelName);
});
})
.catch(error => {
console.log(error);
});
// Async/Await Style
(async function() {
try {
const istunnelStarted = await tunnelInstance.start(tunnelArguments);
console.log('Tunnel is Running Successfully');
const tunnelName = await tunnelInstance.getTunnelName();
console.log('Tunnel Name : ' + tunnelName);
} catch (error) {
console.log(error);
}
})();
Stop the Running tunnel Instance.
callback
(function(error, status)
): A callback to invoke when the API call is
complete.// Callback Style
tunnelInstance.start(tunnelArguments, function(error, status) {
if (!error) {
console.log('Tunnel is Running Successfully');
tunnelInstance.stop(function(error, status) {
console.log('Tunnel is Stopped ? ' + status);
});
}
});
// Promise Style
tunnelInstance
.start(tunnelArguments)
.then(status => {
console.log('Tunnel is Running Successfully');
tunnelInstance.stop().then(status => {
console.log('Tunnel is Stopped ? ' + status);
});
})
.catch(error => {
console.log(error);
});
// Async/Await Style
(async function() {
try {
const istunnelStarted = await tunnelInstance.start(tunnelArguments);
console.log('Tunnel is Running Successfully');
const status = await tunnelInstance.stop();
console.log('Tunnel is Stopped ? ' + status);
} catch (error) {
console.log(error);
}
})();
Every modifier except user and key is optional. Visit LambdaTest tunnel modifiers for an entire list of modifiers. Below are demonstration of some modifiers for your reference.
Below credentials will be used to perform basic authentication of your LambdaTest account.
If you wish to connect tunnel on a specific port.
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
port: '<port>'
};
If you wish to perform tunnel testing using a proxy.
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
proxyHost: '127.0.0.1',
proxyPort: '8000',
proxyUser: 'user',
proxyPass: 'password'
};
Human readable tunnel identifier
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
tunnelName: '<your-tunnel-name>'
};
Populate the path of the local folder you want to test in your internal server as a value in the below modifier.
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
dir: '<path of the local folder you want to test>'
};
To log every request to stdout.
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
v: true
};
Logfile You can provide a specific path to this file. If you won't provide a path then the logs would be saved in your present working directory by the filename: tunnel.log. For providing a specific path use the below argument:
tunnelArguments = {
user: process.env.LT_USERNAME || '<lambdatest-user>',
key: process.env.LT_ACCESS_KEY || '<lambdatest-accesskey>',
logFile: '/lambdatest/logs.txt'
};
Our GitHub Issue Tracker will help you log bug reports.
Tips for submitting an issue: Keep in mind, you don't end up submitting two issues with the same information. Make sure you add a unique input in every issue that you submit. You could also provide a "+1" value in the comments.
Always provide the steps to reproduce before you submit a bug. Provide the environment details where you received the issue i.e. Browser Name, Browser Version, Operating System, Screen Resolution and more. Describe the situation that led to your encounter with bug. Describe the expected output, and the actual output precisely.
We don't want to pull breaks in case you want to customize your LambdaTest experience. Before you proceed with implementing pull requests, keep in mind the following. Make sure you stick to coding conventions. Once you include tests, ensure that they all pass. Make sure to clean up your Git history, prior your submission of a pull-request. You can do so by using the interactive rebase command for committing and squashing, simultaneously with minor changes + fixes into the corresponding commits.
LambdaTest is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your selenium automation testing to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
FAQs
Nodejs bindings for LambdaTest Tunnel
The npm package @lambdatest/node-tunnel receives a total of 123,628 weekly downloads. As such, @lambdatest/node-tunnel popularity was classified as popular.
We found that @lambdatest/node-tunnel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.