Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
U

untun

> 编程语言
Open source

Tunnel your local HTTP(s) server to the world! powered by Cloudflare Quick Tunnels.

1.4K stars0 likes0 views
WebsiteGitHub

About

Tunnel your local HTTP(s) server to the world! powered by Cloudflare Quick Tunnels.

untun

npm version npm downloads bundle

License

Tunnel your local HTTP(s) server to the world!

Powered by Cloudflare Quick Tunnels and used by unjs/listhen.

Usage (CLI)

Globally run tunnel with npx:

bash
npx untun@latest tunnel http://localhost:3000
◐ Starting cloudflared tunnel to http://localhost:3000
ℹ Waiting for tunnel URL...
✔ Tunnel ready at https://unjs-is-awesome.trycloudflare.com

Use npx untun tunnel --help for more usage info.

Usage (API)

Install package:

bash
# npm
npm install untun

# yarn
yarn add untun

# pnpm
pnpm install untun

Import:

typescript
// ESM
import { startTunnel } from "untun";

// CommonJS
const { startTunnel } = require("untun");

Start tunnel:

typescript
const tunnel = await startTunnel({ port: 3000 });

Options

url

  • Default: {protocol}://{hostname}:{port}

The local server URL to tunnel.

port

  • Default: 3000

The local server PORT (only effective if url is not provided).

hostname

  • Default: localhost

The local server hostname (only effective if url is not provided).

protocol

  • Default: http

The local server protocol (only effective if url is not provided).

verifyTLS

  • Default: false

Verify local server TLS certificate.

acceptCloudflareNotice

  • Default: false
  • Environment variable: UNTUN_ACCEPT_CLOUDFLARE_NOTICE

Accept cloudflare TOS by default.

extraArgs

  • Default: []

Extra CLI arguments to provide to cloudflared.

Example:

typescript
const tunnel = await startTunnel({
  port: 3000,
  extraArgs: ["--no-autoupdate"]
});

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with

Published under MIT License.

cloudflared integration based on a fork of JacobLinCool/node-cloudflared

Your installation of cloudflared software constitutes a symbol of your signature indicating that you accept the terms of the Cloudflare License, Terms and Privacy Policy.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言