Commit Graph
36 Commits
Author SHA1 Message Date
Claude bd7ece25ef README: link the website
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-06 02:20:22 +00:00
NeoandClaude bdc84b3ca7 Site: docs/ as d-modem.github.io/menu, with a configuration reference (#8)
docs/reference.md lists every section and key of modemmenu.conf with its
help, the sample's value and the other values the sample shows, read
from the comments of modemmenu.conf.sample by go run ./tools/confref.
TestSampleHasEveryKey fails when the code reads a key the sample doesn't
show: max_input and an item's terminal were missing and are now in it.
The docs index and Configuration link the reference.

mkdocs.yml builds docs/ and the README with brand's shared theme
(Zensical); .github/workflows/pages.yml calls brand's site workflow,
which also fails when docs/reference.md is out of date.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-05 17:46:56 -08:00
Neo fb18eb77c1 Merge pull request #7 from D-Modem/claude/project-thread-6n8z9z
README: add the header banner
2026-11-05 17:36:19 -08:00
Claude 5c20a15faf README: add the header banner
The 1280x320 banner from D-Modem/brand (banner/menu@2x.png), kept at
.github/banner.png.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR7XmhWoFbzJFFFqde
2026-11-06 01:32:15 +00:00
Neo e467293029 Merge pull request #6 from D-Modem/claude/project-thread-cwmrpa
Landing-page README; the details move to docs/
2026-11-05 02:52:46 -08:00
Claude 676d1f7e2d README as a landing page; the details move to docs/
Building, running from app_dmodem, configuration, authentication, PPP,
security notes and the tests move from the 827-line README into docs/,
unchanged but for their heading levels and relative links. The README
keeps a summary, the sample session, features, a quick start, the
suite's repositories and the licence. D-Modem-RE becomes D-Modem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-05 10:44:33 +00:00
Neo 549a655ab1 Merge pull request #5 from D-Modem/claude/project-thread-7o8kf3
Build without VCS stamping, so sudo make works in a user's clone
2026-11-04 17:54:14 -08:00
Claude 639d0ad2f9 Build without VCS stamping, so sudo make works in a user's clone
git refuses a checkout owned by another user (exit 128, dubious
ownership), and go build's VCS stamping then fails the build.  Nothing
reads the stamp, so turn it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRV6gXs8esrspL3kjPc
2026-11-05 01:53:57 +00:00
Neo 7bdc4c73e1 Merge pull request #4 from D-Modem/claude/project-thread-7o8kf3
Add a FreePBX sample: logins from a users file
2026-11-04 17:53:20 -08:00
Claude cfdd7ac7f1 Add a FreePBX sample: logins from a users file
freepbx/ holds a ready-made setup for FreePBX 16 and 17 with D-Modem's
FreePBX module: modemmenu.conf (auth = file, -serve on a socket in the
asterisk group, PPP, last callers, password changes, an optional BBS
item), a users file, a systemd unit and a test extension.  The files go
in /etc/modemmenu, out of fwconsole chown's way.  The README walks
through the D-Modem profile and inbound route; make install-freepbx
installs the files without overwriting.

Also move the [terminal] section of modemmenu.conf.sample out of the
header comment it had landed in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRV6gXs8esrspL3kjPc
2026-11-05 01:24:11 +00:00
Neo ec12271992 Merge pull request #3 from D-Modem/claude/project-thread-tc183j
Docs: D-Modem's Asterisk module is under frontend/ now
2026-10-31 19:18:48 -07:00
Claude a0a96609f5 Docs: D-Modem-RE's dmodemd and asterisk are under frontend/ now
D-Modem/D-Modem#49 moved the programs built on libdmodem into frontend/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSnYKZ4hXc7DHCsuMA
2026-11-01 02:02:08 +00:00
Neo d8f1e4aff8 Merge pull request #2 from D-Modem/claude/project-thread-v0cc83
Name the D-Modem Authors as the copyright holder
2026-10-29 05:20:39 -07:00
Claude d663ae4c64 Name Neo-Desktop as the commercial licence contact
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
2026-10-29 12:19:04 +00:00
Claude fe61b1b494 Name the D-Modem Authors as the copyright holder
Copyright lines, licensing texts and metadata named Neo-Desktop; they
now name the D-Modem Authors, and the licensing contact points at the
D-Modem organisation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
2026-10-29 11:14:59 +00:00
Neo 958a2764aa Merge pull request #1 from D-Modem/claude/project-thread-v0cc83
Move the module to github.com/D-Modem/menu
2026-10-29 03:00:39 -07:00
Claude 3790fe79f6 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:03:13 +00:00
Claude 893cede22b Document every function
Each Go function and method, tests and test helpers included, and the
pppd plugin's and its test host's C functions, now has a comment saying
what it does, in the repository's style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-18 21:14:46 +00:00
Claude 3ba5b60287 Drop TN3270 detection and handoff
The telnet terminal-type question and the tn3270 server handoff are
gone; ANSI, VT, VT52 and PETSCII detection stay as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-18 03:37:21 +00:00
Claude b253ce1549 Detect the caller's terminal: ANSI, VT, VT52, PETSCII and TN3270
Before the banner modemmenu asks the terminal what it is, in bbs-sec's
order: telnet's terminal type when [terminal] tn3270 is set (a 3270 is
handed to the tn3270 server), the cursor position for ANSI and its size,
ESC Z for a VT52, and DEC's, xterm's and SyncTERM's identification for
an ANSI terminal.  A terminal that is not ANSI may be a Commodore: the
login prompt watches for keys only a Commodore sends, and an all-capitals
name gets "PRESS DEL", as bbs-sec does; the menu then speaks PETSCII.

