From f346bc66e77d04a0fd843a988c80932c4b91e379 Mon Sep 17 00:00:00 2001 From: Faiz Azhar Date: Tue, 10 Nov 2020 19:46:02 +0800 Subject: [PATCH] cloudflared, wrangler: add page (#4534) --- pages/common/cloudflared.md | 24 ++++++++++++++++++++++++ pages/common/wrangler.md | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pages/common/cloudflared.md create mode 100644 pages/common/wrangler.md diff --git a/pages/common/cloudflared.md b/pages/common/cloudflared.md new file mode 100644 index 0000000000..a5c5d1e7e3 --- /dev/null +++ b/pages/common/cloudflared.md @@ -0,0 +1,24 @@ +# cloudflared + +> Command line tool to create a persistent connection to the Cloudflare network. +> More information: . + +- Authenticate and associate the connection to a domain in the Cloudflare account: + +`cloudflared tunnel login` + +- Establish a tunnel to a host in Cloudflare from the local server: + +`cloudflared tunnel --hostname {{hostname}} localhost:{{port_number}}` + +- Establish a tunnel to a host in Cloudflare from the local server, without verifying the local server's certificate: + +`cloudflared tunnel --hostname {{hostname}} localhost:{{port_number}} --no-tls-verify` + +- Save logs to a file: + +`cloudflared tunnel --hostname {{hostname}} http://localhost:{{port_number}} --loglevel {{panic|fatal|error|warn|info|debug}} --logfile {{path/to/file}}` + +- Install cloudflared as a system service: + +`cloudflared service install` diff --git a/pages/common/wrangler.md b/pages/common/wrangler.md new file mode 100644 index 0000000000..11f1d88b41 --- /dev/null +++ b/pages/common/wrangler.md @@ -0,0 +1,24 @@ +# wrangler + +> Cloudflare Workers command line tool. +> More information: . + +- Initialize a project with a skeleton configuration: + +`wrangler init {{project_name}}` + +- Authenticate with Cloudflare: + +`wrangler login` + +- Start a local development server: + +`wrangler dev --host {{hostname}}` + +- Publish the worker script: + +`wrangler publish` + +- Aggregate logs from the production worker: + +`wrangler tail`