The repositories moved from Neo-Desktop to the D-Modem GitHub
organisation: D-Modem-RE is now D-Modem/D-Modem, pico-serial is
D-Modem/hardware, modemmenu (PBX-Modem) is D-Modem/menu, bbs-sec is
D-Modem/bbs and go3270-sec is D-Modem/go3270. Update links, module
paths, submodule URLs and source-location strings to match. Copyright
notices still name Neo-Desktop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
- Comments that named something else now name their own function:
ircd member, imageboard srcPath and linker, forum when, redirect and
errNoArea, textui sheetDraw.first; a stray comment in rest.go gone.
- confui: changeLines uses diffLines instead of repeating it.
- nntp: accept_from names are looked up when the configuration loads
(start and reload), now said in the code and the wiki.
- Tests: tnClient.read grows its buffer for a command split at its end
(a full buffer read nothing for ever); freeAddr folded into freeTCP;
zipOf is a helper.
- go3270-sec 6c7224e: its comment fixes and gfxtest tidying.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- Menu takes only an item's key (returned as the item has it), asking
again for any other without redrawing, as a 3270 does; Enter is still
"" (none chosen: Back would log off from the top menu). view.UI's
Menu doc says so.
- VT52: ED 1 (erase up to the cursor) was sent as ESC J, erasing below;
it is dropped now, as EL 1 is. EL 2 erases the whole line from its
start; ED 3 clears like ED 2.
- A sheet's key line leaves out 3270 PF-only keys instead of writing a
NUL for them.
- The full-screen editor cuts a body longer than its line limit.
- keyLabel's unreachable branch removed; setTranslator's comment notes
that Flush settles the old translator (it already did).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Every function and method, tests included, has a doc comment: what it
is or does, what it returns and anything a caller needs to know. Only
comments are added; gofmt split a few aligned blocks of one-line
functions once each had its own comment. The generated protobuf code
is left as protoc writes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The configuration screens are menus by what a sysop looks for: Board
(names, location, postal address, dial-in numbers, internet addresses,
what callers see, menus and prompts), System (database, log, file
locations, security, scheduled events, every section), Connections and
modems (modem lines, listeners, login limits, caller ID, GeoIP), Services
(telnet, TN3270, SSH, RLogin, finger, gopher, FTP, IRC, news, the web,
MRC, FidoNet, QWK networks, doors), Users and groups (accounts and
access levels) and Maintenance (disk space, what areas keep, old
messages taken out, the image boards' archive, backups). Running as
another user, PAM, LDAP and database and file backups are shown as not
available yet.
Nothing changes until F10 (or Save and exit): changed lines are marked
and counted; then the file is checked and written, the accounts' and
areas' changes made, and on a running BBS the live ones put in force.
F9 (or Quit without saving) leaves it all, after a yes.
view.Sheet is the full-screen page: drawn with the cursor keys on ANSI
terminals (the terminal now reads F1-F12), with fields and PF keys on a
3270, as numbered lines elsewhere. [general] gains postal_address,
phone and addresses, in the system info and as @POSTAL@, @PHONE@ and
@ADDRESSES@.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
bbs -config FILE config is screens on the local terminal for bbs.conf:
its sections and keys, each with the sample's comment on it, its default
and examples, and whether it takes effect at once or at a restart. The
same screens are the sysop's tools' Configuration (F), on text terminals
and 3270s. Keys are edited in place, unset, or taken from the sample's
examples; sections made (uncommented where the file has them commented
out), renamed and deleted (commented out). The file is checked as the
BBS would read it, written whole with its permissions and owner kept and
the old one as bbs.conf.bak, and not over a file changed since it was
read. config get/set/unset do a key at a time, for scripts.
internal/confedit edits the file as a sysop would by hand: every comment
kept, a new key below the sample's example of it. Its catalog is read
from bbs.conf.sample (embedded); a test keeps every key the loader reads
in the sample, which gained comments where keys had none.
SIGHUP (ExecReload in bbs.service.sample), or writing on the sysop's
screen, reads the file again and puts in force what may change while
callers are on: [general]'s names, texts, limits, timeouts, GeoIP and
levels, [level], [menu], [strings], [chan] (but dir) and the forum's
options; the rest is logged as waiting for a restart. A file the BBS
would not start with changes nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The BBS, image boards and forum read their settings through an atomic
snapshot (Conf, conf, opts), so a new configuration can be swapped in
while callers are on. Menus and [strings] swap the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The text BBS and 3270s have the image boards (B on the main menu, or a
menu's boards): the boards, threads by bump order, posts read as
messages with who posted, the thread, and the posts that quote them.
Callers post as the web's posters do (names, tripcodes, sage, staff's
capcodes), through the same checks: posting is now Submit, shared by
the web's form and bbs.ImageBoards. A thread's image comes by the
terminal's transfer protocol.
Pictures (view.Picture, on messages and panels) are shown as well as
the terminal can: kitty's graphics protocol (kitty, Ghostty), sixel,
iTerm2's inline images (iTerm2, mintty), or coloured half blocks in 256
colours on other UTF-8 terminals; described in words elsewhere and on
3270s. V shows the image whole; pictures on/off is on the profile. The
web terminal has xterm.js's image addon, so sixel there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A menu's title and labels now carry their tags, marked, to the front
ends as its prompt does. A text terminal shows them as its escape
sequences, each label fitted to its column by what shows (screens.Fit:
marks take no width) and ending plain so its colors stay in it. A 3270
shows a label's colors as a .3270 line's (spanFields, shared with
lineFields), and its title plain; a RIP terminal's buttons and Who's
online get them plain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Text screens (.asc, .txt), the [strings] and a menu's prompt take tags
such as {clear}, {pause}, {red}, {on blue}, {bright}, {underline} and
{reset}, as .3270 files take {color}: ANSI escape sequences on an ANSI
terminal, bold alone on one without color, a Commodore's colors through
the PETSCII translator, the clears and cursor moves on a VT52, nothing
on a plain terminal. A 3270 shows a text screen's color tags as its
colors and drops the rest, and .3270 files take the text terminals'
names (magenta, cyan, reset) and {clear}/{pause} too.
Only the sysop's text has tags: values of @-codes (a caller's name) are
never read for them. Strings carry their tags to the terminal as
control-character marks, which values cannot contain, and are dropped
wherever they cannot be shown (Who's online, the 3270). .3270 lines now
take their colors from those marks as well, so a caller named "{red}"
no longer colors a 3270 screen.
Text screens keep their lines' indentation (it was trimmed), and a line
holding only a clear or a pause leaves no blank line.
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
- Last callers (L, and a callers menu action): each login is recorded
(calls: the newest 10000 kept); GET /api/v1/callers.
- Feedback to the sysop (K, a feedback action): mail any caller may
send, whatever their level allows.
- The user list picks a user: their details (a sysop sees their access
and files too), and mail to them from there.
- A line about oneself, on the profile (Y; - clears it) and PATCH /me's
about, shown with one's details.
- Expert menus (the expert setting, X on a text terminal's profile): a
menu is its prompt, "Command (? for the menu): ", and ? shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[security] in bbs.conf (internal/guard):
- deny_file: addresses and networks (IPv4, IPv6, CIDR) whose
connections every service closes at once: the terminal listeners and
SSH, FTP, NNTP, the HTTP API, finger, gopher and binkp. Read again
when it changes; bbs check warns of bad lines. Unix-socket callers
(modem servers, menus) are never refused.
- ban_minutes: an address the login throttle turns away is banned from
every service for that long. The API lists bans and lifts them.
- name_deny_file: name patterns (* wildcards, any case) no new account,
nor one an upstream menu makes, may take; the text BBS says so as the
name is typed.
- hack_log: failed logins and the names tried, locked accounts,
throttles, bans, refused connections and names, one a line; the API
shows its end.
A telnet or raw listener with tls_cert and tls_key is telnet over TLS
(1.2 or later; port 992), with 15 seconds for the handshake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- FILE_ID.DIZ: an archive uploaded by any way (the BBS, IND$FILE, FTP,
the API, the CLI) is described by its DIZ, kept as the file's longer
description (CP437 decoded, colors and control characters out, at
most 20 lines); its first line that says something is the description
unless the uploader gave one.
- Archives: what is in a ZIP, tar or tar.gz, from a file's details (V,
PF6) and GET /files/{id}/listing.
- New files since the caller's last call (N, PF5) and finding files by
name and descriptions (F, PF10), across the areas they may see; the
API's GET /files?since= and ?q=.
- A batch: files tagged (T, by numbers such as 1 3 5-7, or from a
file's details) download together by YMODEM, ZMODEM or Kermit; a file
counts once the protocol has gone on past it. Frontend.Download takes
a list of files.
- Ratios: [level] ratio and ratio_free (files downloadable for each
upload, and before the ratio counts), checked with the day's limit for
a whole batch. Users' lifetime downloads and uploads are counted.
The store gains a {plain} token: PostgreSQL's LIKE refuses the
case-insensitive collation of {name} columns. Tested on SQLite,
PostgreSQL, MySQL and MariaDB.
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
What a caller switches on their profile (ANSI, UTF-8, sixel, RIP, a
Commodore's width) is kept with their account as settings (users.prefs,
"key=value" pairs) and applied after the next login: ANSI and UTF-8 as
set, sixel and RIP kept off when turned off and on only where the
terminal has them. An editor setting (full or line) is there for the
full-screen editor.
The API shows them at GET /me and changes them with PATCH /me ("":
forgets one); unknown settings and values are refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The screens after the login (menus, message areas, reading and
writing, mail, file areas, who's online, the user list, system info,
the profile and SSH keys, validation, paging the sysop) were written
twice, once for text terminals and once for 3270s. They are now
written once in internal/app, as descriptions in internal/view's terms
(menus, tables, messages, forms, panels, drafts), and each front end
draws them its own way: prompts and keys a page at a time (RIP buttons
for menus) on a text terminal, fields and PF keys on a 3270.
What only a front end can do stays with it, behind app.Frontend: the
logins, display files, chat, doors, transfers (protocols, or IND$FILE),
the terminal's line on the profile and the goodbye.
The 3270 gains what it lacked: the main menu by letter like the text
BBS's, a new scan, messages to other nodes from who's online,
validation, SSH keys, editing and removing files, paging with a
message left when the sysop is away. The text prompts are as before.
Tests: internal/app driven by a scripted front end; the column layout
and text key labels; a 3270 (s3270) through areas, posting, reading
and the profile, with a text caller reading its post.
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
A Commodore's terminal answers no question, so petscii = auto no longer
asks every caller that is not ANSI to press DEL. Such a caller is
watched while it logs in, its logon screen and name prompt in capitals
(which a C64 and anyone else both read):
- a key only a Commodore has (DEL, cursor keys but down/XON, F1-F8, CLR,
a shifted letter not followed by a UTF-8 continuation byte) switches
to PETSCII at once: the screen cleared, with the questions' leftovers,
and the logon and name prompt again;
- a name in lower case is ASCII, with nothing asked;
- a name all in capitals brings the DEL question; a Commodore's DEL
makes it PETSCII and the name is taken in lower case, as typed.
What is not settled by the end of the login is ASCII.
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
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
[door NAME] sections configure door programs for text callers: the BBS
writes DOOR.SYS, DORINFO1.DEF, DOOR32.SYS and CHAIN.TXT into the node's
directory and joins the caller's line to the program (pipes or a pty),
translating CP437 for UTF-8 terminals, with a time limit, idle limit and
hangup handling, single-caller doors and a cleanup command.
doors/dosemu2 builds dosemu2 from source in Docker, with a rundoor
wrapper putting the caller on COM1 behind dosemu2's FOSSIL; it is still
being tested.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Message areas given an echo tag are FTN echoes; mail addressed to
Name@zone:net/node is netmail, and netmail for this system arrives as
private mail that Reply answers. The BBS is its own tosser and scanner
(Type 2+ packets, ZIP bundles, MSGID/REPLY threading, SEEN-BY and PATH,
character sets by CHRS, dupe and loop checks, forwarding between links)
and mailer: binkp answering and calling, with CRAM-MD5. An area that is
both an echo and a newsgroup gates between them. bbs area echo and
bbs fido poll|scan|toss administer it. Tested between BBSes and against
binkd and CrashMail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Message areas given a newsgroup name are served over NNTP (RFC 3977,
AUTHINFO, STARTTLS/implicit TLS) to newsreaders, and exchanged with peer
news servers: pulled by GROUP/OVER/ARTICLE, pushed by IHAVE (POST
fallback), fed by IHAVE from accept_from addresses. Loops are stopped by
a Message-ID history and Path; BBS posts become MIME articles, incoming
articles are kept raw and shown decoded and cleaned. bbs area newsgroup
and bbs news sync administer it. Tested with nntplib, two peered BBSes
and INN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/xfer has the protocols, both ways:
- XMODEM: CRC or checksum as the receiver asks, 128 or 1K blocks
- YMODEM batch: names and sizes in block 0, sizes kept exactly
- ZMODEM: hex and binary headers, CRC-16/32, ZDLE escaping; sent in
32 KB segments ended by ZCRCW, so a ZRPOS costs at most a segment
and nothing is read while streaming; refused files are skipped
- Kermit: short packets, control quoting, 8th-bit prefixing and repeat
counts as agreed, block checks 1, 2 and 3
Each has timeouts and retry limits, and takes no more than the upload
behind it allows. Tests run them against lrzsz (sx/rx, sb/rb, sz/rz)
and C-Kermit (over a raw socket), both ways, and ZMODEM over a line
that damages bytes.
In the file areas: D downloads a file, U uploads into an area (names a
terminal program sends lose their paths and odd characters; XMODEM
asks for one), then asks for descriptions. The transfer uses the
terminal's buffered reader, so nothing typed ahead is lost, and the
line is let settle afterwards. Telnet in binary mode now keeps a NUL
after a CR (it is data there); a telnet client that refused binary
mode is warned that X/Y/ZMODEM will likely fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
File areas hold files: records in the database, contents in files_dir
under the record's number, so no name a user gives becomes a path.
Callers browse them from the text BBS (F) and on 3270s (8): the files'
size, uploader, downloads, SHA-256 and where to fetch them; uploaders
and sysops edit descriptions and delete.
[ftp] runs an FTP server (fclairamb/ftpserverlib) whose file system is
the areas: / lists them, an area its files, nothing else exists. Users
log in with their BBS name and password, through the BBS's own check
(fail delay, throttling by address). They download anything, upload
new files into areas that take them (names checked, max_file_size and
a daily upload_quota, written to a temporary file and hashed before
they are recorded), and delete their own; overwriting, appending,
resumed uploads, renames, directories, SITE and MFMT are refused.
Active mode is off, data connections must come from the control
connection's address, and tls = required (the default) refuses USER
before AUTH TLS; implicit, optional and no exist, the last two with a
warning. anonymous = yes lets anonymous download. max_clients and
max_per_ip limit sessions.
bbs filearea add|del|list and bbs file add|list|del look after them;
bbs init makes an Uploads area. Go 1.24 is needed now (the library's).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Every ANSI terminal is asked for its device attributes (CSI c) and its
cell size in pixels (CSI 16 t); one that has sixel (attribute 4) sees
the logo as a picture above the system's name: [general] logo, a PNG,
or the name drawn in a pixel font, fitted to the window. Callers turn
it off or on in their profile. Listeners have sixel = auto (telnet's
default) or no (raw and rlogin: modem lines are slow).
The encoder (internal/sixel) keeps a picture's own colors up to 255
and dithers to the web-safe palette beyond, leaves transparent pixels
as the background, run-length codes, and keeps register 0 black for
decoders that fill unset pixels with it; a test decodes its output
with ImageMagick. The logo's PNG and pixel font move to internal/logo,
shared with the 3270 logo; the PNG's size is checked before it is
decoded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
One telnet port serves both kinds of terminal: a client that says it is
a 3270 (IBM-327x, IBM-DYNAMIC) is handed to go3270 and gets full 3270
screens with PF keys; any other gets a text BBS with ANSI color where
the terminal has it. Modem callers come through the D-Modem suite:
app_dmodem's mode = tcp on a raw port, or modemmenu by rlogin, telnet,
or a unix socket whose session header (MODEM_*/DMODEM_*) gives the
call's details and, trusted, the user modemmenu logged in.
Message areas, private mail, who's online, the user list, profiles and
self-service sign-up, in SQLite. User text is cleaned of escape
sequences and control characters before it is stored and shown;
passwords are bcrypt; logins are delayed, limited and throttled per
address or caller ID; every step has a size limit and a timeout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr