Ken Johnson 5d92eb52d9 Wire fpc-binkp v0.2.0 as the BinkP backend
Adds cometbinkpfpc.pas: a drop-in wrapper that exports the
exact public surface of cometbinkp.pas (TCometBinkpResult,
TBinkpSendEntry, TBinkpPostAuthCallback, BinkpRunOutbound,
BinkpRunInbound) but routes everything through the standalone
fpc-binkp library underneath.

Single-line uses-clause swap in three consumers:
- src/cometdaemon.pas
- src/comet.pas
- src/webui/cometwebapi.pas

(uses ..., cometbinkp -> uses ..., cometbinkpfpc)

The native cometbinkp.pas is untouched and still in CORE_UNITS;
swap back by reverting the three uses-clause lines if needed.

Adapters in cometbinkpfpc.pas:

- TCometBPProvider: bridges TCometFileProvider + the
  TBinkpSendEntry array onto fpc-binkp's IBPFileProvider.
  NextOutbound walks the SendEntries; AcknowledgeSent calls
  CometFileSent so .FLO line tracking + csaDelete /
  csaTruncate post-actions still apply.  OpenForReceive /
  GetPartialSize / FinalizeReceive / CleanupReceive forward
  to TCometFileProvider's existing methods so all NR-resume
  and rename-on-finalize behaviour stays identical.

- TCometBPTransport: IBPTransport over a TCometSocket that
  drains a banner-detect PeekBuf BEFORE consulting the
  socket.  Required because cometdaemon's CometRecvBanner
  consumes the BinkP $80 command-flag byte during protocol
  detection and hands it back to the BinkP entry point.
  Without this replay, fpc-binkp's frame parser starts
  mid-frame and trips an EAccessViolation.

- TCometBPPolicy: the session-scoped bag that wires the
  fpc-binkp callbacks to Comet's existing config lookups
  -- CometCfgGetPassword/FindPassword for OnLookupPassword,
  CometCfgGetDESKey for OnLookupDesKey, CometCfgGetPublicKey
  for OnLookupPubKey -- and forwards the daemon's
  TBinkpPostAuthCallback through to fpc-binkp's
  TBPOnPostAuth (also pushing the chosen InboundDir into the
  provider so receives route to secure / unsecure correctly).

Makefile: adds fpc-binkp/src + fpc-msgbase/src + fpc-log/src
to UNITPATH (LIBFLAGS) and includes cometbinkpfpc in the
CORE_UNITS build list.

Local validation:
- Comet daemon listens on test port 24580 with the new
  backend.  example_outbound from fpc-binkp dials the
  daemon, completes CRAM-MD5 auth, activates CRYPT, EXTCMD
  GZ, MBT, secure-routes the file based on auth state.
- 32 KB AAAA file delivered as 306 wire bytes (99.1%
  compression via GZ), SHA-verified byte-identical on the
  daemon's secure inbound dir.
- 1 KB AAAA file delivered as 266 wire bytes.
- Wrong-password attempt cleanly rejected with M_ERR
  "Bad password", session ends bpErrAuthFailed.

Comet build is green on x86_64-linux with debug build.
Ready to deploy and test on bbsnode2 (FreeBSD x64) and
sea-vps11 (Linux x64).

Note: ED25519 BinkP authentication is a Comet-specific
extension (introduced by Ken Johnson for Comet), not an
Argus or stock-binkd standard.  Argus 4.010 and stock binkd
silently ignore EDCHAL and fall through to CRAM-MD5.
fpc-binkp implements both sides -- consumers using Comet
or another fpc-binkp embedder can use ED25519 end-to-end.
2026-04-21 15:53:21 -07:00
2026-04-09 09:22:48 -07:00

Comet Mailer

A modern FidoNet TCP mailer daemon for the 2020s.

Comet provides direct TCP file transfer with a purpose-built protocol while maintaining full BinkP/1.1 (FTS-1026) compatibility. Both protocols are auto-detected on the same port.

Features

  • Direct TCP file transfer with SHA-256 verification
  • Bidirectional transfer with sliding window flow control
  • ED25519 public-key authentication (no shared secrets needed)
  • CRAM-MD5 password authentication (passwords never sent in clear)
  • X25519 + ChaCha20 encryption (when using ED25519 auth)
  • Full BinkP/1.1 compatibility (FTS-1026) with auto-detection
  • Inline file requests (Hydra-style, within active sessions)
  • FTS-5 nodelist integration (automatic IP/port lookup)
  • BSO outbound scanning with point directory support
  • Optional zlib compression (per-block, automatic)
  • Multi-session daemon with per-node BSY locking
  • Config hot-reload (edit config while Comet is running)
  • Embeddable in BBS software via log/event callbacks and stream API
  • Cross-platform: Linux, FreeBSD, DOS, Windows, OS/2

Quick Start

comet keygen                    # generate ED25519 keypair
comet showkey                   # print public key from config
comet                           # run as daemon (listen + poll)
comet call 1:213/723            # single outbound call
comet -c /path/to/comet.cfg     # use alternate config file
comet -d call 1:213/723         # debug/trace mode

See COMET.SAM for an annotated sample configuration.

Platforms

Platform Status Notes
Linux x86-64 Production Primary platform
FreeBSD x86-64 Production Cross-compiled from Linux
DOS (FreeDOS) Production Requires CWSDPMI + Watt-32 packet driver
Windows 64-bit In progress WinSock2, needs type compatibility fixes
OS/2 Experimental FPC OS/2 Sockets unit, untested

Building

Requires Free Pascal Compiler (FPC) 3.2.x.

make              # Linux (default)
make freebsd      # FreeBSD cross-compile
make dos          # DOS cross-compile
make win64        # Windows 64-bit cross-compile

Documentation

  • COMET.DOC — Full operator manual
  • COMET.SAM — Annotated sample configuration
  • FSP-COMET.001 — Wire protocol specification

Tested Against

  • binkd (reference BinkP implementation)
  • Radius/Argus 4.010 (CRAM-MD5 + CRYPT)
  • BinkIT/sbbs 2.42 (CRAM-MD5)

Contact

License

GPL-2.0

Description
Bringing Fidonet Protocols into the 21st century
Readme 8.5 MiB
Comet 1.2-1 Latest
2026-04-09 16:30:01 +00:00
Languages
JavaScript 57.8%
Pascal 39.2%
Shell 1.3%
CSS 0.8%
HTML 0.7%
Other 0.2%