The result is {terminal}, {term}, {term_name}, {rows} and {cols}
(MODEM_* and TERM for exec items, the size set on the line), passed on
in the session header so a downstream menu does not ask again, and used
by [dropfile] emulation = auto (the new default).  Bytes that arrive
during the questions go back to the login; a PPP frame ends them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-18 03:33:16 +00:00
Claude f3f6c83e5a The caller is told the connect rate: Connected at 33600 bit/s.
[general] connect_message ("\r\nConnected at {speed}.\r\n") follows the
banner, before the login prompt, as BBSs greeted their callers; it is
left out when the rate is not known (no DMODEM_RATE, no -rate), and ""
turns it off.

{speed} (MODEM_SPEED) is the rate for reading: "33600 bit/s", or a V.90
call's two directions apart, "50666 bit/s down, 31200 bit/s up"; empty
when not known.  The sample's welcome no longer repeats the rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-18 03:16:55 +00:00
Claude 04a847970c AutoPPP: PPP dialers log in with PAP, checked by modemmenu
A dialer that starts PPP at once (Windows' Dial-Up Networking and most
others) sends a PPP frame where the login prompt wants a name.  With
[autoppp] enabled, modemmenu sees it (0x7E and the address and control,
plain, escaped or compressed; a name that only starts with ~ stays a
name) and runs [autoppp] command, pppd, on the line.

pppd/modemmenu.c is a pppd plugin: pppd's PAP hook asks the call's own
auth socket (MODEMMENU_AUTH_SOCKET, or its modemmenu-socket option),
where modemmenu checks the login as at the prompt (the backends,
user_pattern, attempts, fail_delay), then [autoppp] item's access rules,
then the time limits; the time left becomes pppd's maxconnect, and
modemmenu hangs pppd up soon after should the link outlive it.  The call
counts as a login: the log, the day's use, the last callers.  PAP only:
CHAP needs passwords kept where they can be read back.

make builds the plugin when ppp-dev's headers are there and installs it
in pppd's plugin directory.  pppd cannot run here (no PPP in the
kernel), so the tests load the real plugin into pppd/test/host.c, which
exports what pppd exports to plugins; the real pppd 2.4.9 loads it and
takes its option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-17 01:48:57 +00:00
Claude 58fa88f7ea DORINFO1.DEF, and drop files as Synchronet writes them
dropfile = dorinfo1.def writes RBBS's DORINFO1.DEF (QuickBBS,
RemoteAccess): 13 lines in upper case, the names split at their first
space, the FOSSIL flag last; dorinfo#.def names it by the node,
DORINFO1.DEF to DORINFOF.DEF (max_nodes 15 at most).

The defaults follow Synchronet's (and its wiki's formats): DOOR32.SYS's
comm type 0 and handle -1 for a door on stdin and stdout, as modemmenu
runs them (was 2 and 0); the rate is the DTE rate, 38400, in every file
(doors built on DMlib refuse a modem's 26400), or rate = connect for
the modems'.  [dropfile] fossil and four_digit_years (MBSE's MM/DD/YYYY
option); an item's door_sys_lines = 31 writes the old DOOR.SYS with the
rest blank, dropfile_lowercase = yes lower-case names for Linux doors.
{dropfile} and MODEM_DROPFILE are the first file's path (Synchronet's
%f).  DOOR.SYS's daily limits are no longer 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 21:22:26 +00:00
Claude 56e6c6c086 Drop files for doors; the time left to programs, servers and menus
An exec item with dropfile = door32.sys door.sys writes DOOR32.SYS (11
lines) and DOOR.SYS (the 52-line GAP format) before its program starts
and removes them after: the user, the rate, the caller ID, the security
level ([dropfile] security, or the item's), the time left (minutes, and
seconds in DOOR.SYS), the emulation and the node.  Each door run takes
the first free node of max_nodes (a lock in state_dir/nodes, held while
it runs), each user keeps a number given once (state_dir/usernumbers).
The files go in dropfile_dir ({node} in it) or a new directory; commands
get {node}, {dropfile_dir}, MODEM_NODE and MODEM_DROPFILE_DIR.  The
password is not written.  [dropfile] has the BBS's name, the sysop and
the comm type, handle and port.

