Ngrok: QR Code [Feature Request]

Created on 25 Jan 2018  路  2Comments  路  Source: inconshreveable/ngrok

It鈥檇 be amazing to have the CLI generate a QR code to scan and open the URL.

All 2 comments

Hi I know this isn't exactly what you asked for, but this is a temporary solution that might help you,

this will create and ngrok connection and open your browser to the QR code for the connection.

ngrok http 8080 > /dev/null &2>1; open $(curl -s http://localhost:4040/api/tunnels | jq ".tunnels[1].public_url" | xargs -I{} echo "https://chart.googleapis.com/chart?cht=qr&chl={}&chs=180x180&choe=UTF-8&chld=L|2")

and a slightly more portable version, in case jq isn't installed

ngrok http 8080 > /dev/null &2>1; open $(curl -s http://localhost:4040/api/tunnels | egrep -o 'https:\/\/.{8}.ngrok.io' | xargs -I{} echo "https://chart.googleapis.com/chart?cht=qr&chl={}&chs=180x180&choe=UTF-8&chld=L|2")

PR #472 looks like it implements this. It's currently failing CI, and un-merged.

Was this page helpful?
0 / 5 - 0 ratings