2017-11-22 16:45:34 +01:00
xterm.js webclient and helper utility
=====================================
2023-09-29 10:07:17 +02:00
This repository contains the client and helper utility to use xterm.js [0] in
the web UI of Proxmox projects like Proxmox VE, Proxmox Mail Gateway or Proxmox
Backup Server.
2017-11-22 16:45:34 +01:00
2023-09-29 10:07:17 +02:00
[0]: https://xtermjs.org
2017-11-22 16:45:34 +01:00
2023-09-29 10:07:17 +02:00
To be able to relay between the frontend and a shell program/console running in
the backend, we provide a tool called termproxy to open a port (where our
websocketproxy connects to) and to open a PTY and execute a program.
For communication originating from the client towards the server, it implements
a simple packet-based protocol where everything is a string. The protocol
consists of the following messages:
2017-11-22 16:45:34 +01:00
* Normal Message
0:LENGTH:MSG
where LENGTH is the bytelength of the msg
* Resize Message
1:COLS:ROWS:
2023-09-29 10:07:17 +02:00
where COLS is the number of columns the client wants to resize to, and ROWS
the number of rows, respectively
2017-11-22 16:45:34 +01:00
* Ping Message
2
used to keep the connection between client and server alive
(we have a timeout of 5 minutes)
2023-09-29 10:07:17 +02:00
Every other input from the client will be ignored.
2017-11-22 16:45:34 +01:00
2023-09-29 10:07:17 +02:00
Communication from server to the client uses no protocol, the raw data coming
from the terminal/program will be forwarded 1:1, without any wrapping format.