MODEM_SECONDS_LEFT joins MODEM_TIME_LEFT ({seconds_left}) in the
environment, the session file and the header.  A modemmenu -serve keeps
the header's time left as a limit of its own, so that going from one
menu to another gives no new allowance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 21:11:19 +00:00
Claude 4ae3891da8 time_warning takes several times: 5m 1m warns at both
Each of time_warning's times (the longest first, each once; a plain
number is seconds; 0 or none for none) writes time_warning_message on
the line while a selection runs; a selection started with less time
left gets the warnings still ahead.  The message has {seconds_left}
besides {time_left}.  One time, 2m, stays the default; the sample uses
5m 1m.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 20:41:56 +00:00
Claude 4b6ae0a398 The repository is Neo-Desktop/modemmenu now
The Go module is github.com/Neo-Desktop/modemmenu; the license files
and the README name the project modemmenu, and commercial licenses are
asked for at github.com/Neo-Desktop/modemmenu/issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 20:13:55 +00:00
Claude 04f5562196 License: AGPL-3.0-only, with commercial licenses from Neo-Desktop
LICENSE is the GNU Affero General Public License, version 3 (gnu.org's
text); each source file names it (SPDX-License-Identifier:
AGPL-3.0-only) and Neo-Desktop as the copyright holder.

COMMERCIAL-LICENSE.md: for uses the AGPL does not allow, Neo-Desktop
grants commercial licenses on agreed terms; asked for by a GitHub issue.

CONTRIBUTING.md: contributions come with an agreement (Signed-off-by)
that licenses them to Neo-Desktop under the AGPL and other terms,
commercial ones included, so that they can be part of both.

