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

passing the key as an argument in URL #37

Open
NonerKao opened this issue Jan 29, 2021 · 1 comment
Open

passing the key as an argument in URL #37

NonerKao opened this issue Jan 29, 2021 · 1 comment

Comments

@NonerKao
Copy link

As title. Instead of opening up https://maxmcd.github.io/webtty/ (the site below) and manually initializing the connection (copy-pasting the key/answer), I am considering an usage like passing the key directly in URL like https://maxmcd.github.io/webtty/index.html&key=33j2kxK3PadnEFo... to link to an already waiting on-way webtty server.

Once this function is ready, it can be integrated into some web service, in which a background thread opens up a webtty server, parses the key it outputs and generates the link with the key as the argument. The user can just click the link in the browser to seamlessly access to the terminal. I am doing this using gotty, but it is no longer being maintained while WebRTC looks more interesting.

This is not a feature request. Rather, I would like to contribute to this project by adding this feature, if you consider it useful. I was planning to finish this function first and discuss this feature directly in the PR thread, but it is not obvious to me how to host a local site like the site for development. I tried building the npm dependencies and used a static http server to host '/web-client/dist', but the basic function is missing: it just keeps telling me There was an error with the offer: <the key>...Try entering the message again: and loops forever. The key works with the site, so there must be something missing in my build. Any hints?

@NonerKao
Copy link
Author

but it is not obvious to me how to host a local site like the site for development. I tried ...

Well, never mind, I know nothing about node and typescript before, but at least I know npm run serve now.

As mentioned, I will try to add the feature and then send a PR later.

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