release v0.10.0 (4662c10120) #72

Merged
gitea_admin merged 9 commits from _promote/v0.10.0 into main 2026-07-02 16:32:25 +00:00
Contributor
No description provided.
telnet.zig grows the two options only plain-telnet hosts negotiate (ECHO/1,
NAWS/31) and buildNaws (RFC 1073 window report, IAC-doubled dimension bytes).
Negotiator gains mode {ibm,nvt}: .nvt accepts DO ttype/naws/sga + WILL echo/sga,
answers TERMINAL-TYPE with the local TERM, volunteers SB NAWS right after WILL
NAWS, and refuses BINARY/EOR (stays plain NVT). In .ibm mode a host WILL ECHO
(Cisco/BBS) or DO NAWS (Unix telnetd) — options no block-mode host negotiates —
sets nvt_seen with no reply and no state flip, so the session can be handed to
the NVT engine which replays the trigger under .nvt policy.
Engine.feedHost tokenizes the host stream with partial-command carry, passes
data to the terminal (CR NUL collapsed per RFC 854, correct across chunk splits
and around doubled-IAC literals), and answers negotiation with the .nvt policy;
oversized carries or outputs fail closed (error.Overflow ends the session).
feedKeys maps Enter to CR LF, doubles 0xFF, passes ANSI key sequences verbatim,
and reserves Ctrl-] as the local escape. Window gives scripted sessions ordered,
consuming expect matching over a bounded sliding buffer; termType derives the
NVT TERMINAL-TYPE from the local TERM (uppercased, VT100 fallback).
When the .ibm negotiator flags nvt_seen (host sent WILL ECHO or DO NAWS —
options no 5250 host negotiates), readFrame returns immediately: pre-trigger
banner bytes stay in rec, pending is rewound to the trigger command, and no
reply is written — the caller hands both buffers to the NVT engine, whose .nvt
negotiator replays and answers the trigger. Callers that can't hand off (probe,
login, --play, the GUI) check session.nvt_seen and refuse cleanly.
Interactive: nvtSession relays bytes between the local terminal and the host
(the enclosing terminal renders, like telnet(1)) over one std.Io.Select with two
persistent reader tasks; the loop re-arms only the completed branch, so socket
writes stay serialized and cancellation only happens at shutdown. NAWS re-reports
on resize at keypress cadence; Ctrl-] disconnects; POSIX-gated (the Windows
console reader is not cancelable).

Scripted: driveNvt is the plain-telnet twin of drive5250/drive3270 — headless
expect/send verbs over a consuming match window, timed reads racing a Select
timer (a read that completes during loser-cancel still counts; an interrupted
one is ignored since a real EOF re-surfaces on the next call), optional raw
asciicast recording (UTF-8-sanitized events, synthetic pacing) for release reels.
drive3270 gains the same --record support for its screen-frame reels.

The default 5250 path hands off transparently on Session.nvt_seen (banner +
still-buffered trigger seed the NVT engine); probe/login/--play/--drive/
probe3270 refuse NVT hosts with a pointer to --nvt instead of hanging.
zelnet <host> works against Cisco/BBS/telnetd out of the box.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/zelnet!72
No description provided.