
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
@hongminhee/localtunnel
Advanced tools
This package is a simple wrapper around the local tunneling services. Currently it supports localhost.run, serveo.net, and Pinggy. The module is designed to be simple to use and to provide a consistent interface to those services.
It is available on JSR and npm:
deno add --jsr @hongminhee/localtunnel # Deno
npm add @hongminhee/localtunnel # npm
pnpm add @hongminhee/localtunnel # pnpm
yarn add @hongminhee/localtunnel # Yarn
bun add @hongminhee/localtunnel # Bun
Invoke the openTunnel() function to open a tunnel to a local port.
The function returns a promise that resolves to a Tunnel object.
The Tunnel object has a url property that contains the URL of the tunnel.
The Tunnel object also has a close() method that closes the tunnel:
const tunnel = await openTunnel({ port: 8000 });
console.log(tunnel.url.href);
alert("Press Enter to close the tunnel.");
await tunnel.close();
For more information, see the API documentation.
Released on August 31, 2025.
Service, Tunnel, and TunnelOptions is now readonly.extraOptions and extraArgs fields to the Service interface."pinggy.io" to the ServiceName type. [#1]Released on April 29, 2024.
exclude option to TunnelOptions interface.openTunnel() automatically retries with another service if the first
service fails.Released on April 28, 2024.
openTunnel() that breaks standard input on Windows.openTunnel().["localtunnel"].Initial release. Released on April 26, 2024.
FAQs
A simple wrapper around the local tunneling services
We found that @hongminhee/localtunnel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.