This is a simple script that will generate a config for cloudflared
(with the spec you provide) and run it.
Generate a single tunnel that redirects mydomain.work
to localhost:8080
:
cftunnel :8080
This command will generate two tunnels:
- mydomain.work -> localhost:8080
- api.mydomain.work -> localhost:3000
cftunnel :8080 api:3000
- NuShell
cloudflared
The script assumes that you created the basic set up of the Cloudflare Tunnel and created self-hosted tunnel named "mytunnel".