New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QR Code [Feature Request] #473
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.
and a slightly more portable version, in case
|
PR #472 looks like it implements this. It's currently failing CI, and un-merged. |
try this make it as a cli command and pass the port number as argumentimport ngrok
import qrcode
# Create an ngrok tunnel and get the public URL
tunnel = ngrok.connect(5000, authtoken_from_env=True)
print (f"Terminal Tunal Url : {tunnel.url()}")
# Get the public URL of the tunnel
public_url = tunnel.url()
# Generate a QR code for the ngrok URL
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(public_url)
qr.make(fit=True)
# Save the QR code as an image
img = qr.make_image(fill_color="black", back_color="white")
img.save('ngrok_qr.png') |
It’d be amazing to have the CLI generate a QR code to scan and open the URL.
The text was updated successfully, but these errors were encountered: