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

Better scripting support (URLs output, ...) #48

Open
xmo-odoo opened this issue May 14, 2021 · 0 comments
Open

Better scripting support (URLs output, ...) #48

xmo-odoo opened this issue May 14, 2021 · 0 comments

Comments

@xmo-odoo
Copy link

xmo-odoo commented May 14, 2021

This overlaps with but is more general than #25 I think.

The current output of tunnelto is somewhat uncomfortable when using it in a scripting context (e.g. as part of a script or as a tunneling tool for an S2S integration test suite):

  • getting the public URL requires reading stderr, which is not great when simultanously trying to keep / pipe stderr for error reporting / inspection
  • care has to be taken to avoid blocking
  • the formatting of the output is not really conducive to parsing either

I'm thinking one option would be a riff on the usual pidfile method: the ability to give tunnelto a directory name, and it'd write the public URL to $outdir/$pid. tunnelto's pid should be easy for the parent proces to retrieve.

For forward-compatibility purposes, the file could be written in a machine-readable format (e.g. json) so it could be extended more easily in the future, though I'm not entirely sure what else would be added to it, unless it grows an ngrok-like automation API (I don't know if that's in the plans, in that case also writing the endpoint would be useful).

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

1 participant