ngrok icon indicating copy to clipboard operation
ngrok copied to clipboard

Generates QR code in terminal for public link

Open theevilhead opened this issue 7 years ago • 8 comments

Generates a QR code inside terminal for public links so that it will be easier to view on mobile & share

theevilhead avatar Jan 21 '18 01:01 theevilhead

I was looking for this feature, would be a great addition, especially for free users when you have to type in the random URL into a mobile device.

Floriferous avatar Apr 17 '18 10:04 Floriferous

This will be a very useful feature. Instead of typing the long url on mobile, just take a snap with the camera and boom.

mislam avatar Jul 14 '18 21:07 mislam

Very useful, was going to implement it, thank you

rsmelo92 avatar Dec 17 '18 16:12 rsmelo92

This is very helpful, but @inconshreveable won't be updating this anymore with new features like this. Maybe just fork it and put it there? @theevilhead

newtykip avatar Jan 14 '19 07:01 newtykip

This will be a very useful feature. Instead of typing the long url on mobile, just take a snap with the camera and boom.

theevilhead avatar Jan 16 '19 05:01 theevilhead

@noneissome Yep you can find it here https://github.com/theevilhead/ngrok

theevilhead avatar Jan 16 '19 05:01 theevilhead

@noneissome Yep you can find it here https://github.com/theevilhead/ngrok

Shall check it out, thanks 😃

newtykip avatar Jan 16 '19 18:01 newtykip

I was looking for similar functionality. I'm assuming the ngrok code has moved to a private repository?

Anyways, I found this b/c I was going to submit a PR for the "web interface" to show qr codes on the "status page". I couldn't find the source code for the current web interface, but I did find this pr. I decided to create a bookmarklet instead of submitting a PR (since I couldn't find the source).

For anyone interested, here is the bookmarklet:

javascript:(() => {const s = document.createElement('script');s.src = 'https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js';s.onload = () => {[...document.querySelectorAll('th')].filter(el => el.innerHTML === 'URL').forEach(el => {const td = el.parentElement.children[1];const url = td.innerHTML;const div = document.createElement('div');el.appendChild(div);new QRCode(div, url);});};document.body.appendChild(s);})();

https://gist.github.com/skratchdot/c99a52b9228faf72999ef1bea293fe15

skratchdot avatar Jun 27 '20 16:06 skratchdot

code

pls i need to setup this

hamala69 avatar Jun 08 '23 12:06 hamala69

Here's an updated version of @skratchdot's bookmarklet for newer versions of ngrok (tested against 3.3.1):

javascript:(() => {const s = document.createElement("script"); s.src = "https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"; s.onload = () => {[...document.querySelectorAll(".tunnels")].forEach(el => {const url = el.textContent; const div = document.createElement("div"); el.appendChild(div); new QRCode(div, url); }); }; document.body.appendChild(s);})();

developius avatar Jul 23 '23 23:07 developius

Thank you for your contribution! This repository is no longer actively maintained. For the latest version of ngrok, please visit https://ngrok.com.

russorat avatar Dec 14 '23 05:12 russorat