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 support for ngrok's v3 config file #138

Open
alexdlaird opened this issue Nov 4, 2024 · 1 comment
Open

Add support for ngrok's v3 config file #138

alexdlaird opened this issue Nov 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@alexdlaird
Copy link
Owner

alexdlaird commented Nov 4, 2024

Add support for ngrok's v3 config file: https://ngrok.com/docs/agent/config/v3/#breaking-changes

The entire start() method is based on parsing the "tunnels" value of the config:

tunnel_definitions = config.get("tunnels", {})

If this is not defined, pyngrok still works fine, but anyone using the endpoints value in their config just doesn't get this built-in benefit of pyngrok anymore, so we want to support that too.

The existing implementation should work if the config version field value is 1 or 2. In config version 3, the "tunnels" field does still work, it's just deprecated, so in the config version 3 case, we should add additional support for defined endpoints.

Ensure support for the special pyngrok-default named tunnel works when its defined in the new endpoints section instead. No need to deduplicate if a named tunnel exists in both tunnels and endpoints, ngrok already does this for us.

Check if/what docs need to be updated. For now, the installer should still provision a default v2 config, we are not changing to make v3 the default config version, only add support for it.

@alexdlaird alexdlaird added the enhancement New feature or request label Nov 4, 2024
@alexdlaird
Copy link
Owner Author

alexdlaird commented Nov 7, 2024

Note that the traffic_policy element of the v3 config is still in preview, and may break without notice. There is a separate ticket created (#139) to add support for this config element (in v2 and v3), so when we implement the v3 config, leave it out for now (since it also doesn't yet exist in our implementation of the v2 config, and is still new and being tested anyway). This way we are not blocked by the traffic_policy element to implement the v3 config support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

1 participant