Commit Graph
8 Commits
Author SHA1 Message Date
Claude e92a00338d modemmenu: pass the caller's SIP address (DMODEM_PEER) on to the BBS
app_dmodem's DMODEM_PEER (the address a call came from by SIP), from the
environment or the session header, is now {peer} and MODEM_PEER: in the
selection's environment and session file, and in the header written to a
BBS behind the menu, which places a caller without a caller ID by it
(D-Modem/bbs#45, D-Modem/D-Modem#108).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSVXNfvCFNooYkqeMp
2026-11-09 14:09:01 +00:00
Claude e54bb9c1c6 Full-screen menu for ANSI callers, and modemmenu -setup for sysops
The menu comes up full screen on a terminal that can have it (ANSI, or a
VT that said what it is, 40x14 at least): the items in a window on a
blue desk, a bar moved with the cursor keys, an item's key starting it
at once, the welcome at the top of the window, the motd in a box, the
user, rate, clock and minutes left on the bars.  Others get the menu of
lines; the login stays lines, so AutoPPP and the AOL client sniffing
are as they were.  [menu] fullscreen = auto|no, item help =.

modemmenu -setup changes modemmenu.conf on full screens in the style of
the 1990s BBS setup programs (the bbs's setup screens, ported): pull-down
menus, cascading windows, the sample's help of each key, values typed in
a box or picked from a list.  Saving checks the file first and keeps its
comments and order.  An [item] of mode = setup (users or groups needed)
gives it to a sysop who calls in.

- internal/tui: the screen buffer and its diff rendering (from bbs
  textui/desk.go), UTF-8, code page 437, the VT line set and ASCII,
  keys, windows, pull-downs and dialogs
- internal/confedit: changes to the file by line, comments kept
- internal/confdoc: the sample's help, from tools/confref (shared)
- term: a UTF-8 probe for ANSI terminals; [terminal] charset
- below 9600 bit/s the desk is plain blue, cleared in a few bytes
- the sample: comments for keys that took a neighbour's help
- tests: the line menu's tests ask for fullscreen = no; one handoff
  test waits for the server's last log line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUujUBmci66AZkngmh
2026-11-09 07:53:45 +00:00
NeoandClaude c79a38f06b AOL callers: play the client's network, then join the line to the AOL host (#16)
The classic AOL client's CCL script answers a network's prompts before it
speaks P3. With [aol] enabled, modemmenu plays AOLnet (UQKT1, aol,
CONNECTED), SprintNet (@D, TERMINAL=, D1, @, par? 11, C address,
CONNECTED) or Tymnet (A, LOG IN:, +, CALL CONNECTED), as AOL 3.0's own
AOLNET.CCL, SPRINT.CCL and TYMNET.CCL wait for them, or takes P3 at
once, then pipes the line to [aol] host (the BBS's AOL front end).


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

Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 21:41:59 -08:00
NeoandClaude 0983e3746b handoff: the caller's line itself, from app_dmodem and on to a BBS (#15)
A header that comes with a descriptor (SCM_RIGHTS; app_dmodem's
handoff = yes passes the modem's pty terminal) gives -serve the line
itself: the session runs on that terminal as its controlling tty, so
the menu, shells and pppd are on the modem's line and nothing is
copied.  The connection then only marks the session's life: the
caller gone closes it (SIGHUP to the session), the session ending
closes it (app_dmodem hangs up).

An item with handoff = yes (mode = unix, header = yes) hands the
session's line to its server the same way, the item's send and what
the menu read and did not use right after the header, and has it back
when the server closes the connection (after = menu shows the menu
again).  The time limit still holds: at the deadline the menu closes
the connection.

Tests: eight callers at once on handed-over lines, each session on a
terminal, each handed on to a BBS that takes the terminal and gives it
back; PPP on a handed-over line ended at its time limit, the call hung
up; handoff without mode = unix and header = yes refused.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 09:04:25 -08:00
Claude 51507aa079 modemmenu -serve: many callers at once, through to a BBS socket, tested
TestServeManyCallers: eight callers at once on -serve's unix socket,
each with its own header, login and menu, each handed to a BBS on a
unix socket by an item (mode = unix, header = yes): eight connections
to the BBS, all there together, each with its own user, and no caller
sees another's bytes.  TestServeBusy: past max_sessions a caller hears
the lines are busy, and a line that hangs up is free again.

running.md says how the hops work: a connection per caller at each
one, the bytes copied, no descriptor passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3
2026-11-08 16:21:09 +00:00
Claude 45ab167526 dialup: callers on 100.120.224.0/19, server 100.120.224.1
The pool is 100.120.224.10-100.120.255.254; a pool may now be up to a
/16 (65536 addresses).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTwDhoXdaYHRwQ4BT
2026-11-08 15:10:51 +00:00
Claude 06d7aa7734 PPP address pool, isolated dial-up network and DNS overrides
- [ppp_pool]: each PPP caller gets its own address of a range
  ({ppp_local}, {ppp_remote}, {ppp_dns}, {ppp_dns2} and MODEM_PPP_*),
  as flock'd lock files in state_dir/ppp-pool shared by every modemmenu
  and -serve session, so several lines can run PPP at once.  The samples
  move to 10.77.0.0/24 with the pool.
- dialup/: modemmenu-dialup puts the callers' links in a VRF of their
  own, egress by a VLAN, the host's uplink (NAT) or none, with an
  nftables firewall: only the listed service ports of the host, no
  private range (host LANs, other callers) unless ALLOW_CIDRS opens it.
  pppd's ip-up.d/ip-down.d hooks attach each link.
- modemmenu-dns: dnsmasq in the VRF on 10.77.0.1, with overrides from
  /etc/modemmenu/dns.d/*.conf (AIM/ICQ, AOL, MSN, Yahoo names ready).
- make install-dialup, docs/dialup-network.md; confref reads section
  names with underscores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTwDhoXdaYHRwQ4BT
2026-11-08 13:48:06 +00:00
Claude 80d0fda167 Split the code into packages: cmd/modemmenu, internal/*, authd
All of modemmenu was one package main in the repository's root.  It is
now one module with the program and the pieces it is made of apart:

  cmd/modemmenu/     the program (the login, the menu, access, limits,
                     the selections, -serve, AutoPPP, drop files, the
                     auth socket's server)
  internal/config/   modemmenu.conf's sections and keys, {name} templates
  internal/term/     the caller's line, terminal detection, PETSCII
  internal/auth/     the backends and password changes
  internal/telnet/   the telnet client of mode = telnet items
  authd/             the auth socket's protocol and a client, for a BBS
                     to import (bbs's internal/menuauth is a copy of it)
  samples/           the .conf, .users, .pam and .service samples

make builds ./cmd/modemmenu and installs the samples from samples/; the
docs, confref and the site's reference follow.  The tests are where
their code is, none lost.  TestSampleHasEveryKey now reads the keys of
internal/ too (and the exported Get, Bool...: it would have found none).
.gitignore's "modemmenu" ignored cmd/modemmenu/ as well: it is
/modemmenu now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRbjf74j8oq9R3PXhA
2026-11-06 03:12:02 +00:00