ngrok / ngrok-python

Embed ngrok secure ingress into your Python apps with a single line of code.
https://ngrok.com
Apache License 2.0
103 stars 19 forks source link

Can't start labeled tunnel #66

Closed pavelmakis closed 9 months ago

pavelmakis commented 9 months ago

I cannot find any way to start ngrok agent from code with label to attach my agent to specific edge. Agent starts correctly and it is visible on agent's page. Is it possible to specify labels when connecting to ngrok?

krwenholz commented 9 months ago

Hi @pavelmakis! Have you tried the labeled_listener?

I think this is what you want: https://github.com/ngrok/ngrok-python/blob/main/examples/ngrok-labeled.py#L17-L23

If that's not working, sharing a code snippet of what you're trying to do would be really helpful.

Cheers!

pavelmakis commented 9 months ago

Hi @pavelmakis! Have you tried the labeled_listener?

Thanks a lot! This really helped! I'm surprised I didn't see that in the examples.