mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
[http] serves /terminal (and / goes there): a page with xterm.js 5.5 and its fit addon, built into the binary (MIT licensed, license included), joined by a WebSocket (/terminal/ws, subprotocol bbs.terminal, binary frames) to the text BBS, run in-process as for a telnet caller: a node shown as "web terminal", the BBS's own login, ANSI and UTF-8, the size the page fitted. The page has a strict Content Security Policy (scripts only from the BBS, no inline scripts, no framing); the WebSocket is taken only from the BBS's own pages (or the cors origin), under the HTTP server's TLS, connection and rate limits. terminal = no turns it off. The WebSocket's own stream closes the connection when a read deadline passes, which the text BBS uses for idle time and notices: the line adapter SSH sessions had (reads with deadlines that only end the read) now serves both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
9 lines
572 B
CSS
9 lines
572 B
CSS
html, body { height: 100%; margin: 0; background: #000; color: #c0c0c0; }
|
|
body { display: flex; flex-direction: column; font: 14px/1.4 system-ui, sans-serif; }
|
|
header { display: flex; gap: 1em; align-items: center; padding: 4px 12px; background: #111; border-bottom: 1px solid #333; }
|
|
header .name { color: #5ff; font-weight: 600; }
|
|
#status { color: #888; flex: 1; }
|
|
button { background: #222; color: #eee; border: 1px solid #555; border-radius: 3px; padding: 2px 10px; cursor: pointer; }
|
|
button:hover { background: #333; }
|
|
#term { flex: 1; min-height: 0; padding: 6px; }
|