Protocol
Window Switch uses a very simple line based message exchange
for all communications between client and server.
This makes it very easy to observe with the usual set of network packet capture tools, the clients and the server also
support regular expressions which will log any messages (sent or received) that match it: simply start with the option --trace-protocol-message=RE
It also makes it possible to access it using telnet
or netcat
.
The sockets used for communication can be automatically discovered using mDNS.
Message Type | Message Parameters | Purpose | From Server | From Client |
---|---|---|---|---|
ping | none | test the connection | ||
OK | none | Sent in response to ping | ||
NOK | none | Sent if any error occurred or the command was not recognised | ||
help | none | display help message | ||
User Commands | ||||
add_user | username, password, uuid, etc | Login to the server or add a user to the client | ||
remove_user | uuid | Remove user (no longer available) | ||
logout | none | Logout | ||
authentication_failed | message | Tell the client that login failed | ||
authentication_success | message | Tell the client that login succeeded | ||
send_message | uuid, message | Send a message to another user | ||
request_user_icon | uuid | Request the user's avatar icon | ||
set_user_icon | uuid, icon data | Send the user's avatar icon | ||
Session Commands | ||||
add_session | ID, name, command, display, status... | Add a session to the client's list | ||
start_session | command, name, session type... | Start a new session on the server | ||
shadow_session | display, read_only | Start a shadow session of an existing session | ||
open_file | filename | Open a file on the server | ||
remove_session | ID | Removes a session from the client's list | ||
send_session | ID, user, [password] | Send a session to a user | ||
request_session | ID | Request access to the session | ||
kill_session | ID | Force the session to terminate | ||
close_session | ID | Close the session | ||
set_session_status | ID, status, actor | Modify the session's state | ||
request_session_icon | ID | Request the session's icon | ||
set_session_icon | ID, icon data | Set the session's icon | ||
Menu Commands | ||||
add_server_command | ID, command, name | Add a command to the menu list | ||
request_command_icon | ID | Request the commmand's icon | ||
set_command_icon | ID, icon data | Send the commmand's icon | ||
System Messages | ||||
sync | none | Request synchronisation of data | ||
sync_end | none | Sent after all the data | ||
version | version number | Information about the software version | ||
set_salt | salt | Sets the salt which must be used for signing/authentication | ||
set_remote_key | key, signature, signed salt, etc | The client or server's credentials | ||
set_host_info | name, type, etc | Supplemental information about the host | ||
set_tunnel_ports | list of ports | Ports that the client must use for tunnelling | ||
set_xmodmap | xmodmap | The keyboard mappings for this user |