I used CF tunnels just the other day for the first time and they are pretty freaking cool. I think some of the docs could be improved (as I was throughly confused by "Applications" and how they related to tunnels, turns out I did not want applications but they are cool for self-hosted things. I have my own SSO setup for my self-hosted but I might consider moving to CF Applications in the future).
I used to create my own ngrok-type service (for just myself). I think with a little more wrapping code I could have an almost feature-parity with ngrok using CF tunnels but I'm happy with where I have it now. I have 2 tunnels (1 for server, 1 for client) that expose my local dev environment on a hostname I own (and use CF for the DNS). In the package.json for the client and server I have a npm run command to spin up the tunnel so I just cd to the project directory and run `npm run cf-tunnel` and then I'm good to go.
Why did I do this? 2 things, Apple Pay/Google Pay and HTTPS-gated things in general. Some things can work on localhost but a lot of things get fussy any want HTTPS even for development. Apple Pay needs you to validate a domain on HTTPS which means you either have to deploy and pray it works (yes, I have dev environments that are HTTPS but I hate adding so much turnaround time from "writing code"->"testing feature") or find a way to get your local dev served over a consistent hostname+HTTPS. You can do this with ngrok (paid, reserved subdomain) but I so rarely need this that I didn't love the idea of paying ~$60/yr for something I would use a handful of times at best.
I could have just wired up another Caddy entry on my local server but I prefer being able to turn off the tunnels easily (just kill the running `npm run cf-tunnel`) so I'm only exposing my local dev when I want to.
I used to create my own ngrok-type service (for just myself). I think with a little more wrapping code I could have an almost feature-parity with ngrok using CF tunnels but I'm happy with where I have it now. I have 2 tunnels (1 for server, 1 for client) that expose my local dev environment on a hostname I own (and use CF for the DNS). In the package.json for the client and server I have a npm run command to spin up the tunnel so I just cd to the project directory and run `npm run cf-tunnel` and then I'm good to go.
Why did I do this? 2 things, Apple Pay/Google Pay and HTTPS-gated things in general. Some things can work on localhost but a lot of things get fussy any want HTTPS even for development. Apple Pay needs you to validate a domain on HTTPS which means you either have to deploy and pray it works (yes, I have dev environments that are HTTPS but I hate adding so much turnaround time from "writing code"->"testing feature") or find a way to get your local dev served over a consistent hostname+HTTPS. You can do this with ngrok (paid, reserved subdomain) but I so rarely need this that I didn't love the idea of paying ~$60/yr for something I would use a handful of times at best.
I could have just wired up another Caddy entry on my local server but I prefer being able to turn off the tunnels easily (just kill the running `npm run cf-tunnel`) so I'm only exposing my local dev when I want to.