Cloudflared Tunnel | Archived, you can use untun
A simple tool automates running a Cloudflare-Tunnel for exposing your local host to the world! it could be used as a standalone CLI or imported into other libraries CLI's
- Cloudflare account
- A Domain that is managed by Cloudflare you can transfer your domain management to Cloudflare from your current registrar for free
yarn install -g cloudflared-tunnel
cf-tunnel -s
OR
cf-tunnel setup
cf-tunnel [-p <port>] [-h <host>] [-s]
Runs a cloudflared tunnel simply with a single command
cf-tunnel
-p, --port=port # port to expose
-h, --host=host # host to expose
-s, --setup # setup cloudflared tunnel
yarn add cloudflared-tunnel
import {setup, startTunnel} from 'cloudflared-tunnel'
await setup() // setup the project | you need to do this only once
await startTunnel({
host: 'http://localhost', // required
port: 3000, // required
}) // pass in the host and port of the server you want to tunnel