Closed DoubleF3lix closed 3 years ago
I believe this limitation of 4 is applied only to ngrok
free accounts, so that's one way to get more simultaneous open tunnels.
Why not just ngrok.disconnect() the unused tunnels when a new tunnel is needed? If you want to disconnect all tunnels and start fresh, use ngrok.kill() and then create a new object. The interfaces to accomplish this behavior are already there, so I don't think it's something that we need to add to the pyngrok
APIs.
I'm making a program that utilizes this library and can open and close tunnels with a function, but if too many sessions are opened and closed, I get an error that says that I can only open 4 per session. A function to reset the session so I can open new tunnels again would be useful so the user doesn't have to re-open the UI.
Something like
ngrok.reset_session()
that would raise an error if there are any tunnels open.