The receiver sets CANZSTD (0x40) in the ZF1 of its ZRINIT. The sender
sets ZTZSTD (8) in the ZF2 of a ZFILE to send that file as independent
zstd frames (at most 64 KiB of the file each, halved on each ZRPOS).
All positions stay offsets in the file, and the receiver writes and
acknowledges only whole frames, so ZRPOS recovery and resume work as
before. Legacy peers do not set the bit and get plain ZMODEM.
Uploads of a known size that stop early are kept for 7 days and resumed
by ZRPOS when the same user sends the same file again. Downloads seek on
ZRPOS (the download reader did not seek before). A second ZRINIT after
the first is now dropped, so its stale ZRPOS no longer sends a segment
again.
zmodem_zstd in [general] turns zstd off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR1WNeCEtXUcjE8RgY
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
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
File areas become file echoes (bbs filearea echo AREA TAG). TICs from
links are checked (from, password, size, CRC-32, path, dupes), their
files put in the area and passed on to the other links that carry the
echo; files uploaded here are hatched. Replaces removes older files
that came by a file echo. TICs are sent after their files.
nodelist = area:NAME reads the newest file in a file area. Docs cover
bundles, nodelists, AreaFix/FileFix and file echoes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/archive reads ZIP, ARC (stored, packed, squeezed, crunched,
squashed), ARJ (methods 0 to 4) and LHA (-lh0-, -lh4- to -lh7-, header
levels 0 to 2) in Go, with no other programs, and writes ARC, ARJ and
LHA stored. Sizes are checked before memory is given to them and every
entry against its CRC; it was fuzzed, and stressed with 350,000 damaged
archives (none slower than 30 ms). The test archives were made by the
real programs (arc 5.21q, ARJ32 3.10, jlha), and what is written here
passes their own tests.
Bundles from links are tossed whatever their format (known by their
first bytes, not their names); packer = arc, arj or lha bundles in those
(stored). A test packs packets with the real programs, compressing,
where they are installed. The file base lists and takes FILE_ID.DIZ
from ARC, ARJ and LHA archives too.
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
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