Skip to content

2-click rendezvous through a chatbot, using links

This is a more concrete plan for the chatbot idea in "Broker: investigate non-domain-fronting secure client / proxy registrations". This can be considered a more advanced version of the generic "copy-paste" rendezvous (see 622005c7).

The process goes like this:

  1. The Snowflake client creates a WebRTC offer.
  2. The client formats a string as such https://t.me/snowflake-rendezvous-bot?start=<BASE64_ENCODED_OFFER>.
  3. The client somehow passes the offer link to the application that it's integrated with, so that the user can click it. Another option is to just open the link right away, using e.g. browser.OpenURL() Also, some messengers, including Telegram register protocol handlers. Namely, Telegram registers tg:, so that can also be used right away instead of https://t.me.
  4. The user opens the link, thus sending a message to the bot.
  5. The client starts an HTTP listener on localhost:12345
  6. The bot makes a request to the Snowflake broker with the client's offer.
  7. The broker returns a proxy WebRTC answer to the bot.
  8. The bot formats a string as such http://localhost:12345/?answer=<BASE64_ENCODED_ANSWER>, and sends it as a reply to the user.
  9. The user clicks the link, thus the browser makes an HTTP request that contains the proxy answer, to the HTTP server run by the Snowflake client (localhost:12345).

Rendezvous done! The user had to perform only 2 (or so) clicks, with no copy-pasting at all.

Of course instead of Telegram other messengers can be used, e.g. email (and we already set up an example email chatbot GitHub, forum post, where mailto: links are used instead). The format string from step 2 should be configurable.


As an adjustment, the HTTP server address could also be made dynamic (with a dynamic port), in which case the client would also pass a format string to the chatbot indicating how it would like the answer link to be formatted.

Another idea is instead of using an HTTP server, register a link handler, and make the bot respond with a link in the form of snowflake-rendezvous:<PROXY_ANSWER>, though IDK if it's beneficial.