The README has a License section, and says how a modified modemmenu
offers callers its source (the AGPL's section 13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 20:09:02 +00:00
Claude da20bbd4ae LDAP groups, AD password changes, the time warning, the last callers
- LDAP groups for the items' groups =: with [ldap] group_base, a group
  is an entry there that group_filter finds (groupOfNames,
  groupOfUniqueNames and posixGroup by default), searched as
  search_bind_dn or as the caller; each answer kept for the call.
- [ldap] password_change = ad: mode = passwd changes an Active
  Directory password (unicodePwd's old value deleted, the new one
  added, quoted UTF-16LE), AD having no Password Modify.
- time_warning (2m) before the time limit, time_warning_message is
  written on the line in the middle of a running selection, unless the
  item says time_warning = no (the sample's PPP does).
- mode = callers: the last callers (time, user, rate; no caller ID),
  each login recorded in state_dir/callers (the latest 200) when there
  is such an item.
- The sample's end has items to copy: ZMODEM uploads (rz -b -R -E),
  a Kermit server (kermit -Y -x), lynx -anonymous, mutt, tin, irssi,
  Gopher and the last callers; it loads with all of them on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 19:51:33 +00:00
Claude afbc528dbe The auth socket: the BBS's other logins ask modemmenu's backends
From claude/beautiful-pasteur-oz81no (af30cbd), brought onto this
branch without the build output it had committed (pbx-modem, 15 MB, now
in .gitignore).

[authd] listen: a unix socket where a program on this machine (the BBS)
asks modemmenu's backends (file, ldap, sql, system) for a user's
password, so that telnet, SSH and web logins there take the same one.
One JSON line each way: {"user","password"} -> {"ok","auth"} or
{"ok": false, "error": "denied"}.  The backends are asked as at the
login prompt, user_pattern kept, a refusal fail_delay late.

Who may ask: socket_mode (none for others: refused), socket_group, and
allow_users (the peer's uid, SO_PEERCRED); TCP is refused.  -serve
answers it with its sessions; -authd alone
(modemmenu-authd.service.sample).

With this branch's features: settings carry both [authd] and the access
sections; a signup's locked account is refused on the socket too (now
tested), and a password changed from the menu holds there at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 02:34:28 +00:00
Claude 329cf02304 Callers change their passwords: mode = passwd
A built-in item: the current password (checked against the backends
again, which finds the one that holds the account), then the new one
twice (min_password, not the current one, three tries).  The password
changes where the account is:

- file: the user's line rewritten in place under the lock signups take,
  a note after the hash kept; bcrypt, or text with hash = plain
- sql: update_query with update_args (user, password, old_password) and
  update_hash (bcrypt, or none for a query that hashes it)
- ldap: Password Modify (RFC 3062) bound as the user, the server's own
  policy and hashing applying
- system: PAM's password stack; its messages (a quality module's
  reasons) go to the caller

A refused password leaves the old one; the selections after a change
get the new one.  The PAM sample has the password stack, and says that
pam_unix applies no quality checks for root (pam_pwquality with
enforce_for_root does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 02:30:28 +00:00
Claude 98755b757b Who sees what, time limits, guests and signup, caller ID rules, comments
Items take users, groups ([groups], or the system's for auth = system),
min_baud, callerids and guest; a caller neither sees nor can choose an
item they may not use.

time_limit limits a call and daily_limit a user's calls in a day (kept
in state_dir/usage under a lock); a selection is hung up at the limit,
and {time_left} / MODEM_TIME_LEFT tell what is left.

[guest] logs in by name without a password, to the guest = yes items
for its own time_limit.  [signup] adds new accounts to the users file
with a bcrypt hash, locked (user:!hash) until the sysop unlocks them
unless pending = no; the file backend refuses locked accounts.

[callerid] allow, deny and anonymous decide which calls the line takes;
[number PATTERN] sections deny a number, log it in as a user, or start
an item at once.

Comments may follow a value after a space; \; and \# escape them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-12 11:37:10 +00:00
Claude a5a55575af Unix sockets: modemmenu -serve, and items that connect to one
modemmenu -serve listens on [server] listen, a unix socket (or
tcp:host:port), for app_dmodem's mode = unix profiles: each connection
gets a session of its own, modemmenu on a new pty as mode = exec would
give it, so pppd, shells and ^C work the same.  A socket has no
environment: the call's details come first as a header, NAME=value
lines and an empty line (app_dmodem's header = yes).  socket_mode and
socket_group decide who may connect, max_sessions caps them, SIGTERM
hangs them all up and removes the socket.

Menu items reach other menu applications on unix sockets: mode = unix
(raw), or a path on tcp, telnet and rlogin items, and header = yes sends
the session ahead.  A modemmenu -serve with trust_user takes the user of
such a header as logged in, so a caller moves from one menu to another
without a second login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 16:25:46 +00:00
Claude 23b70c6a9a README: PAM setup, the message of the day and the menu's choices
Sections of their own for system accounts by PAM (the steps, the
[system] options), the message of the day and the menu (keys, names,
aliases, ?, hangup words, hotkeys); the short configuration shows
[system] and [menu], and its comments are on lines of their own (the
parser has no comments after a value, so the old example did not load).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 03:29:23 +00:00
Claude f912b979ac System accounts by PAM only; message of the day; menu choices as words
auth = system is now PAM alone (pam_service): the /etc/shadow reader and
its yescrypt and crypt dependencies are gone.  The uid, root and group
rules stay, by the name service.

motd and motd_file (read at each login) show after the welcome, before
the menu.

The menu reads a line: an item's key (now one or more characters), its
name or an alias selects it, in any case (p, ppp, dialup); ? shows the
menu again, an unknown choice says so.  [menu] hangup takes several
words (G goodbye bye logoff); hotkeys = yes keeps one-key selection for
one-character keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 03:20:57 +00:00
Claude 9a407f269e Authentication by the system's accounts: /etc/shadow or PAM
auth = system checks the caller against the machine's own accounts.
method = shadow reads /etc/passwd and /etc/shadow and verifies their
crypt hashes in Go (yescrypt, SHA-512, SHA-256, MD5, bcrypt), refusing
locked accounts and expired accounts or passwords.  method = pam runs a
PAM service's auth and account stacks (sssd, Kerberos, anything PAM
does); it needs a build with -tags pam, which make picks when libpam's
headers are installed, so a plain go build stays free of C.  Accounts
below min_uid and root (unless allow_root) are not let in, and groups
limits logins to members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 00:47:19 +00:00
Claude f194490fa3 modemmenu: a login and menu for dial-up callers
A Go program that D-Modem-RE's app_dmodem runs as a mode = exec profile
on the caller's line: it asks for a user name and password, checks them
with a text file, LDAP (bind as the user, directly or after a search) or
an SQL database (MySQL/MariaDB, PostgreSQL, SQLite), then offers a menu
of a BBS, PPP and a shell.  The selection gets the user name, password,
the backend that accepted them, the dialed number, caller ID, connect
rate and the connection's date and time: as MODEM_* in its environment,
as shell-quoted {placeholders} in its command, in an optional 0600
session file, in the rlogin handshake (the way BBSs log a caller in), or
sent after connecting to a raw TCP or telnet server.

Moved here from D-Modem-RE's modemmenu/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 00:34:46 +00:00