Ngrok Tunnel: A more secure but simple to use alternative to port forwarding

That should be easy to check; what is your region?

I am in UAE so I choose the option region option "Asia/Pacific" in the plugin.
how can I check It?

You can check it by changing to another region. But I don't think that will change much.

I think this may be caused by a newer version of the ngrok python binding used by the plugin. I'll look in to that.

1 Like

I think I have fixed the issue. Are you running OctoPrint on Python 3 (if so, good for you!)? And did you install the ngrok plugin after the 25th of October?

I am new to octopi, I have set it up just recently (2 month ago), not sure how to check for the python version on octopi but I'm running version 1.4.2.
for the ngrok plugin i have tried to re-install it 10 days ago.

I have tried today the new update that you published (0.3.1) also I face the same issue.

Check the bottom left corner of the web interface, it should say there.

Thank you Charlie,

it is 2.7.16
image

1 Like

Would love if you could add a qr code for the tunnel url so I can scan it quickly with the phone when I need to step out. Save me from typing it.

This actually seemed like a good idea, so I took a stab at it. Will submit a PR to see if @fieldOfView wants to implement or not. Just need to clean up the code for when the tunnel gets closed.

image

1 Like

You are too fast with this stuff man!
Thanks for the PR.

PR submitted, if anyone would like to try it out you can install by copying/pasting the URL below in Plugin Manager > Get More > ...from URL and clicking install.

https://github.com/jneilliii/OctoPrint-ngrok/archive/refs/heads/feature/qrcode.zip

That looks great! Exactly as I imagined

Can you tell it to generate the url as https:// instead of http://?

1 Like

I am on it.

Install the fixed version by copying/pasting the URL below in Plugin Manager > Get More > ...from URL and clicking install.

https://github.com/fieldOfView/OctoPrint-ngrok/archive/refs/heads/devel.zip

I'll do a proper release later this week.

Hey there, Michael here. I am new the the OctoPrint forum and just installed this great little plugin :slight_smile: and unfortunately ran into the following issue:

It works well for the web UI but when trying to connecting to the REST API from a Python 3.9 script I get a "tunnel not found" error (despite the tunnel being active and usable from the web interface)

Anyone who encountered a similar issue and can give me some pointers?

Could it be an authentication issue, as for the web UI I have to authenticate with the ngrok credentials while the script does not handle authentication to the tunnel.

I would think that if it is an authentication problem, you would not get a "tunnel not found" error, but something indicating that you don;t have permission. Check that you are using the right port (443) and protocol (https). And your script has to add "basic auth" http headers.

thanks, @fieldOfView for the basic auth hint: despite of the error message, it was the authentication issue: after adding "basic auth" to the header I could connect without any problems.

1 Like

I don't mean to rush you at all but was this done? How can I ensure I have the proper release when it is done. Will Octoprint tell me the plugin has an update? Sorry, I too am fairly new to Octoprint. Thank you.

The new release is available now.

1 Like