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
- internal/phone reads modem caller IDs with its own tables: the ITU's
country calling codes (shared ones told apart), the NANP's area codes
by state and province, toll-free and other services, and how each
country dials, so national numbers read as [general] phone_country
- [general] geoip (with geoip_credit) is the BBS's country database;
[chan] geoip falls back to it. geoip.File keeps a database file up
to date for both
- bbs.Locate and Node.Place: a caller's place by caller ID, else by
address; the connect log, who's online (the country), the sysop's node
list (number and state) and the API's /who show it
- messages keep the poster's country (messages.country); the web forum
shows its flag by the poster's name in every theme and on Online
Users, with the database's credit at the foot ([http] forum_flags)
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 forum can wear more than one look. A theme is a stylesheet and,
in themes/NAME/, templates of its own for the pages it lays out
differently, parsed over the default's.
- ipb2: a board of the mid-2000s in the manner of Invision Power Board
2's default skin: white page, navy-outlined boxes, gradient title and
sub-title bars, pale blue rows, Logged in as / Welcome Guest bars,
Last Post Info, topic folders, post tables with Member No. and Top,
quote boxes, big blue buttons, Fast Reply, the footer bar. Its own
CSS and templates; no code or images taken from IPB.
- ipb3: the existing look (its stylesheet now ipb3.css)
- a theme chooser at the foot of every page, for guests too, kept in a
cookie; [http] forum_theme sets the forum's own, checked by bbs check
- docs: Web-Forum themes, configuration, development
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
[http] serves /terminal (and / goes there): a page with xterm.js 5.5 and
its fit addon, built into the binary (MIT licensed, license included),
joined by a WebSocket (/terminal/ws, subprotocol bbs.terminal, binary
frames) to the text BBS, run in-process as for a telnet caller: a node
shown as "web terminal", the BBS's own login, ANSI and UTF-8, the size
the page fitted.
The page has a strict Content Security Policy (scripts only from the
BBS, no inline scripts, no framing); the WebSocket is taken only from
the BBS's own pages (or the cors origin), under the HTTP server's TLS,
connection and rate limits. terminal = no turns it off.
The WebSocket's own stream closes the connection when a read deadline
passes, which the text BBS uses for idle time and notices: the line
adapter SSH sessions had (reads with deadlines that only end the read)
now serves both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[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