untun exposes a local HTTP or HTTPS server to the public internet using Cloudflare Quick Tunnels, via npx CLI or a programmatic API.
Overview
untun connects a machine-local web server to a public URL by driving Cloudflare’s quick tunnel flow. You can run it globally with npx or import the package and call start to open a tunnel from application code.
Configuration covers the target URL or host, port, protocol, optional TLS verification for local HTTPS, acceptance of Cloudflare terms, and extra arguments forwarded to cloudflared. Defaults assume localhost on port 3000 with HTTP unless you override them.
The tool is used by other UnJS listening utilities and wraps cloudflared integration for tunnel setup. Using it implies accepting Cloudflare’s license, terms, and privacy policy for the tunnel software.
It fits development and demos where you need a temporary public endpoint to a process already listening on your machine without manual reverse-proxy setup.
Key features
- CLI via npx untun tunnel
- Programmatic tunnel start API
- Configurable local URL or port
- HTTP and HTTPS local targets
- Optional TLS certificate verify
- Extra cloudflared CLI args
- Cloudflare Quick Tunnels backend
Use cases
- Share local dev servers temporarily
- Webhook testing from the internet
- Integrate tunneling in Node apps
- Demo apps behind NAT