CollabVM 1.2 Protocol Reference and Youself PC Specs: Difference between pages

From Computernewb Wiki
(Difference between pages)
Jump to navigation Jump to search
No edit summary
 
(I replaced Crunchbang++ and Windows 8.1 with AntiX on my pc.)
 
Line 1: Line 1:
== My current PC Specs (HP Compaq 8200 Elite CMT): ==
This is the protocol reference for CollabVM 1.2, detailing how the protocol works and how to do different things.
'''NOTE: This PC will be selled at maybe April. We will begin backing up files at May/June 2024.'''


Processor: Intel Core i5-2500K (Geekbench: Single Core Score is 634, Multi Core Score is 1911)
The CollabVM protocol is the mutilated corpse of what used to be Guacamole 0.9.5. It maintains the same instruction format and opcodes for getting the VM display and controlling it, but that's about it.


Graphics Card: ATI Radeon HD 6570
= Wire Protocol =


RAM: 4GB RAM Single Channel
The connection starts with the client making a WebSocket connection to the CollabVM endpoint. This can be anything, for example <code>wss://computernewb.com/collab-vm/vm0</code> for VM0b0t.


OS: AntiX, since AntiX is faster than Crunchbang++ and Windows 8.1. as AntiX performance beats Lubuntu.
The client '''MUST''' use <code>guacamole</code> as the WebSocket subprotocol and servers '''MUST''' reject any connections not using this subprotocol.


HDD: 500GB WD (as Data drive), 500GB Seagate (as OS drive)
The CollabVM protocol supports multiple VMs, however current server implementations only support one per instance. This is not a requirement and new servers are welcome to support multiple VMs.


== Upcoming Desktop Specs (Maybe June 2024?): ==
Each VM has its own ID. This ID is arbitrary however '''MUST''' be unique against all other VMs on the server, and all VMs that will be used on the same webapp.
Processor: Intel Core i5/i7 6th-7th gen possibly?


RAM: 16GB RAM
Each client has their own username. The client must set a username or request that the server assign it one before connecting to a VM.


Graphics Card: Mostly Dedicated Graphics if possible, 2GB VRAM (Commonly NVIDIA GTX 750 TI or AMD Radeon)
Assigned usernames are, by convention, <code>guest</code> followed by five random digits. However, the server may use whatever format it pleases.


OS: EndeavourOS XFCE
== Message Format ==


SSD: May vary (128gb or 256gb).
All messages on the CollabVM protocol are UTF-8 string arrays encoded in Guacamole Format, detailed in the Design section of the [https://guacamole.apache.org/doc/0.9.5/gug/guacamole-protocol.html Guacamole 0.9.5 Manual, Chapter 9]. Servers '''SHOULD''' drop the connection if the client sends a message not conforming to this.


HDD: 500GB WD from previously old hp compaq 8200 elite pc
== nop ==


Price: ?
This is a keepalive signal sent through the duration of the session used to verify that the client is still connected.


== FAQ: Why does 17.3 screen inch laptops being harder to find? ==
The server '''MUST''' send a <code>3.nop;</code> periodically and the client '''MUST''' respond with the same.
17.3 Screen Inch Laptops seems be very difficult to find in Zagazig, Egypt. We are buying 15.6 screen inch or smaller laptops instead.
== FAQ: Why does stop buying Laptops? ==
Laptops are expensive and more prone to overheat, we are buying an new desktop instead. :)
== FAQ: Why does need upgrade to an better youself64 phone? ==
[[File:Infinix Hot 7 Screen issues (Youself64 phone from 2020-2023).jpg|thumb|Here's an image having screen issues on youself64's phone (Infinix Hot 7)]]
Because previously youself64's phone has screen issues, damaged power and volume buttons, fingerprint sensor broken. they has selled as for parts or not working. We have to get better phone soon.


UPDATE: I have an better phone (Redmi 10), so I can use better well. :)
The server '''MAY''' omit sending NOPs if there is other activity by the client.


Servers '''MUST''' drop any client which does not respond to the NOP in a timely manner.


Clients '''MUST NOT''' send a NOP until prompted by the server.


Clients '''MAY''' drop the connection if the server does not send '''any''' messages over a period of time. However this should not be limited strictly to NOPs as these may not be consistently sent if there is other activity on the connection.


== Handshake ==


