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 #129

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

Add support for ngrok's v3 config file #129

alexdlaird opened this issue Nov 5, 2024 · 1 comment
Labels
ready Issue has been triaged and accepted, ready to work

Comments

@alexdlaird
Copy link
Owner

alexdlaird commented Nov 5, 2024

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

The config parsing when connecting a tunnel is based on the "tunnels" value of the config: https://github.com/alexdlaird/java-ngrok/blob/main/src/main/java/com/github/alexdlaird/ngrok/NgrokClient.java#L473

If this is not defined, java-ngrok still works fine, but anyone using the endpoints value in their config just doesn't get this built-in benefit of java-ngrok 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 java-ngrok-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
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 (#131) 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.

@github-actions github-actions bot added the stale Issue will be closed automatically if no further activity occurs label Nov 15, 2024
@alexdlaird alexdlaird added ready Issue has been triaged and accepted, ready to work and removed stale Issue will be closed automatically if no further activity occurs labels Nov 15, 2024
Repository owner deleted a comment from github-actions bot Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Issue has been triaged and accepted, ready to work
Projects
Status: Ready
Development

No branches or pull requests

1 participant