cloudflared
cloudflared copied to clipboard
Add More Succinct Way to "Copy/Paste" Login URL
Describe the feature you'd like
I'd like to "copy and paste" the URL from a terminal that doesn't have access to a web browser. Generally, it's too laborious to get the login URL into or out of the session where cloudflared login was initiated.
Describe alternatives you've considered
- Output QR Encoded Login URL. See #610.
- Pipe to
grepwhich extracts the login URL and passes it toqrencode. I'm more than happy to not "clutter" up the code with a randomish QR encoding library, but it already doesn't feel UNIX-ish to open the browser on behalf of the user before outputting the URL to the console. Moreover, this alternative causes other useful output like the "Waiting` for login..." poll to be missed. - (1) Introduce a "quiet" mode which only outputs the login URL then exits and (2) a separate "polling" mode for the "Waiting for login...".
The first part seems straightforward, but at first glance, the second part seems trickier since there's some transient state (
"cloudflared_pub.pem"?) that the poller needs.
Additional context In reference to #610.
cc: @sssilver
@sssilver any thoughts? This fell off my radar but I'm still interested in finding a more desirable solution. (Maybe 3?)