← 全部工具

cloudflared

热度 65 更新于 开发与构建

Cloudflared in Node. Which allows you to easily create HTTPS tunnels using Cloudflare's cloudflared. It provides a typed API for creating tunnels and managing the cloudflared binary installation.

npmauto-collected

安装

npm
npm install -g cloudflared

通过 npm 安装。

cloudflared

A Node.js package that allows you to easily create HTTPS tunnels using Cloudflare's cloudflared command-line tool. It provides a typed API for creating tunnels and managing the cloudflared binary installation.

This tool will automatically install the latest version of cloudflared (or CLOUDFLAREDVERSION env var if exists) at the first time. Then, it just passes down the command to cloudflared.

Installation

You can install this package using your favorite package manager:

PNPM

pnpm i -g cloudflared

NPM

npm i -g cloudflared

Yarn

yarn global add cloudflared

If CLOUDFLAREDVERSION env var is set, it will install the specified version of cloudflared, otherwise it will install the latest version.

CLI Usage

You can use the cloudflared command-line tool to create HTTPS tunnels. You can find the usage of cloudflared here.

In addition to the standard cloudflared commands, this package also provides an extra subcommand: cloudflared bin. You can use it to manage the cloudflared binary version.

❯ cloudflared bin --help
cloudflared bin                    : Prints the path to the binary
cloudflared bin remove             : Removes the binary
cloudflared bin install [version]  : Installs the binary
cloudflared bin list               : Lists 30 latest releases
cloudflared bin help               : Prints this help message
Examples:
cloudflared bin install            : Installs the latest version of cloudflared
cloudflared bin install 2023.4.1   : Installs cloudflared 2023.4.1
You can find releases at https://github.com/cloudflare/cloudflared/releases

Library Usage

You can also use it as a library in your TypeScript / JavaScript projects.