A main menu item, News, weather, quotes (actions news, headlines,
weather, quotes for sysops' menus):
- internal/feeds: RSS 0.9x-2.0, RSS 1.0, Atom and JSON Feed read into
read-only message areas (so also NNTP, QWK, the web forum, gopher),
each item its headline, summary and link; conditional GETs,
Retry-After, one post per item by a Message-ID made from its id. A
catalogue of 26 tested feeds: world news, business (SEC), technology,
science (NASA, USGS), government (Federal Register, Congress.gov,
White House, NWS). [feeds], [feed NAME]; bbs feeds catalog|list|read.
- internal/weather: each caller's place (US ZIP codes built in from the
Census gazetteer, towns worldwide by Open-Meteo's gazetteer, or
lat,lon); NWS forecasts and alerts in the US, Open-Meteo forecasts
elsewhere, USGS earthquakes near; serious warnings told at the login.
[weather].
- internal/quotes: an IEX-TP/TOPS decoder, pcap and pcapng readers, IEX's
free HIST file of the last session read as it downloads (16 GB, under
five minutes, resumed when cut off) into a small snapshot, or a live
TOPS feed over UDP multicast. Each caller's list of symbols.
[quotes]; bbs quotes fetch|load|show.
Docs: docs/wiki/News-Weather-and-Quotes.md, the sample, the reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTDuJZo7JNHQEC6M1Y
[acme] gets certificates from Let's Encrypt, ZeroSSL or any ACME CA and
renews them before they run out, in the manner of acme.sh, built on lego
(MIT). [acme NAME] adds more. HTTP-01 (its own port 80 listener or the
BBS's web server there), TLS-ALPN-01 (any TLS server of the BBS on 443)
and DNS-01 (15 providers built in, exec:PROGRAM, or acme.sh's own dnsapi
scripts through acmesh:dns_xx) are supported; renewal follows renew_days
and the CA's ARI; a hook runs after each new certificate.
internal/certs is where every TLS server now gets its certificate: a
file pair read again when it changes, or the ACME client's (cert_file =
acme or acme:NAME, and by default when a TLS server has no files and
[acme] is set). Gemini keeps its pinned certificate and Yahoo its
login.yahoo.com one unless told.
bbs acme list / renew, bbs check lists them, a Certificates page in the
configurator, the sample config, Configuration Reference and a new
Certificates wiki page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSjWGPJDHVw7cyWKvE
Yahoo! Messenger clients sign in with BBS names and passwords on port
5050. The buddy list is the friends list and the ignore list the shared
blocked list; IMs are private messages to and from every route, kept for
one away and delivered at sign-in; Yahoo chat rooms are the BBS's chat
rooms and conferences are rooms of their own.
- internal/ymsg: the pager (VERIFY, AUTH/AUTHRESP, LIST and LIST_15,
LOGON/LOGOFF/ISAWAY/ISBACK/STATUS_15 presence, MESSAGE, typing,
ADDBUDDY/REMBUDDY/GROUPRENAME/CHGRP_15, IGNORECONTACT, chat rooms,
conferences) and the web half (capacity, pwtoken_get/pwtoken_login for
the YMSG 16 login over HTTPS with TLS 1.0 for XP, the room list)
- store: ymsg_keys (the challenge login's two digests, kept like AIM's
and MSN's), MD5Crypt and Yahoo's base 64
- bbs: PublicRooms, for the room browser
- [ymsg] config section, docs/wiki/Yahoo-Messenger.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRfVskEUYFs9gMFCLD
[gemini] serves gemini:// on port 1965: the home page, About this
system, Who's online, a user lookup (/users asks for a name; /~name)
with finger's answer, and the message and file areas the sysop opens,
as gopher shows them. Message lines are escaped so they cannot become
links, headings or preformatting; files go as they are, typed by name.
With no cert_file and key_file, a self-signed certificate for hostname
is made beside the database at the first start and kept, since Gemini
clients trust on first use; bbs check shows its fingerprint.
Gopher's About, Who, Area and OpenFiles and finger's User are exported
so Gemini shows the same content under the same rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSz48BzvGbSP2U45F8
internal/marvel serves the MSN client of 1995 to 1998 over its own
protocol (Marvel), by modem (frontend = marvel on a telnet or raw
listener) or over TCP ([marvel], port 569):
- the serial link (byte stuffing, CRC-32, Go-Back-N with a 16-packet
window and retransmission) and the TCP "straight" records
- pipes, MPC host blocks and tagged parameters, property records
- LOGSRV: sign-in with BBS accounts (as a node), password change, the
billing pages' name and address
- DIRSRV: MSN Central, Categories (a folder per area group), MSN Today
(the boards with the newest posts), Go words, icons drawn here
- the BBS service: each readable message area is an MSN bulletin board,
its messages listed with their reply threading, opened as articles,
posted and replied to from the Compose window (plain, RTF or
compressed RTF, kept as plain text) and deleted by their author
Written from the marvel-msn project's protocol notes and wire captures;
none of its code is used.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSzB4EzF1cUBt1ccvB
[irclink] and [ircpeer NAME] make the BBS a server on an IRC network,
speaking TS6 (Solanum, charybdis, ircd-ratbox; ircd-hybrid 8 with
protocol = hybrid). It is a hub: it takes any number of links, in and
out, keeps the network's map, routes between them, and tells the others
of a netsplit.
Every BBS user online is a user on the network, whom anyone there can
/msg and /whois; the rooms beginning irc- are its channels. A nick that
is taken when a BBS user comes on, or when a link comes up, is the BBS
user's as Nick|Tag (cut to the network's NICKLEN, numbered if taken);
collisions between other servers' users follow the TS6 rules.
The chat core takes several relays (MRC and the IRC link together),
relays that list members elsewhere and reach people by name; the BBS's
IRC server shows the network's users in NAMES, WHO, WHOIS and ISON and
messages them, and /msg NICK in the chat does too.
Tested against Solanum (main) and ircd-hybrid 8.2.43 (TestLive).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUWrohwtnaPDvybZ5h
internal/aol serves AOL's own clients over P3: each token the client
sends is handled, and the host answers with atom streams compiled from
FDO91 source.
- Dd, the Welcome form's screen name and password (its two de_data),
is a BBS login (Authenticate, throttled and logged as any); the client
becomes a node, is taken online (async_online, its main window 32-296)
and shown the BBS's Welcome window. A failed one gets an alert and
async_force_off; "New User" is told to join by telnet or the web.
- pE (Sign Off) is answered with XS, the host's sign-off.
- Other tokens are answered with uni_wait_off, so the client doesn't
wait on them, and are logged; before sign-on they're ignored.
- Streams go as aT in one packet, or at pieces with one 4-byte id when
long; a stream the client spreads over packets (4.0) is put together.
[aol] turns it on, at :5190 by default. When [oscar] listens there too
the two share the port: OSCAR hands over connections that begin as P3.
Tested with a scripted client (sign-on, refusals, sign-off, long
streams both ways) and through OSCAR's port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRm1WrfJdB863kw36V
MSN Messenger 1.0 to 4.7 and Windows Messenger 4.x sign in with BBS
names and passwords on port 1863. The contact list is the friends list,
the block list a new blocked list shared by every route (chat's /block
and /unblock, MSN's Block); private messages to and from IRC, AIM and
terminal users pass through switchboards, and kept messages are rung in
at sign-in.
- internal/msn: notification server and switchboards on one port
- store: msn_keys (MD5 digests kept like AIM's) and blocks tables
- bbs: blocks refused in TellUser and Message; /block, /unblock
- oscar: IMs to a user who blocks the sender are refused
- [msn] config section, docs/wiki/MSN-Messenger.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTgFq9vbzTWgK3XYQL
- internal/timesync: a clock that follows time servers (the median of
their offsets) and can set the system clock; an NTP server with NTS;
an NTS-KE server; a PTP grandmaster (multicast, and unicast
negotiation) and a PTP client; kernel or network-card timestamps.
- [time], [ntp], [nts] and [ptp] sections, the UDP ports bound as root
and handed down, and bbs time to ask servers once.
- Go 1.26 (facebook/time, the protocols' packets, needs it).
- Tested against chrony 4.5 (NTP and NTS, both ways) and linuxptp 4.0
(multicast and unicast, both ways).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUxvTP6EhwNZTADjqy
The E-mail wiki page (addresses, folders, a smarthost or direct delivery,
DNS, the MX and LMTP), the mail sections in bbs.conf.sample, SMTP's 530
for mail before a login, and the TODO section done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVPRbt1YgtG7eQJZxD
[oscar] serves AIM and ICQ clients on port 5190, as a front end on the
same chat core as the IRC server: buddies are BBS users online by any
route, an IM is a private message (a PRIVMSG to an IRC user), and a chat
room is a BBS room, an IRC channel.
- FLAP, SNACs and TLVs; logins by the signon frame (roasted passwords:
AIM 1-3, ICQ, Java AIM) and by BUCP (MD5, weak and strong digests); the
BOS and the services' connections by cookie, all on the one port
- BOS: rate classes, versions, self info, idle; locate (profiles, away
messages, capabilities); the client-side buddy list and the server-
stored one (feedbag/SSI, kept in a new feedbag table); permit/deny
lists and modes, ICQ invisibility; IMs on channels 1, 2 (rendezvous
passed between AIM clients, chat invitations as lines to others) and 4,
typing notices, host acks
- chat navigation and chat rooms (exchanges 4 and 5) as BBS rooms
- ICQ: numbers are uin_base plus the account's id; family 0x15's offline
messages (none), short and full info, searches by number and name
- a connection beginning with P3's sync byte goes to Server.P3, for an
AOL front end on the same port
BUCP digests can't be checked against bcrypt, so while [oscar] is set up
each account keeps a fixed auth key and its two digests (oscar_keys),
made when the password is set or checked in the clear and bound to the
password hash. The chat core gains WatchPresence (users coming and
going) and Throttle; bbs gains AuthenticateBy for digest logins.
docs/wiki/AIM-and-ICQ.md describes it.
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTAJGnEAiwGZm9ygpG
A listener with frontend = compuserve serves the CompuServe Information
Service on the BBS's users: Host Name, User ID (an account's number as a
CompuServe ID, or its name) and Password, ?LOG codes, ESC I terminal
identification, the banner and logoff text, and the ASCII service's menu
and article pages with GO, FIND, T/M/B/F/R/N/P, SET and ; chaining. CIM
clients are told ?LOG CAI until the HMI service is built.
internal/xfer/cisb.go is CompuServe B, Quick B and B Plus, the host's side
and the terminal's: ENQ start, + parameter negotiation, quoting, all four
check methods, a send window with ENQ resynchronization, downloads and
uploads. Tested against the spec's checksum and CRC values and over a
noisy loopback.
docs/cis holds the research and design behind it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
docs/wiki/Configuration-Reference.md lists every section and key of
bbs.conf with its help, default, examples and whether it is live: the
configuration editor's catalog of bbs.conf.sample, written by
go generate ./internal/confedit (confedit.Reference). A test, and the
Pages build, fail when the committed page isn't the one the sample
makes. The sidebar and Configuration link it.
mkdocs.yml builds the wiki's pages into the site with brand's shared
theme (Zensical); page.html URLs keep the wiki's links (Configuration,
SSH#keys) working, as GitHub Pages serves page.html for /page. Home is
the home page. .github/workflows/pages.yml calls brand's site workflow:
a pull request builds it, main deploys it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
bbs backup makes one archive (bbs-YYYYMMDD-HHMMSS.tar.gz) of bbs.conf,
the database and the files' directories, while callers are on: the
database as a SQLite file whatever its engine, taken whole at one moment
(SQLite's by VACUUM INTO, a server's in one read-only repeatable-read
transaction: store.Snapshot). It is written beside its final name and
renamed when whole; past [backup] keep the oldest go.
[backup] says where (beside an SQLite database by default), when (at =
HH:MM, daily, in serve), how many, and whether the files go too; it is
live at a reload. bbs backup list, and bbs backup restore ARCHIVE -yes
with the BBS stopped: each thing put where this system's configuration
says, what is there renamed aside (.before-restore-STAMP), a server's
database copied into a new empty one; an archive whose names climb out
is refused before anything changes.
The configuration screens' Maintenance has Back up now, the backups
made, and [backup]'s keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Boards by directory with anonymous posts and images: thumbnails made
in Go (JPEG, PNG, GIF, WebP, told by their bytes), JPEG metadata
stripped, duplicates refused by MD5. Threads bump until a bump limit,
sage, image limits, pruning off the last page, stickies and closed
threads. Tripcodes are 2channel's (a DES crypt(3) of our own, checked
against libc's) and secure ones; greentext, >>quotes with backlinks,
cross-board links, spoilers and code. Index, thread pages, catalog,
password deletion, reports; staff (sysops, a board's mods) delete,
ban by address or range, and post with capcodes. Yotsuba, Yotsuba B,
Futaba, Burichan, Photon and Tomorrow styles, and 4chan's read-only
JSON. bbs chan board|ban on the command line; [chan] in bbs.conf.
[http] trusted_proxies: requests from those take their caller's
address from X-Forwarded-For (Forwarded, X-Real-IP), the last hop that
is not a trusted proxy, for rate limits, logs, the deny lists and the
image boards' bans; a proxy's connections are not held to max_per_ip.
secure_cookies for TLS at the proxy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The HTTP API's server serves /forum/ (and / when it is on): the areas as
categories of forums, topics and posts with their authors beside them,
laid out in the manner of Invision Power Board 3's default skin with CSS
of its own (no code or assets taken from it, no scripts on the pages).
- store: messages carry their topic (thread), set on posting, found for
messages from before, mended when a topic's first post or a reply's
parent goes; per-user topic read marks; topic lists and counts
- forum: board index with groups, statistics and who's online; area
topic lists with unread marks and pages; topics with quotes, likes
(the BBS's votes), polls, deleting, replies; new topics with polls and
aliases; profiles, search, who's online, login and sign-up
- logins are the API's session tokens in an HttpOnly, SameSite cookie;
every logged-in form carries a CSRF token; strict CSP, no framing
- [http] forum and forum_guests settings
- bbs.WrapBody: text typed in paragraphs (the forum, the API's posts and
mail) wrapped to the terminals' 79 columns instead of cut, quotes
carried onto wrapped lines
- docs: Web-Forum wiki page, configuration, HTTP API, development
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/mrc joins the BBS to MRC as its own connector: one connection
to the MRC server ([mrc]: address, TLS) carries all its users. The
chat rooms beginning mrc- are MRC's (mrc-lobby is its lobby), so
callers on terminals, 3270s, the web and IRC (#mrc-lobby) chat with
other BBSes there under their names.
The protocol is as Synchronet's mrc-connector.js and mrc-session.js
speak it: the SYSTEM~PLATFORM handshake, INFO, IMALIVE and
CAPABILITIES; IMALIVE to the server's PING; each user's IAMHERE every
minute, NEWROOM:old:new, arrival and leaving notices, LOGOFF; lines as
<name> text and actions; Mystic's pipe colors taken out of what comes.
!COMMAND in a room goes to the MRC server, its answer to the asker
alone; private messages likewise. A dropped line is retried, those
here put back. [mrc] require limits who may go in.
The chat hub gains a Relay: told of joins, leaves and lines in the
rooms it carries, giving them what comes (RelayEvent, RelayTo). On
IRC, MRC's users show as nick_Site!mrc@site, and room notices go to
the channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/ircd serves IRC ([irc]: plain and TLS listeners, limits at
once and per address, the deny list and bans). Users log in with
their BBS names and passwords, by SASL PLAIN or PASS name:password,
throttled and hack-logged like any login; their nicks are their names.
Each connection is a node (via irc): in who's online, reached by node
messages, thrown off by the sysop.
#ROOM is the chat room ROOM: IRC clients talk with callers on
terminals, the web and the API. PRIVMSG to a nick is a node message;
/me is an emote; pages, mail and notices come as NOTICEs, and a sysop
answers a page by joining #sysop-N. NAMES, WHO, WHOIS, LIST, ISON,
USERHOST, MOTD, LUSERS; IRCv3 sasl, server-time (history replayed on
join with its times), echo-message, multi-prefix, userhost-in-names.
The protocol's parts are ergo's: messages read and written by its
irc-go library (ircmsg, ircreader, ircfmt), the numerics and the
ISUPPORT list taken from its source under the MIT license
(internal/ircd/LICENSE.ergo). A node may now be in several rooms at
once (JoinAlso, SayIn, Part) for IRC's channels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/qwk reads and writes QWK packets and REPs: MESSAGES.DAT's
blocks, CONTROL.DAT, conference and personal indexes (MBF floats),
QWKE kludges for long names and subjects, CP437 text.
A caller's packet holds their unread mail (conference 0) and the new
messages of the areas in their new scan (an area's ID its conference);
they count as read only once the packet has gone. A REP's messages are
posted and mailed as the caller, with their access checked; one brought
twice posts once (qwk_seen, kept 90 days). BBSID: qwk_id, or made of
the name.
Offline mail is O on the main menu (qwk in the sysop's menus): by
X/Y/ZMODEM or Kermit on the text BBS, IND$FILE GET and PUT on a 3270,
/qwk over FTP, and GET /api/v1/qwk, POST /api/v1/qwk/rep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A sysop's main menu has * (and custom menus a sysop action), on every
terminal:
- Watch a node: what a text caller is sent, as it is sent (the text
terminal's connection echoes to bbs.Node.Echo; a slow watcher misses
some, never slows the caller). A key stops; the caller leaving ends
it. Text terminals only.
- Chat with a node: the caller is told and taken into a private chat
(their page's room) at their next menu; the sysop waits there.
- Kick a node.
- Users: level, flags, lock, sysop rights, a new password (not one's
own lock or rights).
- Statistics: totals, and calls, new users, posts and uploads for each
of the last 14 days as bars.
- The bans (lifted by number) and the hack log.
- Scheduled events ([event NAME]: a program run without a shell, daily
at a time or every N minutes, with a timeout; internal/events): when
they run next, the last run's end and output, run now.
- Available: whether pages reach the sysop; when not, a caller who pages
may leave a message.
The API: GET /admin/events, POST /admin/events/{name}/run, PUT
/admin/available. Sysop-Tools is the wiki page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A script (scripts_dir/NAME.js, run by a menu's script:NAME, and logon.js
after each login) draws the BBS's shared screens through ui (menus,
tables, forms, panels, messages, the editor, confirmations), so one
script works on text, RIP and 3270 terminals. It acts as its caller,
with their access: msg (areas, messages, posting, mail), node (who's
online, node messages, its activity), user, bbs; and keeps JSON values
in data, for everyone or (data.user) for the caller, in the database
(script_data).
goja runs it in strict mode, with no files, network or processes. A
watchdog stops a script that computes more than two seconds between
screens (the caller's time at a screen is not counted); the caller
hanging up ends a script whatever it catches; failures are logged and
told (to a sysop, with why). Scripts are compiled once, again when
changed; bbs check refuses scripts that do not compile and menus naming
missing ones.
goja is pinned to its June 2026 commit (the last that builds with Go
1.24; it is changing quickly now).
scripts.sample has one-liners and a poll; both are tested, the
one-liners on a text terminal and on a 3270 (s3270). That test found
3270 forms broken since the shared screens: the input field began
under its label's last character, whose attribute byte erased it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
In the message areas, for every front end (internal/app):
- Scan setup (S, PF11): which areas the new scan goes through, kept per
user (scan_off: the areas left out; all are in until taken out).
- To you (T, PF4): the newest 100 messages addressed to the caller, in
any case, in the areas they read, unread ones marked.
- Find (F, PF10): messages whose subject, text or author has the words,
in any case, newest first; LIKE's wildcards are taken as text.
Reading what these found leaves the areas' last-read points as they
were. A 3270's key line closes up when a screen has many actions.
Tested through internal/app and in the store on SQLite, PostgreSQL,
MySQL and MariaDB. Message-Areas is the callers' wiki page for the
areas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Posts and mail on an ANSI terminal (40x12 or more, not a VT52 or a
Commodore) are written on the whole screen: the cursor and editing keys
(Term.EditKey reads them now, where other prompts still drop them),
words wrapping as typed, Backspace and Delete joining lines, ^Y
deleting one, ^Z (or /S on a line) saving, ^X giving up. A reply's
quote is no longer put in the body to cut: ^Q opens a window of the
message replied to, and Enter takes a line from it. Messages from
other nodes wait until the editor is left.
view.Draft gains Quote; the line editor and the 3270's editor begin the
body with it, as before. The profile switches between the full-screen
and line editors (kept as the editor setting).
The editor's text is its own type, tested by itself; an SSH caller
posts, replies quoting and switches editors. Writing-Messages is the
wiki page for the editors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[general] database = takes SQLite's file as before, or a server's
address: postgres://... (pgx) or mysql://... / mysql:DSN
(go-sql-driver). The store's SQL is written once; internal/store's
dialect gives each engine its forms of what differs: ? placeholders
($1 for PostgreSQL), ids returned by RETURNING or LastInsertId, upserts
(ON DUPLICATE KEY UPDATE), INSERT OR IGNORE, GREATEST, booleans, unique
violations, column checks for migrations, indexes. The schema is one
list with types per engine: names match in any case (NOCASE, an ICU
collation made on PostgreSQL, utf8mb4_0900_as_ci), MySQL keeps indexed
text in VARCHARs and connects with the SQL mode the store wants (ANSI
quotes for "read" and "key", strict, rows matched not changed).
Existing SQLite databases are kept as they are.
bbs db copy DATABASE copies every table into a new database of any
engine, keeping ids (PostgreSQL's sequences set after). Logs and bbs
check never show a server's password.
Under go test, BBS_TEST_DATABASE puts every test's store on a
PostgreSQL or MySQL server (a schema or database each, dropped after):
the whole suite passes on PostgreSQL 16 and MySQL 8.4 as on SQLite.
The store's own tests check what the engines do differently, and
copying from SQLite into each.
Also: the FTP tests' readiness probe now waits to be counted out, so the
per-address limit test no longer fails at random.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Users have a level (0-255) and flags (A-Z). [level N] sections say what
a range of levels may do: time online a day (warned at 5 and 1 minutes,
hung up at the end; doors' limits cut to what is left), downloads a day
(counted by every way: the BBS, 3270, FTP, the API), and whether they
may post, mail (else only the sysop), chat, page, download, upload and
open doors.
Requirements ("30 F !X", "sysop") are put on message areas (reading and
posting), file areas (downloading and uploading), doors, menus and menu
items ("x = menu:extras Extras | 50 X"). They are checked in the core,
so the text BBS, 3270s, FTP, NNTP and the API keep them alike: an area a
user may not read is not listed, opened or found by number or
Message-ID.
New users start at new_user_level and are told they wait; the sysop
validates them on the BBS (V on the main menu), by bbs user
waiting/validate/level/flags, or by PATCH /api/v1/admin/users. Users
see their access in the profile and /api/v1/me; no one changes their
own. Drop files carry the caller's level.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/vt asks an ANSI terminal everything at once (ENQ answerback,
DA1, DA2, XTVERSION, its cell size), with a cursor position report last
so the answers are complete when it comes, and reads them into a name
(XTVERSION, SyncTERM's CTerm, DEC models by DA2 and firmware, tmux,
screen, mintty, rxvt, xterm, VTE, the answerback, the VT class), a VT
level, sixel and color. A terminal that is not ANSI is asked ESC Z: a
VT52 answers.
What it said changes what the caller gets: a VT without UTF-8 (not a
PC's CP437 BBS terminal) gets line drawing in DEC Special Graphics and
Latin-1 on a VT220 or later; a DEC monochrome terminal gets bold for
color; a VT52 its own escapes (VT52Writer) with its cursor keys ignored.
Sixel now comes from the same answers. The name shows in the profile,
the log and the API's who (terminal). A listener's vt = no asks nothing.
Also: the terminal type and rlogin's rate are set under the BBS's lock
(who's online reads them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
PETSCII: internal/petscii translates what the text BBS writes for ANSI
terminals (UTF-8, SGR colors, clearing, cursor movement, box drawing)
into the C64's lower/upper case set and color codes, and reads its keys
back (DEL, RETURN, shifted letters). A listener's petscii = yes makes
every caller a Commodore, auto asks a non-ANSI caller to press DEL, and
telnet terminal types like c64 or petscii are believed. Callers get 40
columns (80 for a C128 from the profile): one column menus and lists
that fit. .seq display files are sent as they are; doors are not
offered.
RIPscrip: internal/rip writes RIPscrip 1.54 (MegaNums, drawing, button
styles, buttons, text windows). rip = auto asks BBS terminals with
ESC [ ! and a position report; a RIP terminal gets every menu, built-in
or the sysop's, as a scene of buttons that send their keys, cleared on
a choice, and .rip display files before .ans.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[listen NAME] type = ssh serves the text BBS over SSH. Users log in
with their BBS password (password or keyboard-interactive, throttled
and delayed as on a terminal) or with one of their public keys; the
user "new" gets the BBS's own prompt to sign up. The pty's terminal
type and size go to the text BBS. Commands, SFTP, forwarding and
second sessions are refused.
Host keys (ed25519 and RSA by default, beside the database) are made
0600 the first time and refused when others may read them; legacy = yes
adds CBC ciphers and group1 DH for old clients.
Keys live in a new ssh_keys table and are managed by bbs sshkey
add/list/del, the profile on the text BBS (after the password again),
and /api/v1/me/keys (from a login's session only, not an API key).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[http] serves a REST API under /api/v1 (accounts, message areas, mail,
file areas with uploads and ranged downloads, chat rooms, paging, and
sysop administration including FidoNet polls and news syncs), with
server-sent events and two WebSocket endpoints speaking the bbs.v1
protocol from proto/bbs.proto: JSON text frames at /api/v1/ws and
binary protobuf at /api/v1/ws/proto. Stream clients get a real node,
so web users chat with terminal callers, get node messages and page
the sysop.
Tokens are login sessions or API keys (bbs token add/list/revoke),
stored as SHA-256 hashes, with scopes. TLS by default, per-token and
per-address rate limits, strict bodies, one CORS origin at most,
Prometheus metrics on their own address, and an OpenAPI 3.1 document
checked against the routes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
screens_dir holds display files by name: NAME.ans (ANSI art in CP437,
SAUCE dropped; UTF-8 to UTF-8 terminals, CP437 bytes to the rest),
NAME.asc/.txt (text, paged) and NAME.3270 (text with {color} tags).
logon, newuser, welcome and goodbye are shown by themselves, on text
terminals and 3270s; others by menus. @-codes (@USER@, @NEWMAIL@,
@NODE@, @ONLINE@ ... with @CODE:20@ widths, @CLS@, @PAUSE@) are filled
in, their values cleaned.
[menu NAME] sections: KEY = ACTION Label, actions the built-in parts or
door:, menu:, screen:, area:; [menu main] replaces the built-in main menu
on both kinds of terminal, with an optional screen in place of its list.
[strings]: the login and command prompts, the pause, the logoff question
and the welcome. bbs check refuses menus naming what is not there.
screens.sample: a set of screens to start from. Tested: the screens
package; menus and strings in the configuration; a text caller through
ANSI art, strings, menus and screens; a 3270 (s3270) through colored
screens and the sysop's main menu. Wiki page Customization.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Chat rooms for callers on any node (C on the text menu, Chat on a 3270):
/join, /me, /who, /rooms, /msg, the last lines of a room for who comes
in, a flood limit. A line to one node, from who's online or /msg.
Paging the sysop (S): sysops online and not /busy are told, the caller
waits in a private room, /answer joins it; with no sysop on, page_command
runs (no shell) and the caller may leave a message. On the text BBS,
lines from other nodes show at whatever prompt the caller is at, above
what they type; on a 3270, on the next screen's message line, and the
chat screen refreshes on Enter or PF5.
[finger] (RFC 1288): who is on and who a user is, no addresses, no
forwarding. [gopher] (RFC 1436): about, who's online, and the message
and file areas the sysop opens to it (none by default; bbs check warns),
selectors naming records, not paths.
Also: the TN3270 handoff set the caller's Via while who's online could
read it (a data race the new test found); it is set under the lock now.
Tested: the chat hub; two text callers chatting and paging; s3270 chatting
with a text caller; finger with the finger program, gopher with curl.
Wiki pages Chat-and-Paging and Finger-and-Gopher.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The README's sections become pages (Building, Running, Administration,
Configuration, Modem callers, TN3270, Sixel graphics, Files and FTP, File
transfers, Doors, Newsgroups and NNTP, FidoNet, Security, Development)
with a Home page, sidebar and footer, kept in docs/wiki in the wiki's own
file layout. Administration gains the whole command reference and
Configuration a map of every section. docs/wiki/publish.sh copies them
to the wiki, and the Wiki workflow does it when they change on the
default branch. The README keeps the introduction, a quick start and
links to the pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr