Commit Graph
104 Commits
Author SHA1 Message Date
Claude 1536e00a97 gemini: ask the sysop before making a certificate
The BBS no longer makes a Gemini certificate by itself at startup.
bbs gemini cert asks for the host names (and addresses), organization
and years, shows what it will make and where, and makes it only on a
yes. It will not replace a certificate without -force, and keeps the
old one as .old. Without one, bbs serve stops and says to run it, and
bbs check says there is none yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSz48BzvGbSP2U45F8
2026-11-09 05:25:40 +00:00
Claude 8086ae7690 Add a Gemini server: gopher's capsule and finger's users over TLS
[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
2026-11-09 05:13:55 +00:00
Claude 75e7a341a2 irclink: link with ircu networks by P10
The hub keeps the network by TS6's names, so a P10 link is a
translation at its edge: numerics mapped both ways, its lines taken as
TS6's and ours sent as P10's. Lines between two P10 links go as they
came. Its burst is taken before ours goes (after its END_OF_BURST), so a
BBS user whose nick it has is renamed Nick|Tag first.

[irclink] numeric sets the BBS's P10 numeric; [ircpeer] protocol = p10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUWrohwtnaPDvybZ5h
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-09 02:45:16 +00:00
Claude 22b5d482da Merge main into the TS6 hub branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUWrohwtnaPDvybZ5h
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-09 02:21:27 +00:00
Claude e90c644808 IRC server linking: the BBS as a TS6 hub on an IRC network
[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
2026-11-09 02:03:25 +00:00
Claude a3686b39cd Merge main into e-mail (beside time sync)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUSPBZTX8wShmaLrrg
2026-11-09 01:29:56 +00:00
Claude dc7e74eccd Merge main into e-mail (the AOL host beside the mail sections) 2026-11-09 01:22:43 +00:00
Claude 4c2b7de14e Merge main into time sync (beside the AOL host)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUSPBZTX8wShmaLrrg
2026-11-09 01:22:07 +00:00
NeoandClaude 988e4f85e5 CompuServe: GO DEFAULT and permanent settings, as TAPCIS's ALT-P walks them (#30)
GO DEFAULT (TERMINAL, PROFILE's first choice) is CompuServe's terminal
settings and service options: TERMINAL SETTINGS/SERVICE OPTIONS, then
PERMANENT SETTINGS' Logon/Service, Display, Terminal and Transfer
groups, each setting's screen, and CHANGE PERMANENT SETTINGS Confirm/
Cancel on the way out, laid out as TAPCIS 5.4's PARAMS.SCR transcript.
The settings are kept as cis-* prefs (bbs.RegisterPref lets a front end
add its own).

PAGED, BRIEF, WIDTH and LINES take effect at each logon (not with
;TTY); Mail waiting can go straight to Mail; the online editor sets
Mail's numbering; the protocol preference skips the protocol menu. The
rest are kept and shown.

TestCompuServeDefault replays PARAMS.SCR's sends and waits.


Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 17:19:09 -08:00
Claude e10e4261e3 Merge main into e-mail (MSN beside the mail sections)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUSPBZTX8wShmaLrrg
2026-11-09 01:10:22 +00:00
Claude 877ca82e1d Merge main into time sync (MSN section beside ntp/nts/ptp)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUSPBZTX8wShmaLrrg
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-09 01:07:29 +00:00
Claude 197971e829 Merge main into the AOL host branch (beside MSN Messenger)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRm1WrfJdB863kw36V
2026-11-09 01:06:09 +00:00
Claude e75f4ea03d AOL host: AOL clients sign on with BBS accounts
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
2026-11-09 01:00:22 +00:00
Claude fb3e80c561 Add an MSN Messenger server (MSNP2-7) and a shared blocked list
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
2026-11-08 20:40:33 +00:00
NeoandClaude 0ab1fc735d CompuServe: forums, library lists and Mail to read in CIM (#26)
WinCIM asks for forums and mail with ordinary page requests (CIS:FORUMS,
HOM:MAILHMI, as 24high/CompuServe-Emulator measured), so they are pages
now: the forum list, a forum's sections and libraries, a section's
messages newest first, each message as an article (it then counts as
read), a library's file list, the mailbox (unread marked *) and each
letter (marked read when read).  Pages are made afresh on each request.

Sending mail, posting, downloads and CB in CIM need transactions not yet
recovered; the docs say so.


Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 12:02:04 -08:00
Claude 17cd941f1a E-mail: DNS blocklists for mail from the internet ([mx] dnsbl)
The sending address is looked up in each list at once at the first MAIL
FROM; a listed sender is refused (554 5.7.1, with the list's TXT reason)
and logged.  A list that does not answer, or refuses the query (Spamhaus's
127.255.255.x through public resolvers, logged), refuses no one.  Local
and private addresses, and logged-in submission, are never looked up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVPRbt1YgtG7eQJZxD
2026-11-08 19:57:20 +00:00
NeoandClaude Opus 5.5 434a26e00b listen handoff = yes: the caller's line itself from modemmenu (#25)
* listen handoff = yes: the caller's line itself from modemmenu

A raw unix listener with header = yes and handoff = yes takes the
caller's line with the header (SCM_RIGHTS), as modemmenu's item with
handoff = yes sends it: the session runs on that terminal, nothing
copied between modemmenu and the BBS.  What modemmenu had read and not
used comes on the connection after the header, ahead of the terminal.
The connection then only marks the session's life: logging off closes
it (the line goes back to the menu, its flags as they came), and the
menu closing it (its time limit, the caller gone) hangs the session up.
A header without a line is an ordinary call.

Tests: four callers on handed-over lines at once, each on its own
terminal; logging off closes the connection; the connection closed
takes the terminal away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3

* handoff: a closed or hung-up line ends the call quietly

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3

* oscar test: let bob's arrival come again before Carol's

TestAIMToIRC failed on CI when alice saw a second arrival for bob
before Carol Ann's; the test now passes over repeats of bob's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 09:07:38 -08:00
Claude 831e06bd0e Time: follow NTP, NTS and PTP servers, and serve all three
- 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
2026-11-08 15:09:57 +00:00
Claude 0c5cc56c2f Time: NTP, NTS and PTP (work in progress) 2026-11-08 14:56:57 +00:00
Claude f3a0ee05d9 Merge main 2026-11-08 13:17:45 +00:00
Claude 1f018afa90 E-mail: POP3, IMAP, SMTP submission, inbound SMTP and LMTP, and a queue out
wip: servers, delivery and config; tests to follow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVPRbt1YgtG7eQJZxD
2026-11-08 13:08:26 +00:00
NeoandClaude 237ea990a5 CompuServe: CIM's way in (Secure Login, B+ Transport Layer, HMI pages) (#22)
A CIM client (AP in its ESC I answer) now gets the GUI service instead
of "?LOG CAI", following what 24high/CompuServe-Emulator recovered from
WinCIM 3.0.2:

- Secure Login (+ before the User ID): RA:/RB:/UR:/HR:, checked
  against a key kept from the password (cis_keys, bound to the password
  hash, kept only while a compuserve listener runs), "No." on failure
- the terminal-mode trade: ESC [ > 0 q, ESC [ > 3;3 p, the parameter
  line's sum checked, ACK (NAK and again if wrong)
- xfer.BTransport: the B Plus Transport Layer, counters per direction,
  1 KB blocks, messages as M packets and a final L
- HMI: session open, pages (menus as 0x27, articles as 0x28 and their
  text in pieces), the rest of a menu, Find, the directory lookup, acks,
  logoff; CIS:/HOM: names on the ASCII service's page tree

Forums, Mail and CB in CIM say to use a terminal for now.


Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 05:03:36 -08:00
Claude 3cb79ab2c0 CompuServe CB Simulator on the BBS's chat rooms
GO CB asks a handle (not another member's name) and a channel; channel
n is the chat room cb-n, shared with the BBS's other chat callers.  The
1982 /HELP's commands: /TUN, /MON, /UNM, /STA, /TIM, /UST (the 1986
table, with s for scrambled and Tlk), /WHO, /HAN, /SCR, /SMC, /XCL,
/UNS, /SQU, /JOB, /EXI, plus /TALK, /ROLL and /OFF.  Lines show as
(Handle) text, or (ch,Handle) from a monitored channel.  Chat events
carry the sender's handle (bbs.Node.SetHandle) beside their name, so
other front ends still show the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
2026-11-08 12:40:49 +00:00
Claude e67c5ff3dc CompuServe Mail on the BBS's private mail
GO MAIL enters CompuServe Mail: menu, prompt and command (Mail!) modes,
with the Options and Mode menus and the permanent-settings question that
TAPCIS's PARAMS.SCR answers, kept as cis-mail* user settings.  READ with
Action! after each message, SCAN, COMPOSE, UPLOAD (TAPCIS's
UPL/PRO:B/TYP:ASCII), DOWNLOAD by any protocol, DELETE, ADDRESS (NAME and
a session address book), SET.  Addresses take CompuServe's forms: names,
User IDs, 'Name >NET:addr', INTERNET:ppn@compuserve.com for a member,
FidoNet netmail; other networks are refused.  /GO:MAIL at the User ID
enters it.  The library download's transfer is split out to share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
2026-11-08 12:30:20 +00:00
Claude e3955caa95 Merge remote-tracking branch 'origin/main' into claude/project-thread-eqs2x1 2026-11-08 12:16:30 +00:00
Claude 019b186518 CompuServe forum libraries on the file areas, with B Plus
A forum's libraries are the file areas of its group (file areas get a
group, set by bbs filearea group), numbered from 0.  LIB n opens one at
LIB !: DIR, BRO and SCA list the files the period's way ([ppn],
NAME/binary, date, size, Accesses:, Title, Keywords, description); DOW
sends one by CompuServe B / Quick B / B Plus, XMODEM, Kermit or DC2/DC4
capture, from /PROTO: or the protocol menu, within the BBS's download
limits; UPL takes one, then its title, keywords and description.

The B engine: a TU garbled on the way is sent again on a NAK or silence
(both sides NAKed each other before), a lost ACK of the final TC is not
a failure, and Rest gives what was read past the protocol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
2026-11-08 12:16:30 +00:00
Neo 42d91c6f10 Merge pull request #16 from D-Modem/claude/project-thread-p2z3e6
AIM and ICQ: an OSCAR server on the BBS's chat, beside IRC
2026-11-08 04:10:31 -08:00
Claude ababf5c57d AIM and ICQ: an OSCAR server on the BBS's chat, beside IRC
[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
2026-11-08 12:00:14 +00:00
Claude 01c5a27f76 CompuServe forums on the message areas
GO FORUMS lists a forum for each group of message areas (and one for
those in none), each area a section, at most 18 a forum.  The forum is in
command mode at Forum !, as TAPCIS needs: REA, SCA (and QUICK), BRO with
NEW/ALL/WAI/REV/THR and FROM:/TO:/SUB:/SEC:/DAYS:/STA:, POST with EDIT,
replies, OPT;TYP N for nonstop reading, MES, DES, NEW; message headers in
forum software 4's form (#:, Sb: with thread marks, Fm:/To: with User
IDs, * Reply: footers), and the entry and exit texts.  TAPCIS's command
strings are in the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
2026-11-08 11:34:30 +00:00
Claude 20908882c9 CompuServe front end: logon, ESC I, pages, and the B / B Plus protocols
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
2026-11-08 11:16:10 +00:00
Claude 945a3fa6a5 Use github.com/D-Modem/go3270 directly, no replace line
go3270's module path is now github.com/D-Modem/go3270 (D-Modem/go3270#1),
so bbs requires it under that name and imports it there; the replace
of racingmars/go3270 goes. Build, vet and tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-05 10:52:33 +00:00
Claude 7399e0fa36 Point repository references at the D-Modem organisation
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
2026-10-29 09:02:40 +00:00
Claude 6abf4cf347 Comment and test cleanups
- 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
2026-10-18 22:40:48 +00:00
Claude e70735b708 Text terminals: menu keys checked, VT52 erasing, sheet keys, long bodies
- 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
2026-10-18 22:28:08 +00:00
Claude ca664c88ed 3270: every table note line, long questions wrapped, forms paged
- Table showed only its note's first line, losing e.g. offline mail's
  "By FTP" line; the rest (three at most) now go below it, the rows
  moved down for them.
- Confirm put its Y/N field past the screen's edge for a long question;
  the question now wraps and the field follows its last line.
- Form dropped the fields that did not fit, returning their presets as
  if typed; it now pages them with PF7/PF8, keeping what was typed on
  each page, and returns them all on Enter.

Tested end to end with s3270 through a script's table, confirm and form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-18 22:22:22 +00:00
Claude a4ff918953 Stop spins and races in door telnet, SSH pump, Fido lock, tn3270
- door: telnetClient.Read returns at once for an empty buffer; a failed
  answer to an option is returned by the next Read or Write rather than
  reading on for ever.
- ssh: sshTerm.pump stops once closed when the channel reads nothing
  without error, instead of spinning.
- ssh: makeHostKey removes the key file when Close fails, not only Write.
- fido: flock retries EINTR; Lock retries a failed lock file briefly.
- tn3270: negotiation and its 30s watchdog decide by one flag, so a
  negotiation ending as time runs out keeps its connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-18 22:03:13 +00:00
Claude 8cac5066f6 Doc comments on every function
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
2026-10-18 21:26:18 +00:00
Claude aaabb03ee2 Pictures in programmed symbols on 3270s without vector graphics
Between vector graphics and blocks: the picture cut into character
cells, each one of the 3270's 7 colors (the color that, with black,
comes nearest its pels) and a symbol of its pels, error-diffused over
the whole picture with each pel black or its cell's color.  The symbols
are loaded into the terminal's single-plane sets (LCIDs 0xC2 on) before
the screen, 190 a set, so the picture is as large as its cells fit in
the sets there are (PCOMM: 2 with vector graphics on, 380 cells); a
blank cell needs none, cells alike share one.  A row's runs of a set and
a color are each a Set Attribute of both (go3270's AttributeOnly
CharSet).

A picture's Set Attributes lasted the rest of the screen's write, so the
caption and body after a block picture took its last color: the
attributes are set back after a picture (the character set too after
symbols).  colorTerminal read the Color reply's pair count from the
wrong byte, so PCOMM (a 3278 by its type) was not taken for color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-16 02:46:06 +00:00
Claude 2fa6e2c83f Pictures on 3270s: vector graphics in the terminal's colors, or blocks
An image board's pictures (a post's thumbnail, the image whole) are now
drawn on a 3270 instead of only said in words:

- vector graphics (PCOMM): bitmaps a pel a pixel, error-diffused to the
  terminal's own palette (PCOMM's 16 colors, from the Graphic Color
  reply go3270 now asks for), overpainted (PCOMM's exclusive or does not
  combine blue), cropped and split over segments by go3270's
  ImagePictures; drawn after the screen over cells left empty, since a
  character over a picture clears it in its cell
- blocks (x3270, any color 3270 with graphic escape): ▀ ▄ ▌ ▐ █ in the
  7 colors, a cell two pixels by two, each cell the color and block
  nearest its pixels, a run of a color one Set Attribute

and in words on the rest, as before, under the picture where there is
one.  Pictures on/off (M, PF11) on the profile, kept as the text
terminals' preference is; the profile's terminal line says how they are
drawn.  tn3270_vector is on by default now that PCOMM draws them.

go3270-sec: GraphicColors, DitherBitmaps, ImagePictures, the Query List.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-16 02:22:10 +00:00
Claude a93df6ec7b Sign-in codes: the web without typing a password
Signed in on the BBS, Your profile's Sign-in code (C, PF10) gives a code
(ABCD-EFGH, 40 bits, no 0/O/1/I), good once for five minutes; a new one
ends the last.  The forum's Sign In page takes the code alone; anywhere a
password is asked (web terminal, image boards, API, FTP), it serves once
for the password with the user's name.

Codes are kept in memory as their SHA-256, never logged; a wrong one is
a failed login (throttled, the hack log), a locked account's opens
nothing (BBS.authenticate: the same path as passwords).  SSH keys are now
on the profile of accounts modemmenu made too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-15 01:51:17 +00:00
Claude 710119c4ac One password: logins asked of modemmenu's auth socket
[modemmenu] auth_socket: the accounts modemmenu logs in (external, no
password here) log in any other way (telnet, SSH, TN3270, the web forum
and terminal, the API, FTP, NNTP, IRC) with their modemmenu password:
BBS.Authenticate asks modemmenu's [authd] socket, and modemmenu its
backends (users file, LDAP, SQL, PAM) as at its own prompt.  Nothing of
the password is kept here.

An account with a password of its own here is never asked of modemmenu.
create_users (yes): a user modemmenu knows and the BBS does not gets an
external account at their first login, a name the BBS takes and the
name_deny_file allows.  A wrong password counts as any failed login;
modemmenu not answering is trouble, not counted against the caller.
Connections and modems has the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 22:22:42 +00:00
Claude e9fc5ed156 Run as a user of its own: ports bound as root, then root given up
[general] user (and group): started as root, bbs serve reads the
configuration, binds every socket it listens on (the listeners, TCP and
unix; the HTTP API and metrics, FTP, NNTP, IRC, finger, gopher, binkp),
gives up root (setgroups to the user's groups, setgid, setuid) and
executes itself again, the same process (its PID, for systemd and
reload), the sockets handed down; each server's listen takes the one for
its address (internal/sockets).  Nothing is written as root: database,
logs, host keys, backups and a unix socket without socket_group are the
user's.

Other commands as root give root up first, so the database stays the
user's (but check and config; backup restore puts things back as root
and gives them, but the configuration, to the user).  System
configuration has Run as user and group.

TestRunAs (as root) serves a port under 1024 and a unix socket as
nobody, the same process through a reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 21:28:57 +00:00
Claude 856e31f86f Backups: the SSH host keys too
The SSH listeners' host keys go into every backup (key.NAME), whatever
[backup] files says, and come back with a restore like the rest (what is
there renamed aside): a BBS put back on another machine answers with the
keys its callers' clients know.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 21:17:20 +00:00
Claude 0944798461 Backups: the configuration, database and files, daily or now
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
2026-10-14 20:10:27 +00:00
Claude d0cb9fdaae Configuration: full-screen menus, changes held until F10
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
2026-10-14 19:53:03 +00:00
Claude 6fa851dfdb Configuration screens, offline and online; reload by SIGHUP
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
2026-10-14 18:56:40 +00:00
Claude 34c8757d0d Live settings: snapshot reads through Conf, Reconfigure hooks
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
2026-10-14 18:36:52 +00:00
Claude 114e56c928 Image boards: an archive of pruned threads
As 4chan's, a thread pruned off a board's last page is archived, not
deleted: off the board's pages and catalog, whole, its files kept,
read-only.  No one replies to it, staff neither (store.AddPost refuses
too, for a reply already on its way); its posts are not deleted by
their passwords (staff still can).  Its page says it is archived in
place of the form and its first post wears a badge.

- /chan/b/archive lists a board's archived threads, the last first;
  /chan/b/archive.json is 4chan's (the numbers, oldest first); an
  archived thread's JSON has archived and archived_on, and boards.json
  is_archived
- [chan] archive_days (3; 0: always) is how long they stay: then they
  are deleted with their files, looked to when a thread is made and
  when the archive or the thread is looked at
- a board's archive setting (bbs chan board set DIR archive no) prunes
  as before, deleting at once; boards have one by default, as do
  those of an older database
- the terminals: a board's thread list has Archive (A), to read them;
  archived threads offer no reply

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 18:17:57 +00:00
Claude 56f022c8aa Image boards: Flash (SWF and FLV), played by Ruffle
A board takes Flash when its files say swf or flv (bbs chan board set f
files swf,flv), as 4chan's /f/ did, and [chan] ruffle names Ruffle's
self-hosted package (make ruffle fetches it from npm into ruffle/).

- SWF: FWS and CWS read for the stage, frames, rate and sounds, the
  tags walked as they unpack with nothing kept (a zlib bomb costs no
  memory and is refused); ZWS (LZMA) taken as 550x400 with sound
- FLV: onMetaData (AMF0) for size and length, the tags for sound and
  the video codec (Sorenson, Screen, VP6, VP6 alpha, H.264); ffmpeg
  thumbnails it, a movie gets a card
- sound needs the board's sound; an FLV is held to max_video

Clicking a Flash thumbnail plays it in a sandboxed frame (/chan/flash:
allow-scripts alone, by its CSP and the frame's attribute): no origin,
no cookies, nothing of the page.  The page fetches the file with its own
cookies and hands the bytes over; Ruffle runs with networking, scripting
and links off.  Ruffle 0.7.1 does not play a standalone FLV, so the BBS
makes a small AVM1 movie of its own (/chan/flvplayer.swf: NetStream
into a Video of the FLV's size) that plays it from a blob of the frame.
Ruffle's files are served at /chan/ruffle/ with CORS open (the frame
has no origin), only the package's .js, .wasm and .map.

Played in Chromium with Ruffle 0.7.1: a movie, and a Sorenson FLV with
sound through the player; both frames of origin "null", cookies
refused, no CSP violations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 10:31:03 +00:00
Claude f911e6968a Image boards: WebM, MP4 and PDF uploads
A board takes files besides images when its file types say so (bbs chan
board set DIR files webm,mp4,pdf; sound yes), as 4chan's take WebM and
/po/ PDFs.  Each file is known by its bytes and read before it is kept:

- WebM: its EBML walked for the doc type (webm, not any Matroska), the
  tracks' codecs (VP8, VP9, AV1; Vorbis, Opus), size and length
- MP4: its boxes walked for the movie header and tracks (H.264, AV1,
  VP9; AAC, Opus); HEVC and the like refused, as browsers do not all
  play them
- PDF: whole (%PDF- to %%EOF), its pages counted and first page's size
  found where its objects are not compressed

Videos are at most 4096 pixels a side and [chan] max_video seconds long
(120; one that does not say is refused while there is a limit), and
silent unless the board takes sound.  Thumbnails come from [chan]
ffmpeg (the first frame, the container named to it) and pdftoppm (the
first page), else a card saying what the file is.

In the page a video's thumbnail plays it in place with [Close]; a PDF's
opens it in a tab, served without the boards' CSP (a viewer will not
run under it) and nosniff.  The post form lists what the board takes;
posts say a video's length, a PDF's pages; the JSON has 4chan's
webm_audio and max_webm_duration, and duration_ms, page_count,
file_types.  Terminals show their thumbnails.

Fuzzing the readers found an EBML element head read past its parent
(a panic); fixed, the input kept as a regression case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-14 09:49:11 +00:00