Upon making a WebSocket connection, the server will immediately begin sending NOPs, which will continue for the duration of the connection. The client is immediately in the handshaking phase of the connection.


The handshake is as follows:


=== Authentication announcement ===


A server that uses CollabVM Account Authentication will send a message with the <code>auth</code> opcode to announce this. This indicates a few changes in behavior:


* Clients may login using the <code>login</code> opcode.
* Clients may not change username except by logging in or having a guest username assigned.
* Depending on server configuration, clients may not be able to chat, take turns, or vote without logging in
* Staff-password authentication is disabled


==== Parameters ====


<table class="wikitable">
<tr><td>Opcode</td><td><code>auth</code></td></tr>
<tr><td>Parameter 1</td><td>The base URL of the authentication server used by this instance. Ex: <code>https://auth.collabvm.org</code></td></tr>
</table>


=== Obtain a list of VMs ===


The first thing the client may want to do is obtain a list of VMs available on this server. If the client already knows exactly what node ID it wants to connect to (common for bots) this may be skipped.


== FAQ: Why does New Youself64 Desktop replaces my previous youself64 pc? ==
==== Request ====
Because my previous youself64 pc has many issues:


# Some applications/games fails to function or fails to open after rebooting pc or opening more than once in Windows. (which will cause Application error in Windows)
<table class="wikitable">
# 4GB RAM isn't enough for some tasks or heavily websites in Chrome/Firefox. They need 8GB or 16GB RAM to open heavily websites in Chrome/Firefox.
<tr><td>Opcode</td><td><code>list</code></td></tr>
# HDDs are slow for boot times and opening applications. in order to get faster boot time and opening application. we need an SSD so SSDs can make faster than HDDs.
</table>
# Many games runs very slow or unstable in previously youself64 pc. For example: Internet Cafe Simulator randomly crashes to black screen during ingame, Internet Cafe Simulator 2 runs too slow and also suffers from crashes/freezes in my pc.

# VST Plugins or DLL Plugins fails to function after rebooting pc, so I need to buy new pc. because any of these issues is very hard to fix so it is easier to buy an new pc.
==== Response ====
# It has very long delays when trying networking tasks. and Chrome has bugs on my pc for me.

Parameters 1 through 3 are repeated for every available VM.

<table class="wikitable">
<tr><td>Opcode</td><td><code>list</code></td></tr>
<tr><td>Parameter 1</td><td>The ID of the node, that should be passed to the <code>connect</code> opcode.</td></tr>
<tr><td>Parameter 2</td><td>A display name for the VM. May contain HTML.</td></tr>
<tr><td>Parameter 3</td><td>A Base64-encoded thumbnail for the VM. Will be either PNG or JPEG depending on the server implementation. This can be determined through magic numbers.</td></tr>
</table>

=== Request a username ===

Before connecting, the client must now obtain a username.

==== Request ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>rename</code></td></tr>
<tr><td>Parameter 1</td><td><b>(OPTIONAL)</b> The username requested by the client. May be omitted if the client has no preference. The server is under no obligation to respect this and may provide a guest username for a multitude of reasons</td></tr>
</table>

==== Response ====

The server will respond with a [[#Client Renamed|Client Renamed]] event, however with one key difference: The status will always be <code>0</code> (success), even if the requested username was not available for whatever reason. In this case, a guest username is assigned.

=== Connect to a VM ===

The client may now connect to a VM as follows:

==== Request ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>connect</code></td></tr>
<tr><td>Parameter 1</td><td>The ID of the VM to connect to. Can be retrieved with the list opcode.</td></tr>
</table>

==== Response ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>connect</code></td></tr>
<tr><td>Parameter 1</td><td>The status of the connection. See below</td></tr>
</table>

Possible statuses:

<table class="wikitable">
<tr><th>Value</th><th>Status</th></tr>
<tr><td>0</td><td>The connection failed. This is usually due to an invalid VM ID but depending on the server implementation and protocol extensions could mean something else.
</td></tr>
<tr><td>1</td><td>The connection was successful and the client is now connected to the VM.</td></tr>
</table>

After successfully connecting to a VM, the client will begin to recieve messages as normal, and may send messages.

== Server-to-Client Opcodes ==

These messages may be sent by the server at any time after completing the handshake and must be handled by the client.

=== New User(s) ===

Sent to indicate that one or more users have joined the VM. This may also be sent during the handshake.

This may be resent for an already-joined user to announce that they have changed ranks after logging in. Make sure to check for duplicates.

Parameters 1 and 2 are repeated for each user added.

<table class="wikitable">
<tr><td>Opcode</td><td><code>adduser</code></td></tr>
<tr><td>Parameter 1</td><td>The username of the added user.</td></tr>
<tr><td>Parameter 2</td><td>The [[#Rank|Rank]] of the added user as an integer.</td></tr>
</table>

=== Removed User(s) ===

Sent when one or more users disconnect from the VM.

Parameter 2 is repeated for each user removed.

<table class="wikitable">
<tr><td>Opcode</td><td><code>remuser</code></td></tr>
<tr><td>Parameter 1</td><td>The number of users that have left</td></tr>
<tr><td>Parameter 2</td><td>The username that has left the VM.</td></tr>
</table>

=== Client Renamed ===

Sent when the current client (you) is renamed, either by you or the server.

<table class="wikitable">
<tr><td>Opcode</td><td><code>rename</code></td></tr>
<tr><td>Parameter 1</td><td><code>0</code></td></tr>
<tr><td>Parameter 2</td><td>The status of the rename. See below for available values.</td></tr>
<tr><td>Parameter 3</td><td>The client's new username. This may not necessarily be the username requested by the client, as the server can refuse this request for a variety of reasons and may instead assign a guest name.</td></tr>
</table>

Possible rename statuses:

<table class="wikitable">
<tr><th>Value</th><th>Status</th></tr>
<tr><td>0</td><td>The client got their requested username. If the renaming is sent by a staff member this must always be used even if the requested username was not available.</td></tr>
<tr><td>1</td><td>The username was already taken.</td></tr>
<tr><td>2</td><td>The username was invalid. See requirements above.</td></tr>
<tr><td>3</td><td>The username is not allowed by the server.</td></tr>
</table>

=== User Renamed ===

Sent when another user in the list is renamed.

<table class="wikitable">
<tr><td>Opcode</td><td><code>rename</code></td></tr>
<tr><td>Parameter 1</td><td><code>1</code></td></tr>
<tr><td>Parameter 2</td><td>The user's old username</td></tr>
<tr><td>Parameter 3</td><td>The user's new username</td></tr>
</table>

=== Chat message ===

Sent when one or more chat messages are received.

Parameters 1 and 2 may be repeated for multiple chat messages, and this should be checked for. In current server implementations, this will only happen immediately after connection to send the chat history.

<table class="wikitable">
<tr><td>Opcode</td><td><code>chat</code></td></tr>
<tr><td>Parameter 1</td><td>The user who sent the chat message. This may be an empty string to indicate a system message sent by the server, such as the Message of the Day, or a vote notification.</td></tr>
<tr><td>Parameter 2</td><td>The chat message</td></tr>
</table>

=== Screen Size ===

Sent to announce the screen size of the VM. This will be sent after connecting and after any resolution change on the VM.

<table class="wikitable">
<tr><td>Opcode</td><td><code>size</code></td></tr>
<tr><td>Parameter 1</td><td><code>0</code></td></tr>
<tr><td>Parameter 2</td><td>Screen width</td></tr>
<tr><td>Parameter 3</td><td>Screen height</td></tr>
</table>

=== Framebuffer Update ===

Sent to update the VM screen. The server will send one initial message containing the entire screen on connection, and after that will send a dirty rect for each update

<table class="wikitable">
<tr><td>Opcode</td><td><code>png</code></td></tr>
<tr><td>Parameter 1</td><td><code>0</code></td></tr>
<tr><td>Parameter 2</td><td><code>0</code></td></tr>
<tr><td>Parameter 3</td><td>X-axis position of the rectangle</td></tr>
<tr><td>Parameter 4</td><td>Y-axis position of the rectangle</td></tr>
<tr><td>Parameter 5</td><td>The base64-encoded rectangle. Despite the name of the opcode, this may be either PNG or JPEG and can be determined through magic numbers or headers.</td></tr>
</table>

=== Vote-for-reset notification ===

Sent when a Vote-for-reset on the VM updates

<table class="wikitable">
<tr><td>Opcode</td><td><code>vote</code></td></tr>
<tr><td>Parameter 1</td><td>The status of the vote. See below for values</td></tr>
<tr><td>Parameter 2</td><td>Amount of time left on the vote in milliseconds. If the above status was 3 (cooldown), this is the amount of time before the client can start a vote.</td></tr>
<tr><td>Parameter 3</td><td>The number of users who have voted in favor of resetting the VM</td></tr>
<tr><td>Parameter 4</td><td>The number of users who have voted against resetting the VM</td></tr>
</table>

Possible vote statuses:

<table class="wikitable">
<tr><th>Value</th><th>Status</th></tr>
<tr><td>0</td><td>The vote has started. The yes and no parameters may not be specified, and in such case should be assumed to be zero.</td></tr>
<tr><td>1</td><td>The vote count has updated.</td></tr>
<tr><td>2</td><td>The vote has ended. No other parameters will be given.</td></tr>
<tr><td>3</td><td>Sent if the client tried to start a vote, however there is an active cooldown. Only the time parameter is given.</td></tr>
</table>
=== Turn queue update ===

Indicates an update of the VM's turn queue

<table class="wikitable">
<tr><td>Opcode</td><td><code>turn</code></td></tr>
<tr><td>Parameter 1</td><td>How much time is left on the current user's turn in milliseconds.</td></tr>
<tr><td>Parameter 2</td><td>The amount of users in the queue.</td></tr>
<tr><td>Parameter 3-?</td><td>Each username in the queue given as separate parameters</td></tr>
<tr><td>End parameter</td><td>How much longer until the client will get a turn in milliseconds. Only sent if the client is waiting.</td></tr>
</table>

== Client-to-Server Opcodes ==

These opcodes may be sent by the client at any time after the handshake to perform various actions

=== Account Login ===

Used to log in with a CollabVM account. This should only be sent if the server announced authentication using the <code>auth</code> opcode during the handshake phase. Sending this opcode otherwise is undefined behavior.

==== Request ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>login</code></td></tr>
<tr><td>Parameter 1</td><td>A session token OR bot token obtained from the authentication server announced during handshake.</td></tr>
</table>

==== Response ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>login</code></td></tr>
<tr><td>Parameter 1</td><td>Login status. <code>0</code> for error, <code>1</code> for success.</td></tr>
<tr><td>Parameter 2</td><td>Human-readable error. Only sent if status was <code>0</code></td></tr>
</table>

After a successful login, the client should expect to be renamed and have their rank updated by the server.

=== Rename ===

Used to change the client's username. This opcode is not available on servers that use account authentication, and the server will respond with an error.

==== Request ====

<table class="wikitable">
<tr><td>Opcode</td><td><code>rename</code></td></tr>
<tr><td>Parameter 1</td><td>The username requested by the client. If omitted, the server will reassign a guest username.</td></tr>
</table>

==== Response ====

The server will respond with a [[#Client Renamed|Client Renamed]] event.

=== Send Chat ===

Send a public chat message to the server.

<table class="wikitable">
<tr><td>Opcode</td><td><code>chat</code></td></tr>
<tr><td>Parameter 1</td><td>Chat message to send</td></tr>
</table>

=== Take turn ===

Request a turn on the VM.

<table class="wikitable">
<tr><td>Opcode</td><td><code>turn</code></td></tr>
<tr><td>Parameter 1</td><td><code>1</code> to take a turn, <code>0</code> to cancel your turn. If not specified, the server will infer <code>1</code>.</td></tr>
</table>

=== Mouse Instruction ===

Send a mouse update to the VM. Only effective if the client has the turn or is an Admin. This opcode has no response.

<table class="wikitable">
<tr><td>Opcode</td><td><code>mouse</code></td></tr>
<tr><td>Parameter 1</td><td>X position of the mouse pointer on the VM screen</td></tr>
<tr><td>Parameter 2</td><td>Y position of the mouse pointer on the VM screen</td></tr>
<tr><td>Parameter 3</td><td>Bitmask of mouse buttons being held. See [https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#pointerevent Remote Framebuffer Protocol§PointerEvent]</td></tr>
</table>

=== Keyboard Instruction ===

Send a keyboard update to the VM. Only effective if the client has the turn or is an Admin. This opcode has no response.

<table class="wikitable">
<tr><td>Opcode</td><td><code>key</code></td></tr>
<tr><td>Parameter 1</td><td>Key symbol for the key being pressed as a base-10 integer. See [https://cgit.freedesktop.org/xorg/proto/x11proto/tree/keysymdef.h keysymdef.h] for a list (values are in hex and must be converted to base 10)</td></tr>
<tr><td>Parameter 2</td><td><code>1</code> to press the key, <code>0</code> to release.</td></tr>
</table>

=== Vote-for-reset ===

Vote for or against resetting the VM to snapshot.

<table class="wikitable">
<tr><td>Opcode</td><td><code>vote</code></td></tr>
<tr><td>Parameter 1</td><td><code>1</code> to vote in favor of a reset, <code>0</code> to vote against a reset. If there is no active vote, <code>1</code> is used to start one, while <code>0</code> has no effect.</td></tr>
</table>

== Admin Opcodes ==

These opcodes may be sent to perform administration actions on the VM.

TODO

= Rank =

CollabVM has four ranks:

<table class="wikitable">
<tr><th>ID</th><th>Name</th><th>Description</th></tr>
<tr><td>0</td><td>Unregistered</td><td>The default rank with no permissions that all users have prior to logging in.</td></tr>
<tr><td>1</td><td>Registered</td><td>A logged in user. This is only used by servers that use CollabVM Account Authentication.</td></tr>
<tr><td>2</td><td>Admin</td><td>Has all permissions on the VM.</td></tr>
<tr><td>3</td><td>Moderator</td><td>Permissions vary depending on server configuration. Even with all permissions granted moderators can still not use the QEMU monitor.</td></tr>
</table>

Revision as of 20:14, 5 May 2024

My current PC Specs (HP Compaq 8200 Elite CMT):

NOTE: This PC will be selled at maybe April. We will begin backing up files at May/June 2024.

Processor: Intel Core i5-2500K (Geekbench: Single Core Score is 634, Multi Core Score is 1911)

Graphics Card: ATI Radeon HD 6570

RAM: 4GB RAM Single Channel

OS: AntiX, since AntiX is faster than Crunchbang++ and Windows 8.1. as AntiX performance beats Lubuntu.

HDD: 500GB WD (as Data drive), 500GB Seagate (as OS drive)

Upcoming Desktop Specs (Maybe June 2024?):

Processor: Intel Core i5/i7 6th-7th gen possibly?

RAM: 16GB RAM

Graphics Card: Mostly Dedicated Graphics if possible, 2GB VRAM (Commonly NVIDIA GTX 750 TI or AMD Radeon)

OS: EndeavourOS XFCE

SSD: May vary (128gb or 256gb).

HDD: 500GB WD from previously old hp compaq 8200 elite pc

Price: ?

FAQ: Why does 17.3 screen inch laptops being harder to find?

17.3 Screen Inch Laptops seems be very difficult to find in Zagazig, Egypt. We are buying 15.6 screen inch or smaller laptops instead.

FAQ: Why does stop buying Laptops?

Laptops are expensive and more prone to overheat, we are buying an new desktop instead. :)

FAQ: Why does need upgrade to an better youself64 phone?

Here's an image having screen issues on youself64's phone (Infinix Hot 7)

Because previously youself64's phone has screen issues, damaged power and volume buttons, fingerprint sensor broken. they has selled as for parts or not working. We have to get better phone soon.

UPDATE: I have an better phone (Redmi 10), so I can use better well. :)








FAQ: Why does New Youself64 Desktop replaces my previous youself64 pc?

Because my previous youself64 pc has many issues:

  1. Some applications/games fails to function or fails to open after rebooting pc or opening more than once in Windows. (which will cause Application error in Windows)
  2. 4GB RAM isn't enough for some tasks or heavily websites in Chrome/Firefox. They need 8GB or 16GB RAM to open heavily websites in Chrome/Firefox.
  3. HDDs are slow for boot times and opening applications. in order to get faster boot time and opening application. we need an SSD so SSDs can make faster than HDDs.
  4. Many games runs very slow or unstable in previously youself64 pc. For example: Internet Cafe Simulator randomly crashes to black screen during ingame, Internet Cafe Simulator 2 runs too slow and also suffers from crashes/freezes in my pc.
  5. VST Plugins or DLL Plugins fails to function after rebooting pc, so I need to buy new pc. because any of these issues is very hard to fix so it is easier to buy an new pc.
  6. It has very long delays when trying networking tasks. and Chrome has bugs on my pc for me.