Host Projects

Host projects are a feature in TOP that allows users to access projects in local instances through an existing cloud connection.

To put it into picture:

  • Desktop app connects to cloud & opens a project locally

  • A separate device connects to https://theopenpresenter.com

    • And accesses the local project

    • All request will be proxied through the cloud

How does this work?

When a desktop instance with a cloud connection is online, it will:

  1. Ping the cloud instance to notify of its existence

    1. This includes the details required for us to connect to the instance (iroh ticket)

    2. As well as the currently active projects

  2. In the cloud, we show the open projects for all host projects

  3. Opening it will open a project URL with specific queries

    1. We then use this queries to know how to proxy the request

      1. pOrg and pEndpoint in the URL

      2. Backend wise, we use x-organization-slug and x-iroh-endpoint-id as headers to identify that this should be proxied.

    2. An iroh endpoint is opened on the cloud, which is then used to proxy the request

Note: When accessing a host project, the organization and project slug in the URl should be of the hosts. This is because our code reads the URL to determine what should be fetched. On the cloud, we read the search query to know how to proxy.

So this can be confusing, but practically, it looks something like this:

https://[cloud].com/[localRoute]?[cloudProxyDetails]

Last updated