{"id":27185083,"url":"https://github.com/threefoldtech/cloud-console","last_synced_at":"2025-06-25T19:34:32.104Z","repository":{"id":173644837,"uuid":"563775130","full_name":"threefoldtech/cloud-console","owner":"threefoldtech","description":"Web based console for Cloud-Hypervisor","archived":false,"fork":false,"pushed_at":"2023-10-12T03:34:49.000Z","size":160,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-12T20:42:21.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threefoldtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-09T10:04:51.000Z","updated_at":"2023-09-18T08:38:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"c14fec23-2258-4598-9d28-20225365f451","html_url":"https://github.com/threefoldtech/cloud-console","commit_stats":null,"previous_names":["threefoldtech/cloud-console"],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Fcloud-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Fcloud-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Fcloud-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Fcloud-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threefoldtech","download_url":"https://codeload.github.com/threefoldtech/cloud-console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074976,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T17:10:30.082Z","updated_at":"2025-04-09T17:10:30.692Z","avatar_url":"https://github.com/threefoldtech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud console\n\nCloud console is a small application intended to provide a web based terminal for virtual machines, who make a serial device or virtio-console\navailable over a `pseudoterminal` (`pty`). Although primarily intended to be used with [cloud-hypervisor], any vmm which exposes a `pty` (or\nany application which exposes a `pty` for that matter) should be compatible.\n\n## Implementation\n\nThe current system connects to the `pty` for both reading and writing. The read end is plugged into a multiplexer, with an internal buffer.\nClients connect, and their write half is connected to the same multiplexer. On connection, the entirety of the buffer is send to the client.\nThis way, clients can see a some history about the session once they connect. Once a write is done on the `pty` by the guest, this guest is\npropagated to the multiplexer, included in the buffer, and then sent to every connected client. These clients maintain a small internal buffer\nfor writes as well. Should the buffer be full (because of a laggy client for instance), the message is dropped. If this is noticed by the consumer,\nthey should reconnect.\n\nThe read half of connected clients is connected with an internal process, which forwards input from all writes to the write half of the `pty`. This\nsetup allows multiple clients to share the same session. Writes on a session are simply propagated to the `pty`, and we rely on the console of the guest\nto properly echo the data back to connected clients (including the client who sent the data).\n\nData propagation happens over a simple websocket protocol. The current protocol is not considered stable and can change between versions without\nany backward compatibility.\n\n## Building\n\nSince the frontend is statically included in the final binary, it must be build first. Building the frontend is explained in [the readme of the frontend](./frontend/README.md#building).\nOnce this is done, you can use default rust commands in this directory to build, e.g.:\n\n```bash\ncargo build\n```\n\nIn debug mode, the frontend files are not compiled into the binary, and changing them (i.e. building them again) will cause the new files to be served\nwithout requiring the binary to be restarted.\n\nTo build a static linux release binary, run\n\n```bash\ncargo build --release --target x86_64-unknown-linux-musl\n```\n\n## Running\n\nThe binary expects at least 3 arguments, with an optional 4th:\n\n```bash\ncloud-console \u003cpath_to_pty\u003e \u003cbind_ip\u003e \u003cbind_port\u003e [\u003clog_file\u003e]\n```\n\n- `path_to_pty`: The path to the `pty` device file to connect to\n- `bind_ip`: The IP address to bind the server to\n- `bind_port`: The port to use for the server\n- `log_file`: This is optional, if it is set, this file will be opened (created if needed), and attached as reader to the multiplexer. All data sent by\n the `pty` will be written in the file. Can be used for debug purposed.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2Fcloud-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreefoldtech%2Fcloud-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2Fcloud-console/lists"}