Skip to content
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

Add labels as a named parameter of ngrok.forward method #85

Open
jimkring opened this issue Jan 4, 2024 · 2 comments
Open

Add labels as a named parameter of ngrok.forward method #85

jimkring opened this issue Jan 4, 2024 · 2 comments

Comments

@jimkring
Copy link

jimkring commented Jan 4, 2024

I was mentioned in this issue/comment that it's possible to use the labels keyword argument with the ngrok.forward method (e.g. ngrok.forward("localhost:8080", proto="labeled", labels="edge:edghts_2G...", authtoken_from_env=True)), which is great for specifying a specific edge for creating a tunnel.

It would be helpful to users if labels was an named parameter of the ngrok.forward method (rather than just supporting it as a keyword argument that works if you know it exists.

Thanks!

@bobzilladev
Copy link
Contributor

For a more concrete style the builder pattern configuration can be used, here's an example of that which is more explicit: ngrok-labeled.py

@salilsub
Copy link

My concern here is what creating a named parameter is that it could create problems for users who are not creating tunnel backends (i.e. using endpoints instead of edges). We'll do some investigation to see if we can work around that but if not, we'll keep the behavior as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants