sb0t includes a built-in browser chat interface called ib0t — a WebSocket-based server that runs alongside the main Ares TCP listener. When enabled, users can open your room’s URL in any modern browser and appear as fully-fledged room participants, right alongside Ares desktop clients, without installing anything.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AresChat/sb0t/llms.txt
Use this file to discover all available pages before exploring further.
How ib0t Works
When a browser makes an HTTP connection to sb0t’s port,ServerCore.ServiceWebSockets() detects the incoming HTTP upgrade request. The server parses the WebSocket handshake headers, computes the correct reply using WebSockets.Html5HandshakeReplyPacket(), and upgrades the connection to a persistent WebSocket session.
Once the handshake is complete, the client and server exchange plain-text messages using a structured ident:args protocol. Every message from the browser is split at the first colon: everything before it is the ident (command name) and everything after is the args (payload). WebProcessor.Evaluate() dispatches each message to the appropriate handler:
WebOutbound:
UserPool.WUsers and share the same virtual room partitions (Vroom) as Ares desktop users. A web user joining is broadcast to all desktop clients via TCPOutbound.Join(), and all desktop clients are broadcast to the newly-arrived web user via WebOutbound.UserlistItemTo().
Enabling Web Chat
In the sb0t GUI, navigate to Settings → Web and setenabled to true (Settings.Get<bool>("enabled", "web")). The web client shares the same TCP port as the Ares listener — no separate port needs to be opened.
Timeouts
The main server loop enforces three connection deadlines, checked every 25 ms inServiceWebSockets():
| Phase | Timeout | Behaviour |
|---|---|---|
| WebSocket handshake | 10 seconds | Connection is dropped if the HTTP upgrade does not complete within 10 s of the socket being accepted |
| Login | 15 seconds | Connection is dropped if the client connects but never sends a LOGIN message within 15 s of the handshake completing |
| Idle | 2 minutes | A fully logged-in user is disconnected if no PING or other message is received for 120 s |
Channel Push
Every 20 minutes,ChannelPusher.Push() runs in a background thread to advertise the room to web-channel search nodes. It POSTs the server’s local IP, port, room name, and topic to the configured channel-push URL:
Settings.Get<String>("url", "web"). The initial push fires on the first server loop tick — channel_push_timer is pre-initialised to Time.Now - 1200000, so the condition time > (channel_push_timer + 1200000) is satisfied immediately without waiting 20 minutes.
Extended Protocol Features
Browser clients that report a protocol version>= 2000 are flagged as Extended. Extended clients receive additional data at login that basic clients do not:
- Avatars of existing users (
AVATARpackets, image bytes Base64-encoded) - Personal messages of existing users (
PERSMSGpackets) - Font colour data of Ares users (
FONTpackets —oldNandoldTcolour bytes fromAresFont) - The bot’s personal message (software version string)
- The server avatar (if one is configured)
HTML Style Template
The HTML template and CSS served to web clients is loaded from
%AppData%\sb0t\<app-name>\Style\. You can customise the look of the chat interface by editing the files in that directory. Changes take effect for the next browser request without restarting the server.Connection Limits and Flood Protection
sb0t applies the same join-flood guard and per-IP limit to web clients as it does to Ares desktop clients:- Maximum 4 connections per external IP — a fifth connection attempt from the same IP is rejected with
RejectedMsg.TooManyClients. - Join flood detection — repeated joins within a short window trigger
RejectedMsg.TooSoon. - Message flood control — once logged in, every inbound
identis passed throughFloodControl.IsFlooding(); detected floods fireEvents.Flooding()and, if not cancelled, disconnect the user.