Merge pull request #61 from D-Modem/claude/project-thread-fur9m9

docs: rewrite the documentation and wiki in Simplified Technical English
This commit is contained in:
Neo authored and GitHub committed 2026-11-15 21:44:37 -08:00
commit e313228963
59 files changed
+5129 -4263

No files matched your search

+6 -2
View File
@@ -1,7 +1,11 @@
# Contributing
Contributions are welcome: issues, fixes and features alike. Before
sending a change, run `make test` (see the wiki's [Development](https://github.com/D-Modem/bbs/wiki/Development) page).
We accept contributions: issues, fixes and new features. Before you send
a change, run `make test`. For more information, refer to the
[Development](https://github.com/D-Modem/bbs/wiki/Development) page of the
wiki.
Write all technical documentation in ASD-STE100 Simplified Technical English. Follow docs/STYLE.md.
## The contributor agreement
+30 -27
View File
@@ -2,15 +2,16 @@
# bbs
A bulletin board system in Go for telnet, SSH, TN3270 and modem callers.
bbs is a bulletin board system in Go for telnet, SSH, TN3270 and modem
callers.
One telnet port serves every kind of terminal: a TN3270 client (x3270,
One telnet port serves all types of terminal. A TN3270 client (x3270,
c3270, wc3270, Vista, PCOMM) gets full 3270 screens with PF keys, through
[go3270](https://github.com/D-Modem/go3270); any other client gets a text
BBS with ANSI colour where the terminal has it. Modem callers come in
through the D-Modem suite: [app_dmodem](https://github.com/D-Modem/D-Modem)
straight from Asterisk, or [modemmenu](https://github.com/D-Modem/menu)
after its login.
[go3270](https://github.com/D-Modem/go3270). All other clients get a text
BBS, with ANSI colour if the terminal has it. Modem callers connect
through the D-Modem suite. They connect through
[app_dmodem](https://github.com/D-Modem/D-Modem) directly from Asterisk, or
through [modemmenu](https://github.com/D-Modem/menu) after its login.
```
D-Modem BBS
@@ -29,22 +30,24 @@ Main menu
[G] Goodbye
```
- Message areas, private mail, chat, paging and doors (DOS doors in dosemu2, or Linux programs)
- File areas with X/Y/ZMODEM, Kermit, IND$FILE and FTP
- E-mail: IMAP, POP3 and SMTP, to and from the internet, directly or through a smarthost
- Networks: FidoNet and other FTNs, QWK, NNTP newsgroups, IRC (and linking into an IRC network as a TS6 or P10 hub server), AIM and ICQ, MSN Messenger, Yahoo! Messenger, and MRC
- Terminals: ANSI, VT, PETSCII, RIPscrip, sixel and 3270 graphics, and for telnet, SSH and web callers a modem's line speed (300 to 115200 bit/s) if they like
- On the web: a forum, image boards, a web terminal and an HTTP API
- Time: follows NTP, NTS and PTP servers, and serves all three
- Certificates: its own ACME client gets and renews them from Let's Encrypt, ZeroSSL and others, for every TLS server
- News, weather and quotes: news feeds as read-only areas, each caller's own weather (NWS, Open-Meteo, USGS earthquakes), stock quotes from IEX
- SQLite, PostgreSQL, MySQL or MariaDB
bbs has these functions:
- Message areas, private mail, chat, paging and doors (DOS doors in dosemu2, or Linux programs).
- File areas with X/Y/ZMODEM, Kermit, IND$FILE and FTP.
- E-mail: IMAP, POP3 and SMTP, to and from the internet, directly or through a smarthost.
- Networks: FidoNet and other FTNs, QWK, NNTP newsgroups, IRC (also a link into an IRC network as a TS6 or P10 hub server), AIM and ICQ, MSN Messenger, Yahoo! Messenger, and MRC.
- Terminals: ANSI, VT, PETSCII, RIPscrip, sixel and 3270 graphics. Telnet, SSH and web callers can also select the line speed of a modem (300 to 115200 bit/s).
- On the web: a forum, image boards, a web terminal and an HTTP API.
- Time: bbs follows NTP, NTS and PTP servers, and it serves all three protocols.
- Certificates: the ACME client of bbs gets and renews certificates from Let's Encrypt, ZeroSSL and other providers, for all TLS servers.
- News, weather and quotes: news feeds as read-only areas, the local weather of each caller (NWS, Open-Meteo, USGS earthquakes), and stock quotes from IEX.
- Databases: SQLite, PostgreSQL, MySQL or MariaDB.
The full list is on the [wiki's home page](https://github.com/D-Modem/bbs/wiki/Home).
## Quick start
Go 1.26 or later:
You must have Go 1.26 or later. Then use these commands:
```
make # or: go build ./cmd/bbs
@@ -55,18 +58,18 @@ bbs -config /etc/bbs/bbs.conf user add sysop -sysop
bbs -config /etc/bbs/bbs.conf serve
```
[bbs.conf.sample](bbs.conf.sample) has every option, and
[bbs.service.sample](bbs.service.sample) runs it under systemd.
[bbs.conf.sample](bbs.conf.sample) has all the options.
[bbs.service.sample](bbs.service.sample) runs bbs under systemd.
## Documentation
The documentation is also a website, [d-modem.github.io/bbs](https://d-modem.github.io/bbs/), with reference pages made from the code.
The documentation is also a website, [d-modem.github.io/bbs](https://d-modem.github.io/bbs/). The website has reference pages that the build makes from the code.
The documentation is in the [wiki](https://github.com/D-Modem/bbs/wiki/): start with [Building](https://github.com/D-Modem/bbs/wiki/Building),
[Running](https://github.com/D-Modem/bbs/wiki/Running) and [Configuration](https://github.com/D-Modem/bbs/wiki/Configuration). Its pages are
kept in [`docs/wiki`](docs/wiki), where they are edited; the
[Wiki](.github/workflows/wiki.yml) workflow publishes them. Future work is
in [TODO.md](TODO.md).
The documentation is in the [wiki](https://github.com/D-Modem/bbs/wiki/). Start with [Building](https://github.com/D-Modem/bbs/wiki/Building),
[Running](https://github.com/D-Modem/bbs/wiki/Running) and [Configuration](https://github.com/D-Modem/bbs/wiki/Configuration). The wiki pages are
in [`docs/wiki`](docs/wiki). Edit them there. The
[Wiki](.github/workflows/wiki.yml) workflow publishes them. The list of
future work is in [TODO.md](TODO.md).
## The D-Modem suite
@@ -75,7 +78,7 @@ in [TODO.md](TODO.md).
| [D-Modem](https://github.com/D-Modem/D-Modem) | The open V.92 softmodem: dmodemd, libdmodem and the Asterisk, FreeSWITCH and ARI modules |
| [app](https://github.com/D-Modem/app) | The D-Modem app for Android and iOS: a dial-up modem on a SIP call |
| [hardware](https://github.com/D-Modem/hardware) | pico-serial: RP2040 serial adapters and phone-line USB sticks |
| [menu](https://github.com/D-Modem/menu) | modemmenu: the login and menu dial-up callers reach |
| [menu](https://github.com/D-Modem/menu) | modemmenu: the login and the menu that dial-up callers see first |
| [bbs](https://github.com/D-Modem/bbs) | A bulletin board for telnet, SSH, TN3270 and modem callers |
| [go3270](https://github.com/D-Modem/go3270) | A Go library for 3270 terminal servers, used by bbs |
| [brand](https://github.com/D-Modem/brand) | Logos, colours, type and the naming guide |
+114 -99
View File
@@ -1,123 +1,138 @@
# Future work
Ideas not yet started, with what is known of them.
This file lists ideas that are not started yet, with the known facts
about them.
## An MSN Classic front end
*Status: started; the link, the RPC, sign-in, the directory, bulletin
boards, e-mail and its address book, chat, Find, file downloads and
the 1996 client's NTLM sign-in (`internal/marvel`, `[marvel]`,
`frontend = marvel`) are done. Not yet tried with a real client.*
*Status: started. These parts are complete: the link, the RPC, sign-in,
the directory, bulletin boards, e-mail and its address book, chat, Find,
file downloads and the NTLM sign-in of the 1996 client (`internal/marvel`,
`[marvel]`, `frontend = marvel`). We did not try it with a real client
yet.*
For the MSN client of Windows 95 (MSN 1.0 to 1.3), over TCP (port 569) and
by modem, from the marvel-msn project's protocol notes. Next:
This front end is for the MSN client of Windows 95 (MSN 1.0 to 1.3), over
TCP (port 569) and by modem. It uses the protocol notes of the marvel-msn
project. The next tasks are:
- **Uploads**: a file library as an MSN BBS whose messages carry the
files as attachments (MOSAF objects in a rich-text body, MOS2 packed),
which also lets a file be saved where the caller says rather than
opened from the temporary folder.
- **Uploads**: a file library as an MSN BBS. Its messages contain the
files as attachments (MOSAF objects in a rich-text body, MOS2 packed).
This also lets the caller save a file in a location that the caller
selects. Now the client opens the file from the temporary folder.
- **MSN Today**: the Media Viewer title (MEDVIEW), a page of news.
## MSN 2.x
*Status: started; the NTLM ("MSN" security package) sign-in on mail,
news and the web forum (`internal/ntlm`, `[security] ntlm`) is done.*
*Status: started. The NTLM ("MSN" security package) sign-in on mail,
news and the web forum (`internal/ntlm`, `[security] ntlm`) is complete.*
For MSN 2.0 to 2.6 (Windows 95 and 98), whose programs are internet
clients. Next:
This work is for MSN 2.0 to 2.6 (Windows 95 and 98). The programs of
these versions are internet clients. The next tasks are:
- **The Program Viewer**: what it loads at sign-in (the start page, its
channel list), and the MSN Sign-In dialer, found from the client.
- **The Program Viewer**: find from the client what the Program Viewer
loads at sign-in (the start page and its channel list), and the MSN
Sign-In dialer.
- **DPA**: the Distributed Password Authentication package of the later
Windows 98 mail, if it can be learned.
Windows 98 mail, if we can learn how it operates.
## An AOL front end
*Status: started; FDO91 (`internal/aol/fdo`), P3 (`internal/aol/p3`) and
the host's sign-on (`internal/aol`, `[aol]`) are done.*
*Status: started. FDO91 (`internal/aol/fdo`), P3 (`internal/aol/p3`) and
the sign-on of the host (`internal/aol`, `[aol]`) are complete.*
For AOL 3.0 and 4.0 for Windows, the real clients, over TCP (port 5190, the
client's `AmericaOnline.aol.com`) and by modem.
This front end is for AOL 3.0 and 4.0 for Windows, the real clients. It
operates over TCP (port 5190, the `AmericaOnline.aol.com` of the client)
and by modem.
- **FDO91** (done): atom streams read and written, all eight encoding
styles and large atoms; a compiler from FDO91 source that matches
Ada32.dll byte for byte on AtomForge's corpus (1,889 forms, 74,369
single atoms, 44 live captures); a decompiler whose text compiles back
to the same bytes.
- **P3** (done): packets (CRC-16/ARC, AOL 4.0's `**`), and the host's
end of a link: INIT acknowledged, DATA in order in and within a window
of 16 out, ACKs every 8 or soon after, NAKs and go-back-N resends,
heartbeats after 12 seconds, 10 of them and the link is down.
- **Host** (started): `[aol]`, sharing 5190 with `[oscar]` through its P3
hook; `Dd` signs on with a BBS account (a node, as any caller), then
`async_online`, the client's main window (32-296) and the BBS's own
Welcome; `pE` answered with `XS`; other tokens with `uni_wait_off`.
Streams go as `aT`, or `at` pieces when long; the client's long ones
are put together. Not yet tried with a real client.
- **Chat and IMs** (done, untried with a real client): `CJ` into the
main room in the client's room window (32-117, 4.0's 43-22783), lines
as `AB`, comings and goings as `CA`/`CB`, `Aa` said; `iS`/`is` IMs as
BBS private messages (kept for one away), shown in 32-223 (4.0's
32-6736); `iO` asks who is on.
- **Keywords and mail** (done, untried with a real client): `Kk` from
the Keyword window (de_data) or a host button (the word as it is) to
Help, Chat, Mail, Who; `m4` MIP mail (header and text in one stream or
two) to BBS mail; the mailbox, a mail and Who are host windows whose
buttons send keywords; new mail counted on the Welcome window.
- **Rooms and boards** (done, untried with a real client): `LP` and
the keywords Rooms and Room *name* to any chat room; message areas as
boards (topics, posts, a post window whose Send is `de_ez_send_form`
with token `Zp`), all host windows.
- **Read Mail** (done, untried with a real client): the client's own
New, Old and Sent Mail lists (`m7`, `m9`, `m8`) as MIP lists, `m3`
opens one, `m2` Ignore / Keep As New / Delete. The order of the atoms
in a list entry is a guess from the mail tool's code.
- **Modem callers** (done in menu, untried with a real modem): modemmenu
plays AOLnet, SprintNet or Tymnet as the client's CCL script expects,
then joins the line to the host.
- **Tokens**, next: the client asks for art it lacks (`fh`): none is
served yet.
- **To decide**: AOL 4.0's RSA handshake (revival servers turn it off in
the client); which client forms (32-xxxx) are in its own database and
which the host must send.
- **FDO91** (complete): bbs reads and writes atom streams, with all eight
encoding styles and large atoms. A compiler from FDO91 source gives the
same bytes as Ada32.dll on the corpus of AtomForge (1,889 forms, 74,369
single atoms, 44 live captures). The text from the decompiler compiles
back to the same bytes.
- **P3** (complete): packets (CRC-16/ARC, the `**` of AOL 4.0), and the
host end of a link. bbs acknowledges INIT. DATA comes in, in sequence,
and goes out in a window of 16. bbs sends ACKs after each 8 packets or
after a short time. It sends NAKs and does go-back-N resends. It sends
heartbeats after 12 seconds. After 10 of them, the link is down.
- **Host** (started): `[aol]` shares 5190 with `[oscar]` through its P3
hook. `Dd` signs on with a BBS account (a node, as for all callers).
Then bbs sends `async_online`, the main window of the client (32-296)
and the Welcome of the BBS. bbs answers `pE` with `XS`. It answers
other tokens with `uni_wait_off`. Streams go as `aT`, or as `at` pieces
when they are long. bbs joins the long streams of the client. We did
not try it with a real client yet.
- **Chat and IMs** (complete, not tried with a real client): `CJ` puts
the caller into the main room, in the room window of the client
(32-117, 43-22783 in 4.0). Lines go as `AB`. Arrivals and departures go
as `CA`/`CB`. bbs says `Aa`. `iS`/`is` IMs become BBS private messages
(kept for one caller who is away). They show in 32-223 (32-6736 in
4.0). `iO` asks which callers are on.
- **Keywords and mail** (complete, not tried with a real client): `Kk`
comes from the Keyword window (de_data) or from a host button (the word
as it is). It goes to Help, Chat, Mail or Who. `m4` MIP mail (header
and text in one stream or two) becomes BBS mail. The mailbox, a mail
and Who are host windows. Their buttons send keywords. The Welcome
window shows the count of new mail.
- **Rooms and boards** (complete, not tried with a real client): `LP`
and the keywords Rooms and Room *name* go to a chat room. Message areas
show as boards (topics, posts, and a post window whose Send is
`de_ez_send_form` with token `Zp`). All of these are host windows.
- **Read Mail** (complete, not tried with a real client): bbs sends the
New, Old and Sent Mail lists of the client (`m7`, `m9`, `m8`) as MIP
lists. `m3` opens one mail. `m2` does Ignore / Keep As New / Delete.
The sequence of the atoms in a list entry is a guess from the code of
the mail tool.
- **Modem callers** (complete in menu, not tried with a real modem):
modemmenu emulates AOLnet, SprintNet or Tymnet, as the CCL script of the
client expects. Then it connects the line to the host.
- **Tokens**, the next task: the client asks for art that it does not
have (`fh`). bbs does not serve art yet.
- **Open decisions**: the RSA handshake of AOL 4.0 (revival servers
disable it in the client). Also, which client forms (32-xxxx) are in
the database of the client, and which forms the host must send.
## Doors for 3270 callers: an ANSI to 3270 layer
*Status: being thought about; other ways to solve it may win.*
*Status: under study. Other solutions are possible.*
Doors are ANSI programs, so 3270 callers do not see the Doors menu. A
layer between a door and a 3270 could show them:
Doors are ANSI programs. Thus 3270 callers do not see the Doors menu. A
layer between a door and a 3270 can show the doors:
- **Emulate, then draw.** A small ANSI-BBS emulator (80x25: cursor
movement, ED/EL, SGR, save/restore cursor, and answers to `ESC[6n`, which
many doors use to detect ANSI) keeps the door's screen; every ~50 ms the
cells that changed go to the 3270 as SBA/SA orders and characters
(Write with keyboard restore). go3270-sec already has the raw writes,
the query replies and Load PS.
- **Characters.** ASCII and Latin-1 letters are in EBCDIC CP037. What
CP437 has beyond them (box drawing single/double/mixed, ░▒▓█ ▀▄▌▐,
☺♥♦♣♠•◘○ and arrows: about 70 glyphs) goes in one programmed-symbol set,
drawn by program at the terminal's cell size (from its query reply), as
the logo is: no font file. Each cell selects the set with an SA
character-set attribute, which takes no screen position. Without
programmed symbols (x3270, wc3270, Vista): GE / CP310 line drawing and
ASCII for the blocks.
- **Colours.** Seven 3270 colours for ANSI's eight; bright and normal the
same (or the intensified attribute for bold); ANSI backgrounds by the SA
background-colour attribute where the emulator has it (PCOMM, it
seems), else reverse video. Blink and underscore map directly.
- **Input: the hard part.** A 3270 sends nothing until Enter, a PF/PA key
or Clear. An unformatted screen lets the caller type at the door's
cursor; on Enter the BBS diffs the screen against what it drew to find
the keys, and sends them and a CR. PF keys for arrows, PgUp/PgDn,
Home/End; PA1 for Esc; an empty Enter for a lone CR. Menu-driven doors
(LORD, BRE, Usurper, TradeWars) would be fine; hotkey and real-time ones
sluggish.
- **Size.** Doors want 25 lines: a model 3 (32x80) or bigger fits, with
room for a help line; a model 2 (24x80) loses or scrolls one.
- **Testing.** The emulator, diffing and data stream by unit tests; the
fallback path with s3270; a whole DOS door session by a scripted 3270
client. Programmed symbols only against a fake terminal here: PCOMM to
be tried by hand.
- **Shape.** An option on a `[door]` (`tn3270 = yes`) that shows the door
on the 3270 Doors menu and puts this layer between them.
- **Emulate, then draw.** A small ANSI-BBS emulator keeps the screen of
the door. It has 80x25 cells, and it does cursor movement, ED/EL, SGR,
save/restore cursor, and answers to `ESC[6n`. Many doors use this request
to detect ANSI. At intervals of about 50 ms, the changed cells go to
the 3270 as SBA/SA orders and characters (Write with keyboard restore).
go3270-sec already has the raw writes, the query replies and Load PS.
- **Characters.** ASCII and Latin-1 letters are in EBCDIC CP037. CP437
has more characters than these: box drawing (single, double and mixed),
░▒▓█ ▀▄▌▐, ☺♥♦♣♠•◘○ and arrows. These are about 70 glyphs. They go in
one programmed-symbol set. A program draws them at the cell size of
the terminal (from its query reply), as it draws the logo. No font
file is necessary. Each cell selects the set with an SA character-set
attribute. This attribute does not use a screen position. If the
terminal has no programmed symbols (x3270, wc3270, Vista), use GE /
CP310 line drawing, and ASCII for the blocks.
- **Colours.** 3270 has seven colours for the eight colours of ANSI.
Bright and normal are the same (or bold uses the intensified
attribute). ANSI backgrounds use the SA background-colour attribute if
the emulator has it (we think that PCOMM has it). If not, they use
reverse video. Blink and underscore map directly.
- **Input: the difficult part.** A 3270 sends nothing until the caller
pushes Enter, a PF/PA key or Clear. An unformatted screen lets the
caller type at the cursor of the door. On Enter, the BBS compares the
screen with the screen that it drew, to find the keys. Then it sends
the keys and a CR. PF keys are for arrows, PgUp/PgDn and Home/End. PA1
is for Esc. An empty Enter is for a CR alone. Doors that use menus
(LORD, BRE, Usurper, TradeWars) will operate correctly. Doors that use
hotkeys and real-time doors will be slow.
- **Size.** Doors use 25 lines. A model 3 (32x80) or larger has
sufficient space, with space for a help line. A model 2 (24x80) loses
one line or scrolls it.
- **Tests.** Unit tests for the emulator, the comparison and the data
stream. Tests with s3270 for the fallback path. A test of a full DOS
door session with a scripted 3270 client. Tests of programmed symbols
only against a simulated terminal here. Someone must try PCOMM
manually.
- **Shape.** An option on a `[door]` (`tn3270 = yes`). This option shows
the door on the 3270 Doors menu and puts this layer between them.
+142
View File
@@ -0,0 +1,142 @@
# Documentation style: ASD-STE100 Simplified Technical English
All technical documentation in the D-Modem project uses ASD-STE100
Simplified Technical English (STE). This guide gives the rules that we use.
It applies to READMEs, the `docs/` folders, wikis, specifications, design
documents, protocol write-ups, CONTRIBUTING files (except legal text) and
technical notes in the project files.
The official source is the ASD-STE100 specification (Issue 9) and its
dictionary. If this guide and the specification are different, use the
specification. You can get the specification free of charge from
<https://www.asd-ste100.org>.
## 1. What STE does not change
Do not change these items. Copy them exactly:
- Code, commands, file names, paths, URLs, identifiers and configuration keys.
- AT commands, S-registers, result codes and protocol message names.
- Numbers, units, addresses, offsets and register values.
- Titles of standards (for example, ITU-T V.92) and quotations from them.
- Product names, company names and the names of people.
- Legal text: licenses, the contributor agreement, copyright and trademark
notices. Legal text keeps its legal wording.
- Text that we copied from a third party (for example, `ORIGINAL-readme.txt`
files, firmware release notes, test fixtures).
## 2. Words
1. Use approved words from the STE dictionary, with their approved meaning
only. For example, "close" means "to move to the closed position". It
does not mean "near".
2. Use technical names (Category: technical names). For example: modem,
handshake, carrier, codec, constellation, packet, socket, thread,
buffer, firmware, sample rate, call, line, PBX, trunk, server, client.
3. Use technical verbs (Category: technical verbs) for processes that STE
does not cover. This project uses these technical verbs: build, compile,
link, configure, install, uninstall, boot, flash, download, upload, dial,
log in, log out, debug, decode, encode, modulate, demodulate, train,
retrain, negotiate, sign, encrypt, decrypt, compress, decompress, parse,
render, cache, merge, commit, push, clone, emulate, probe.
4. Use one word for one thing. Do not change between synonyms. For example,
if you write "softmodem", do not write "software modem" in the next
paragraph.
5. Use these verb forms only: infinitive, imperative, simple present, simple
past, simple future, and the past participle as an adjective.
6. Do not use "-ing" forms of verbs, except in technical names (for example,
"ring signal", "echo canceller"). Write "the modem starts to train", not
"the modem is training".
7. Do not use phrasal verbs. Write "start", not "start up". Write "find",
not "find out".
8. Do not make noun clusters of more than three words. Use prepositions to
break up longer clusters. Write "the receive buffer of the V.34 data
pump", not "the V.34 data pump receive buffer".
9. Use articles ("the", "a") and demonstrative adjectives ("this", "these")
before nouns where possible.
10. Do not use slang, idioms, contractions ("can't", "it's") or Latin
abbreviations ("e.g.", "i.e.", "etc."). Write "for example", "that is",
"and other items".
### Common replacements
| Do not write | Write |
|---|---|
| utilize, make use of | use |
| ensure, make certain | make sure |
| require, need to | is necessary, must |
| should | must (a rule) or write what occurs (a fact) |
| allow, enable (a person) | let, make it possible |
| approximately, roughly | about |
| perform, carry out | do |
| obtain, fetch, grab | get |
| prior to | before |
| in order to | to |
| via | through |
| currently | now |
| additional | more |
| e.g., i.e., etc. | for example, that is, and other items |
| turn on / turn off (a setting) | enable / disable (technical verbs for software settings) |
| set up (verb) | configure, install |
| figure out, find out | find, calculate |
| it's, can't, don't | it is, cannot, do not |
## 3. Sentences
1. Write one topic in one sentence.
2. Procedural sentences (instructions): 20 words or fewer.
3. Descriptive sentences: 25 words or fewer.
4. Use the active voice. In descriptive text, you can use the passive voice
only when you do not know who or what does the action.
5. Do not use semicolons to join sentences. Write two sentences.
6. Use a colon before a list. Use a vertical list when there are more than
two items.
7. Use connecting words ("then", "but", "if", "because") to show how two
sentences are related.
## 4. Procedures
1. Write instructions in the imperative ("Install the package").
2. Write one instruction in one sentence. You can write two actions in one
sentence only when the reader does them at the same time.
3. Write each step as a numbered item.
4. If a condition applies, write the condition first: "If the build fails,
delete the `build/` folder."
5. Put a warning or a caution before the step that it applies to. Do not put
it at the end of the procedure.
6. Write the result of a step in a separate sentence after the step, if the
reader must know it.
## 5. Descriptive writing
1. Give the most important information first.
2. Write one topic in one paragraph.
3. Do not write more than six sentences in a paragraph.
4. Use headings to divide long text into short sections.
5. Use tables for data that has rows and columns.
## 6. Warnings and cautions
Use a warning for a risk to persons. Use a caution for a risk to equipment,
data or the telephone line. Start with a short title, then the instruction,
then the risk:
> **CAUTION: DO NOT CONNECT THE BOARD TO A LIVE LINE WITHOUT THE ISOLATION
> TRANSFORMER.** The line voltage can cause damage to the codec.
## 7. Examples
| Before | After (STE) |
|---|---|
| You'll need to make sure the PBX is set up before you dial out. | Configure the PBX before you dial. |
| The handshake is performed by the answering modem, which then starts sending ANSam. | The answering modem starts the handshake. Then it sends ANSam. |
| Turn it off if it's causing trouble. | If this feature causes problems, disable it. |
| `crypto/tls` can't take such a hello, and it can't be rewritten for it. | `crypto/tls` cannot accept this type of hello. Also, you cannot change `crypto/tls` to accept it. |
## 8. Check before you commit
- Are all sentences short (20 words for instructions, 25 for descriptions)?
- Is each instruction in the imperative, with one action?
- Is there a word with "-ing", a phrasal verb or a contraction?
- Are code, commands and identifiers exactly the same as before?
- Did you keep legal text and third-party text unchanged?
+31 -31
View File
@@ -1,6 +1,6 @@
# 01 — History and Original Architecture
This doc is context for the reimplementation: what CompuServe was, what ran it, and how users reached it.
This document gives the context for the new implementation: what CompuServe was, what ran it, and how users connected to it.
Tags: **[C]** confirmed · **[S]** secondary · **[GAP]** unknown.
@@ -8,83 +8,83 @@ Tags: **[C]** confirmed · **[S]** secondary · **[GAP]** unknown.
| Date | Event | Source |
|---|---|---|
| 1969 | Compu-Serv Network, Inc. founded in Columbus, OH, as a Golden United Life subsidiary (timesharing) | [S] Wikipedia; [C] Trevor memo |
| Feb 1980 | CB Simulator launched | [S] |
| 24 Sep 1979 | MicroNET consumer service launched, sold through Radio Shack | [S] |
| 1969 | Compu-Serv Network, Inc. founded in Columbus, OH, as a subsidiary of Golden United Life (timesharing) | [S] Wikipedia; [C] Trevor memo |
| Feb 1980 | Start of the CB Simulator | [S] |
| 24 Sep 1979 | Start of the MicroNET consumer service, sold through Radio Shack | [S] |
| May 1980 | H&R Block buys CompuServe (~$25M) | [S] |
| 1 Jul 1980 | MicroNET renamed **CompuServe Information Service (CIS)** | [S] |
| 1982 | B protocol replaces A [C, Ranshaw]; CompuServe Network Services formed | |
| 15 Jun 1987 | GIF87a released (Steve Wilhite's team) | [S] |
| 1989 | CIM/HMI introduced; Internet mail gateway; The Source bought (23 Jun) and shut down (1 Aug) | [S] |
| 1 Jul 1980 | MicroNET gets the new name **CompuServe Information Service (CIS)** | [S] |
| 1982 | The B protocol replaces A [C, Ranshaw]. CompuServe Network Services is formed | |
| 15 Jun 1987 | GIF87a released (the team of Steve Wilhite) | [S] |
| 1989 | Start of CIM/HMI. Internet mail gateway. CompuServe buys The Source (23 Jun) and closes it (1 Aug) | [S] |
| Apr 1995 | Peak of ~3M members | [S] |
| 1995–96 | Forums move to the NT-based "NISA" hosts (HMI-only) | [C] cishmi.faq |
| 1995–96 | Forums move to the NT-based "NISA" hosts (HMI only) | [C] cishmi.faq |
| 1996 | CSi rebrand / CompuServe 3.0 | [S] |
| Feb 1998 | WorldCom buys CompuServe; the consumer service goes to AOL | [S] |
| 30 Jun 2009 | CompuServe Classic (HMI) and OurWorld shut down | eWeek, The Register |
| Feb 1998 | WorldCom buys CompuServe. The consumer service goes to AOL | [S] |
| 30 Jun 2009 | CompuServe Classic (HMI) and OurWorld close | eWeek, The Register |
| 15 Dec 2017 | Forums closed | [S] |
Wikipedia's claims that "HMI was discontinued in 2004" and that "forums were converted to HTML in 1997" conflict with WinCIM working until 2009. Treat them as unreliable.
Wikipedia says that "HMI was discontinued in 2004" and that "forums were converted to HTML in 1997". These claims do not agree with the fact that WinCIM operated until 2009. Do not trust them.
## 2. Host hardware and OS
Source: Sandy Trevor, internal memo "We Call Them 10's", 31 Aug 1988, <https://ftp.inwap.com/pdp10/compuserve.txt> [C].
- **Machines:** DEC 36-bit, in this order:
- **Machines:** DEC 36-bit, in this sequence:
- KA-10 (1969)
- KI-10s (seven by 1974)
- KL / DECSYSTEM-2050s
- **Systems Concepts SC-30** (ordered 1986, arrived late 1987)
- **SC-40** (1993). CompuServe licensed the design and built them in-house. Some were still online after 2005.
- **OS:** heavily modified TOPS-10, the "C/D/E" monitors (E added a class scheduler).
- **Applications:** written in XF4 and Bliss-36, plus Wilhite's BASIC compiler.
- **SC-40** (1993). CompuServe got a licence for the design and built the machines itself. Some were still online after 2005.
- **OS:** TOPS-10 with many changes, the "C/D/E" monitors (E added a class scheduler).
- **Applications:** written in XF4 and Bliss-36, and the BASIC compiler of Wilhite.
- **Front ends:** 680i (PDP-8) front ends, then a PDP-15 comms switch.
- **Sites:** Upper Arlington, Columbus (1973); Dublin (1978); later Hilliard.
- **Mid-90s:** the NISA servers, Windows NT on Intel, ran forums and mail for HMI clients [C, cishmi.faq]. <https://gunkies.org/wiki/CompuServe_recollections> [S]
Primary source not yet explored: 32 GB of raw CompuServe disk images, <https://archive.org/details/2015-05-compuserve-raw-disks>. They use 584-byte sectors in a nonstandard format and are hard to read. They are the best hope for exact host prompts and help text [GAP].
A primary source that we did not examine yet: 32 GB of raw CompuServe disk images, <https://archive.org/details/2015-05-compuserve-raw-disks>. They use 584-byte sectors in a nonstandard format, and they are difficult to read. They are the best source for the exact prompts and help text of the host [GAP].
## 3. User IDs
- User IDs were TOPS-10 **PPNs** (project, programmer): `70000,130`, `75116,3524`, and later 10-digit forms like `102345,6789`.
- Internet mail form (from 1989): `70000.130@compuserve.com`. The comma becomes a period.
- The claim that IDs only use octal digits (no 8 or 9) is plausible but not verified. `75116,3524` contains no 8 or 9; other surviving examples should be checked.
- User IDs were TOPS-10 **PPNs** (project, programmer): `70000,130`, `75116,3524`, and later 10-digit forms, for example `102345,6789`.
- The internet mail form (from 1989): `70000.130@compuserve.com`. The comma becomes a period.
- Some sources say that IDs use only octal digits (no 8 or 9). This is possible, but we did not verify it. `75116,3524` contains no 8 or 9. It is necessary to check other examples that remain.
**For our server:**
- Allocate IDs as `7xxxx,xxx` (project ≥ 70000).
- Parse with a lenient regex, `^\d{5,6},\d{1,5}$`.
- Accept `.` in place of `,` (`/INT:60`-style options are stripped first).
- Accept `.` in place of `,` (first remove options of the type `/INT:60`).
## 4. Network and access paths
- **CompuServe's own network:** PDP-11 nodes from 1977, later 486/Qbus "Trinodes". It later moved to X.25, Frame Relay, ATM and IP. Users dialled a local node, which prompted `Host Name:`.
- **Partner networks:** Tymnet, Telenet/SprintNet, Datapac, Transpac, Infonet, Mercury. Each had its own login dialogue before reaching CIS (scripts in CompuServe's 1996 CSERVE package).
- **The network of CompuServe:** PDP-11 nodes from 1977, later 486/Qbus "Trinodes". It later moved to X.25, Frame Relay, ATM and IP. Users dialled a local node, which showed the prompt `Host Name:`.
- **Partner networks:** Tymnet, Telenet/SprintNet, Datapac, Transpac, Infonet, Mercury. Each network had its own login dialogue before the connection to CIS (scripts in the 1996 CSERVE package of CompuServe).
- **Host names:** `CIS` in the manuals, `CPS` in the 1996 scripts, `CISAGREE` over the Internet.
- **Internet:**
- 1992: `telnet hermes.merit.edu` → "Which Host?" → `compuserve`.
- Later: direct telnet (exact hostname [GAP]).
- 1995: PPP via `<id>/GO:PPPCONNECT`.
- 1995: PPP through `<id>/GO:PPPCONNECT`.
- WinCIM could also use Winsock TCP on **port 4144**.
## 5. Clients
| Kind | Examples | Interface |
|---|---|---|
| Dumb terminal / emulator | Any terminal program, VT100, CompuServe's VIDTEX | ASCII + VIDTEX escapes, B for downloads |
| Offline readers (ASCII) | TAPCIS (≤6.0), AutoSIG/ATO, OzCIS | Scripted ASCII. Depend on exact prompts and `GO DEFAULT` settings |
| Dumb terminal / emulator | All terminal programs, VT100, the VIDTEX of CompuServe | ASCII + VIDTEX escapes, B for downloads |
| Offline readers (ASCII) | TAPCIS (≤6.0), AutoSIG/ATO, OzCIS | Scripted ASCII. They depend on exact prompts and `GO DEFAULT` settings |
| GUI (HMI) | DOSCIM, WinCIM, MacCIM, OS/2 CIM, CSNAV, MacNAV, OzWIN, TAPCIS 6.1 | HMI over the B+ Transport Layer |
See [02](02-terminal-ux.md) for the ASCII experience, [03](03-link-protocols.md) for B/B+, and [04](04-cim-hmi.md) for HMI.
Refer to [02](02-terminal-ux.md) for the ASCII experience, [03](03-link-protocols.md) for B/B+, and [04](04-cim-hmi.md) for HMI.
## 6. Graphics
- **CompuServe RLE** [C]:
- Starts with `ESC G H` (256×192) or `ESC G M` (128×96).
- Each byte is a run length + 0x20 (0–94 pixels). Runs alternate background/foreground, starting with background, and wrap across lines.
- Ends with `ESC G N` (optionally preceded by BEL).
- Each byte is a run length + 0x20 (0–94 pixels). Runs are background and foreground in turn, with background first. They wrap across lines.
- Ends with `ESC G N` (optionally with a BEL before it).
- Used for weather maps (`GO AWX`) and the CB "picture" pages.
- Send it only to clients that report `GH`/`GM` in `ESC I`.
- Refs: <https://github.com/RevCurtisP/csrle>, PRONOM fmt/1538.
- **GIF:** CompuServe's own format, from 1987. Delivered by B+ download (`ESC [ > 1 g` announces one to capable clients; doc 03 §5.4).
- **GIF:** the format of CompuServe, from 1987. Sent by B+ download (`ESC [ > 1 g` tells capable clients that a GIF comes; doc 03 §5.4).
- **NAPLPS:** no evidence that CIS used it.
## 7. Other reimplementations
@@ -92,6 +92,6 @@ See [02](02-terminal-ux.md) for the ASCII experience, [03](03-link-protocols.md)
| Project | What it is |
|---|---|
| `24high/CompuServe-Emulator` (C#, 2026) | WinCIM 3.x HMI server. **Key reference** (doc 04). |
| `paulsullivan33-dev/compuserve-simulator` (Python) | Text-mode CIS-flavoured simulation, 1988 setting. Not protocol-faithful. |
| `paulsullivan33-dev/compuserve-simulator` (Python) | Text-mode simulation in the style of CIS, 1988 setting. It does not follow the protocol exactly. |
| `CompuServeReloaded/csr-server` (C#, 2023) | Stub only. |
| `RevCurtisP/csrle` | RLE tools and the original RLE.TXT. |
+102 -90
View File
@@ -1,8 +1,8 @@
# 02 — The Terminal (ASCII) Experience
This doc records what a caller with a plain terminal saw, as close to byte-exact as surviving session captures allow.
This document records what a caller with a plain terminal saw. It is as near to byte-exact as the session captures that exist permit.
Offline readers (TAPCIS, AutoSIG, OzCIS, Navigator) **pattern-match these strings**, so treat the verbatim text as an interface contract.
Offline readers (TAPCIS, AutoSIG, OzCIS, Navigator) **pattern-match these strings**. Thus, the verbatim text is an interface contract. Do not change it.
Tags: **[V]** verbatim from a capture or period document (blank-line runs and ANSI clear codes stripped) · **[P]** paraphrased from a period source · **[I]** inferred.
@@ -26,7 +26,7 @@ Tags: **[V]** verbatim from a capture or period document (blank-line runs and AN
| S17 | 1980s text files on IDs, CB, logon. <http://www.textfiles.com/hacking/cisinfo4.txt>, `compusrv`, `cis.phk`, `compusin.txt` |
| S18 | Early-80s GO page index. <http://www.textfiles.com/hacking/compuser.txt> |
Local copies of the captures are in the session scratchpad and are not committed. Re-fetch them from the URLs above for golden-transcript tests.
Local copies of the captures are in the session scratchpad. They are not in the repository. For golden-transcript tests, download them again from the URLs above.
---
@@ -35,16 +35,16 @@ Local copies of the captures are in the session scratchpad and are not committed
### 1.1 Getting to the host
1. The modem connects: `CONNECT 2400`.
2. On CompuServe's own network the caller sends **Ctrl-C**, or a CR on "picky PADs" [V, S10 CIS.SCR].
3. The node prints its ID (` 02FMA`, ` 0003PAZ`) [V, S6, S9] and then `Host Name:`.
2. On the CompuServe network, the caller sends **Ctrl-C**, or a CR on "picky PADs" [V, S10 CIS.SCR].
3. The node shows its ID (` 02FMA`, ` 0003PAZ`) [V, S6, S9] and then `Host Name:`.
4. The caller types `CIS`.
Some 1987-era nodes went straight from ^C to `User ID:` [V, S2].
Some nodes of 1987 went directly from ^C to `User ID:` [V, S2].
Third-party networks:
- Tymnet: wait for ` in:`, send `CPS`, wait for `ERVE` [V, S10].
- Sprintnet: `@`, `D`, `C 614227` [V, S10].
- Both are documented in doc 04 §2.2 too.
- Doc 04 §2.2 also gives the two networks.
### 1.2 1989 full session [V, S1]
@@ -105,22 +105,22 @@ No electronic mail is waiting.
### 1.4 Formatting rules
- **Banner date:** `HH:MM TZ Weekday DD-Mon-YY` followed by `P`. The `P` probably marks prime time [I]; print it during 08:00–19:00 on weekdays.
- **Logoff date:** `Off at HH:MM TZ D-Mon-YY` has **no leading zero on the day**, and `Connect time = h:mm`.
- **Plan line:** `(Executive Option)` appears when the account has it.
- **Banner date:** `HH:MM TZ Weekday DD-Mon-YY` and then `P`. The `P` probably marks prime time [I]. Show it from 08:00 to 19:00 on weekdays.
- **Logoff date:** `Off at HH:MM TZ D-Mon-YY` has **no leading zero on the day**. The next line is `Connect time = h:mm`.
- **Plan line:** `(Executive Option)` shows when the account has this option.
- **User ID suffixes:**
- `*NAVIG` (1987) tags the client [V, S2].
- `;TTY` forces default terminal settings [V, S10].
- `*NAVIG` (1987) identifies the client [V, S2].
- `;TTY` sets the default terminal settings [V, S10].
- `/INT`, `/INT:60`, `/GO:x` and `/HOST` are 90s options (doc 04 §2.2).
- `/INT` (with `+`/`/secure`) switches to HMI [I, S9].
- **Bad login:** `?? LOGINE - Invalid entry - try again` [V-quoted, S10]. The 1996 scripts expect the `?LOG INE` family (doc 04). Emit the first form for terminals; the code is the same.
- **Sign-up IDs:** IntroPak IDs looked like `177000,1147` and went through Agreement and Serial number prompts [P].
- `/INT` (with `+`/`/secure`) changes to HMI [I, S9].
- **Bad login:** `?? LOGINE - Invalid entry - try again` [V-quoted, S10]. The 1996 scripts expect the `?LOG INE` family (doc 04). For terminals, send the first form. The code is the same.
- **Sign-up IDs:** IntroPak IDs were similar to `177000,1147`. The caller then got the Agreement and Serial number prompts [P].
### 1.5 Logging off
- `OFF` or `BYE` hangs up.
- `LOG` logs off and returns to `User ID:`; TAPCIS uses it [V, S11].
- Logoff text (constant across 1987–94) [V]:
- `OFF` or `BYE` disconnects the line.
- `LOG` logs off and goes back to `User ID:`. TAPCIS uses it [V, S11].
- Logoff text (the same from 1987 to 1994) [V]:
```
Thank you for using CompuServe!
@@ -128,16 +128,16 @@ Off at 18:49 EDT 15-Sep-90
Connect time = 0:01
```
After that the network sends `^D` and a new `Host Name:`. Our server prints the text and closes the connection.
After this text, the network sends `^D` and a new `Host Name:`. Our server shows the text and closes the connection.
---
## 2. User IDs
- The ID is "a project number and a programmer number. An example would be 70007,1460" [V, S17]. The format is `7xxxx,xx`, later `1xxxxx,xxxx`.
- Every ID in the captures uses only digits 0–7: `73237,341`, `76174,2404`, `100073,1227`, `104616,2705`. A 1980s file says "the second number is from '0-7'". **Treat as octal**: allocate only digits 0–7.
- All IDs in the captures use only the digits 0–7: `73237,341`, `76174,2404`, `100073,1227`, `104616,2705`. A file from the 1980s says "the second number is from '0-7'". **Use the IDs as octal numbers**: give only the digits 0–7.
- Internet form: `76174.2404@compuserve.com` [V, S7].
- Folklore project ranges [P, S17]: 70000 security, 70003/70004 staff, 70006 customer service, 70007 complimentary, **76701–76704 sysops**, 177000 IntroPak. Sysops in the captures are in 7670x, so follow this.
- Folklore project ranges [P, S17]: 70000 security, 70003/70004 staff, 70006 customer service, 70007 complimentary, **76701–76704 sysops**, 177000 IntroPak. The sysops in the captures are in 7670x. Thus, use these ranges.
---
@@ -166,7 +166,7 @@ CompuServe TOP
Enter choice number !
```
1994 [V, S8]. The title is left-aligned and the page ID right-aligned to column 80; free pages add `(FREE)`:
1994 [V, S8]. The title is left-aligned. The page ID is right-aligned to column 80. Free pages add `(FREE)`:
```
CompuServe TOP
@@ -180,8 +180,8 @@ Enter choice !
**Page IDs:**
- Older pages used `PREFIX-n` (`Page PCS-50` [V, S12]; `CIS-177`, `HOM-24`, `GAM-11` [S18]).
- Later pages mix named IDs (`TOP`, `RATES`, `BILLING`) with numbered ones (`CIS-162`, `BIL-512`, `LGN-1`, `CMS-138`).
- **The page tree is keyed by these IDs, and GO words are aliases for them.** HMI uses the same IDs (`CIS:FORUMS`, `HOM:…`; doc 04).
- Later pages use named IDs (`TOP`, `RATES`, `BILLING`) and numbered IDs (`CIS-162`, `BIL-512`, `LGN-1`, `CMS-138`) together.
- **These IDs are the keys of the page tree. GO words are aliases for them.** HMI uses the same IDs (`CIS:FORUMS`, `HOM:…`; doc 04).
### 3.2 Command summary, page CIS-162 [V, S8]
@@ -202,8 +202,8 @@ Enter choice !
PER - exit to Personal File Area
```
- Commands chain with `;` (`OP;LL 32;T;RR 9900`) [V, S12].
- `SET` options include `SET BRI ON`, `SET PAG OFF`, `SET WID 80` [V, S2].
- To give a sequence of commands, put `;` between them (`OP;LL 32;T;RR 9900`) [V, S12].
- The `SET` options include `SET BRI ON`, `SET PAG OFF`, `SET WID 80` [V, S2].
### 3.3 Prompts and messages [V]
@@ -222,22 +222,22 @@ Enter choice !
From the DEFAULT screen [V, S10]: "1 YES - expert mode (You will receive abbreviated prompts such as ! or More!.) 2 NO - novice/intermediate mode (You will receive full prompts such as Enter choice! or Enter <CR> for more!.)"
PARAMS.SCR calls `!` "CompuServe's almost-universal prompt that it's awaiting user input". **Every prompt must end with `!`** (or the forum's chosen prompt character).
PARAMS.SCR calls `!` "CompuServe's almost-universal prompt that it's awaiting user input". **All prompts must end with `!`** (or the prompt character that the forum uses).
### 3.4 Control keys [V, S12, S13, S10]
| Key | Behaviour |
|---|---|
| Ctrl-C | Abort output; instant exit. In a conference, back to the forum `Function:` prompt. |
| Ctrl-P | Abort output, return to command level |
| Ctrl-S / Ctrl-Q | Freeze / resume output |
| Ctrl-O | Skip the rest of a message's text while retrieving |
| Ctrl-U | Delete the line being typed. **TAPCIS sends ^U before every command; the host echoes ^U only if the buffer had garbage** [V, S10]. |
| Ctrl-V | Retype the line typed so far |
| Ctrl-C | Stops the output and exits immediately. In a conference, goes back to the forum `Function:` prompt. |
| Ctrl-P | Stops the output and goes back to the command level |
| Ctrl-S / Ctrl-Q | Stops / starts the output again |
| Ctrl-O | Skips the remaining text of a message during retrieval |
| Ctrl-U | Deletes the line that the user types. **TAPCIS sends ^U before each command. The host echoes ^U only if the buffer had unwanted characters** [V, S10]. |
| Ctrl-V | Shows again the line that the user typed until now |
### 3.5 Terminal settings: GO DEFAULT / GO TERMINAL [V, S10 PARAMS.SCR, 1990]
Time spent here is free of charges [V].
Time in these menus is free [V].
```
TERMINAL SETTINGS/SERVICE OPTIONS
@@ -263,19 +263,19 @@ PERMANENT SETTINGS
| Logon/Service | First service at logon, Mail Waiting [NOTIFY ONLY], Personal menu, TOP goes to [COMMAND] (COMMAND/MAIN), Online editor [EDIT] (EDIT/LINEDIT), Forum presentation mode [COMMAND] |
| Protocol | B, Quick B, XMODEM, KERMIT, A, SHOW MENU |
Each change ends with a confirm screen: `CHANGE PERMANENT SETTINGS 1 Confirm 2 Cancel`.
After each change, a confirmation screen shows: `CHANGE PERMANENT SETTINGS 1 Confirm 2 Cancel`.
**As built** (`internal/cis/profile.go`, test `TestCompuServeDefault`, which replays PARAMS.SCR's sends and waits):
- The menus, their order, the bracketed values (right-aligned at column 40) and the setting screens are PARAMS.SCR's.
- Screens the script never shows are ours: Instructions, the two Explanations, Show session vs. permanent, Change current session settings, CLEAR/BLANK/LF, FEEDS/TABS, the GIF/NAPLPS/RLE screens, and the number prompts (which end in `:`, as the script waits for).
- `<CR>` goes up a level. A command typed at any prompt leaves DEFAULT with the changes unsaved, then runs the command.
- After Confirm or Cancel the host shows `GO PROFILE`, as in the script.
- Choosing a terminal type sets WIDTH 80, LINES 24, PARITY EVEN and ERASE NO, as the transcript shows.
- Values are kept as prefs: `cis-paged`, `cis-width` and so on.
**As built** (`internal/cis/profile.go`, test `TestCompuServeDefault`, which sends and waits for the same text as PARAMS.SCR):
- The menus, their order, the bracketed values (right-aligned at column 40) and the setting screens come from PARAMS.SCR.
- We wrote the screens that the script does not show: Instructions, the two Explanations, Show session vs. permanent, Change current session settings, CLEAR/BLANK/LF, FEEDS/TABS, the GIF/NAPLPS/RLE screens, and the number prompts. The number prompts end in `:`, because the script waits for this character.
- `<CR>` goes up one level. If the user types a command at a prompt, the host exits DEFAULT without a save of the changes. Then it runs the command.
- After Confirm or Cancel, the host shows `GO PROFILE`, as in the script.
- When the user selects a terminal type, the host sets WIDTH 80, LINES 24, PARITY EVEN and ERASE NO, as the transcript shows.
- The host keeps the values as prefs: `cis-paged`, `cis-width` and other prefs.
Other notes:
- "Micro inquiry sequence at logon" is the setting that sends `ESC I` at login (doc 03 §5).
- **Compatibility minimum** [V, S10]: TAPCIS requires PAGED=NO and COMMAND mode in forums and Mail ("COMMAND mode is essential. TAPCIS will not work in any other"). Navigator for the Mac needs "TOP goes to MAIN".
- **Compatibility minimum** [V, S10]: TAPCIS must have PAGED=NO and COMMAND mode in forums and Mail ("COMMAND mode is essential. TAPCIS will not work in any other"). Navigator for the Mac must have "TOP goes to MAIN".
---
@@ -345,7 +345,7 @@ Press <CR> !
Sub-menus [V, S7]:
- **Messages Menu:** `Message age selection = [All]`, `1 SELECT (Read by section and subject)`, `2 READ or search messages`, `3 CHANGE age selection`, `4 COMPOSE a message`, `5 UPLOAD a message`.
- **Read Menu:** `1 [ALL] messages`, `2 Message NUMBER`, `3 WAITING messages for you (0)`, then `Search [all] messages` with `4 FROM (Sender)`, `5 SUBJECT`, `6 TO (Recipient)`.
- **After each message:** `Press <CR> for next or type CHOICES !`, which leads to the **Read Action Menu**: `1 REPLY with same subject`, `2 COMPOSE with new subject`, `3 REREAD this message`, `4 SKIP reply`, `5 SKIP ALL`, `6 READ reply`.
- **After each message:** `Press <CR> for next or type CHOICES !`. CHOICES goes to the **Read Action Menu**: `1 REPLY with same subject`, `2 COMPOSE with new subject`, `3 REREAD this message`, `4 SKIP reply`, `5 SKIP ALL`, `6 READ reply`.
- **Other strings:** `Message #:`, `Can't find message #40300`, `There is 1 Reply.`, `Press <CR> for more:`.
### 4.3 Leaving a message (1988) [V, S3]
@@ -374,7 +374,7 @@ Enter choice : 5
Message # 34949 Stored
```
Sections run 0–17, which fixes the **section limit at 18 per forum**.
The sections are 0–17. Thus, the **section limit is 18 for each forum**.
### 4.4 Message header [V, S16 1992; S7 1994]
@@ -392,18 +392,18 @@ To: William F. Zachmann 72241,43 (X)
| Line | Rule |
|---|---|
| 1 | `#: <num> S<sec>/<section name>`, optionally followed by ` [E]`. TAPCIS shows `#: 55848` (two spaces). |
| 1 | `#: <num> S<sec>/<section name>`, and then ` [E]` as an option. TAPCIS shows `#: 55848` (two spaces). |
| 2 | Four spaces, then `DD-Mon-YY HH:MM:SS` (two spaces between date and time). |
| Sb | `#Subj` = thread root that has replies. `#<parent>-#Subj` = a reply that itself has replies. `#<parent>-Subj` = a leaf. |
| Fm / To | `Name ID`. `(X)` after To means the addressee has read it. Sysops look like `Steve Pietrowicz/SYSOP 76701,250`. |
| Footer | `* Reply: n` or `* Replies: n, n, …` wrapped with a 12-space indent (V.4); V.3B prints `There is 1 Reply.` |
| Sb | `#Subj` = the root of a thread that has replies. `#<parent>-#Subj` = a reply that also has replies. `#<parent>-Subj` = a leaf. |
| Fm / To | `Name ID`. `(X)` after To means that the addressee has read the message. Sysops show as `Steve Pietrowicz/SYSOP 76701,250`. |
| Footer | `* Reply: n` or `* Replies: n, n, …`, wrapped with an indent of 12 spaces (V.4). V.3B shows `There is 1 Reply.` |
### 4.5 Command mode (forum software 4D, 1989) [V, S11]
**Prompts:**
`Forum !`, `Messages !`, `LIB !`, `Member Directory !`, `Read action !`, `Enter <CR> for more or type CHOICES !`, `Post action !`, `Edit !`.
**Commands available everywhere:**
**Commands at all prompts:**
`CON FIND G/GO HELP LIB LOG M MES OFF OPT PER PRO QUO R S SET T UST WEA WHO ?`
**At `Forum !`:**
@@ -417,7 +417,7 @@ To: William F. Zachmann 72241,43 (X)
READ|BROWSE [FORWARD|THREAD|REVERSE|WAITING|MARKED] [NEW|DAYS:##|ALL|STA:##]
[FROM:x|TO:x|SUB:x] [SEC:#,#]
```
Examples: `REA WAI`, `REA MAR`, `REA ALL SEC:2,9,10`, `REA NEW FRO:76703,4363`, `REA REV LAST`. `SCA` takes the same arguments plus `PRO`.
Examples: `REA WAI`, `REA MAR`, `REA ALL SEC:2,9,10`, `REA NEW FRO:76703,4363`, `REA REV LAST`. `SCA` accepts the same arguments and also `PRO`.
**After a message:**
`CH`oices, `D`elete, `MA`rk, `NEX`, `NEX SUB`, `P`arent, `REA` (replies), `RE`ply, `RER`ead, `RO`ot, `SC`roll.
@@ -426,7 +426,7 @@ Examples: `REA WAI`, `REA MAR`, `REA ALL SEC:2,9,10`, `REA NEW FRO:76703,4363`,
`POST [UNF] [PRI] [SEC:##] [TO:x] [SUB:x]`.
**Editor (EDIT):**
`/A /B /C/old/new /D# /EXIT /HELP /L/text /N# /P# /POS# /POST /T /TYPE /UPLOAD /W`. The alternative editor is LINEDIT, which numbers lines.
`/A /B /C/old/new /D# /EXIT /HELP /L/text /N# /P# /POS# /POST /T /TYPE /UPLOAD /W`. The alternative editor is LINEDIT. It gives a number to each line.
**OPTIONS:**
`CH`aracter (prompt character), `E`ditor, `HI`gh, `I`nitial, `MO`de, `N`ame, `P`ermanent, `PA`use, `RE`plies, `S`ession, `SEC`tions, `SK`ip, `TY`pe.
@@ -440,13 +440,13 @@ SCA /DES/LONG BRO/LONG DOW /PROTO:B
```
TAPCIS waits for these prompt tails: `Forum !`, `um !`, `es !`, `ce !`, `lex!`.
Abbreviations: commands match on unique prefixes (`REA`, `SCA`, `MESS`). Accept any prefix of at least 2–3 characters [I].
Abbreviations: the host identifies commands by unique prefixes (`REA`, `SCA`, `MESS`). Accept all prefixes of a minimum of 2–3 characters [I].
Earlier styles:
- The 1983 SIGs used a `Function:` prompt.
- The 1987 Navigator sent `OP;SM N;RE L;ED SED;UM OFF;S`, then `SSA`, `RM` (→ `No marked messages present`) and `DL1` [V, S2].
- The SIGs of 1983 used a `Function:` prompt.
- The Navigator of 1987 sent `OP;SM N;RE L;ED SED;UM OFF;S`, then `SSA`, `RM` (→ `No marked messages present`) and `DL1` [V, S2].
Not confirmed by any primary source: `RS`/`RT`/`RN`/`RI`/`RTH` as standalone shortcuts (only TAPCIS's `RS` is attested) [I].
No primary source confirms `RS`/`RT`/`RN`/`RI`/`RTH` as standalone shortcuts. Only the `RS` of TAPCIS has a record [I].
### 4.6 Leaving a forum [V, S3]
@@ -488,8 +488,8 @@ or <CR> for disposition menu !
```
**File entries:**
- Name: 6.3 format, owned by the uploader's PPN: `[ppn]FILENM.EXT`, with a `/binary` tag for binary files.
- Fields: date, size, accesses, keywords, description (at most **465 chars** [V, S10]).
- Name: 6.3 format, owned by the PPN of the uploader: `[ppn]FILENM.EXT`, with a `/binary` tag for binary files.
- Fields: date, size, accesses, keywords, description (a maximum of **465 chars** [V, S10]).
- The prompt shows the library: `DL 1 !` (1987) or `LIB !` (1989).
**Uploading:**
@@ -499,7 +499,7 @@ or <CR> for disposition menu !
**Download protocol menus:**
- 1986 menu: doc 03 §7.1.
- 1993 Mail menu: `1 XMODEM (MODEM7) protocol 2 CompuServe 'B' protocol 5 Kermit 6 CompuServe Quick 'B' protocol` [V, S6]. The gaps in the numbering are original.
- 1993 Mail menu: `1 XMODEM (MODEM7) protocol 2 CompuServe 'B' protocol 5 Kermit 6 CompuServe Quick 'B' protocol` [V, S6]. The gaps in the numbers are in the original.
**Library announcement layout (1994)** [V, S7]:
```
@@ -533,7 +533,7 @@ From: Tom Sponheim [73557,3105]
Subj: Hello
```
Address book entries look like `1 JOHN EDWARDS 71251,2457`.
Address book entries are similar to `1 JOHN EDWARDS 71251,2457`.
### 5.2 CompuServe Mail 1993, menu mode [V, S6]
@@ -558,7 +558,7 @@ Enter choice or <CR> for more !
**Reading a message:**
- Header: `Date: 18-Apr-93 22:19 EDT` / `From: Deron Kazmaier [76317,3633]` / `Subj: …`.
- Internet senders appear as `From: INTERNET:user@host`.
- Internet senders show as `From: INTERNET:user@host`.
- At the end: `Last page. Enter command or <CR> to continue !`.
**Action Menu:**
@@ -567,7 +567,7 @@ Enter choice or <CR> for more !
**Downloading mail:**
`1 messages and 227840 characters ready for download`, then the protocol menu, then `*** File Transfer Completed! ***`.
**Binary items** are tagged `* Binary * Expire:(+5) *`.
**Binary items** have the tag `* Binary * Expire:(+5) *`.
**End of the read list:**
`Last page. Enter choice or M for CompuServe Mail main menu !`.
@@ -576,10 +576,10 @@ Enter choice or <CR> for more !
- Prompt: `Mail!`. Entry text: `CompuServe Mail` / `No messages pending`.
- Error: `% Invalid command`.
- Mode menu: `Mail Mode Menu 1 MENU 2 PROMPT 3 COMMAND`, followed by `Make changes permanent for future Mail sessions ? (Y or N)`.
- Mode menu: `Mail Mode Menu 1 MENU 2 PROMPT 3 COMMAND`, and then `Make changes permanent for future Mail sessions ? (Y or N)`.
- Settings: `set edit noline`, `set page off`.
**TAPCIS 5.42's Mail setup, verbatim from PARAMS.SCR** [V, S19]. Each line TAPCIS sends waits for `!`:
**The Mail setup of TAPCIS 5.42, verbatim from PARAMS.SCR** [V, S19]. Before TAPCIS sends each line, it waits for `!`:
```
S go mail (the Mail Main Menu or "Mail!"; "No messages pending")
@@ -615,25 +615,31 @@ S NAME Enter a period to erase any information, or <CR> to leave it
S ^C
```
The script's comments show the Address Book menu as `1 INSERT an entry 2 CHANGE an entry 3 DELETE an entry 4 LIST Address Book 5 Enter/Change your NAME`, and say that NOLINE and PAGE OFF "are essential settings for TAPCIS".
The comments of the script show the Address Book menu as `1 INSERT an entry 2 CHANGE an entry 3 DELETE an entry 4 LIST Address Book 5 Enter/Change your NAME`. They also say that NOLINE and PAGE OFF "are essential settings for TAPCIS".
**What TAPCIS.EXE waits for and sends in Mail** [V, S19, strings only, so the order is inferred]: it waits for `lex!` or `ail!` (EasyPlex! and Mail!), `ID):` (`Send to (Name or User ID):`), `ect:` (`Subject:`), `N)!` / `N)?`, `Action!` and `on!`. It reads with `read all` and `REA WAI`, matches `ate:`, `rom:` and `ubj:` in headers, downloads binary items with `dow/pro:b`, deletes with `DEL`, and sends with `Compose` and `/EX`, or with `UPL/PRO:B/TYP:ASCII MAIL%.TMP` (`/TYP:LATIN1` with its /LATIN1 option; "Be patient after UPL after Send? Y answer"). Addresses take `>INTERNET:`, `>FAX`, `>POSTAL`, `>X400`, `>MCIMAIL:`, `>MHS:` and `>TLX:`, a trailing `/R` for a return receipt, and `;` for another address.
**What TAPCIS.EXE waits for and sends in Mail** [V, S19, strings only, thus the order is inferred]:
**The service's choices where the sources are silent** [I]: the send confirmation is `Send? (Y or N)!`, the result is `Message sent to Name [ppn]`, and the read prompt in command mode is `Action!`.
- Return receipts cost a $0.25 surcharge [P].
- It waits for `lex!` or `ail!` (EasyPlex! and Mail!), `ID):` (`Send to (Name or User ID):`), `ect:` (`Subject:`), `N)!` / `N)?`, `Action!` and `on!`.
- It reads with `read all` and `REA WAI`. It finds `ate:`, `rom:` and `ubj:` in headers.
- It downloads binary items with `dow/pro:b`, and deletes with `DEL`.
- It sends with `Compose` and `/EX`, or with `UPL/PRO:B/TYP:ASCII MAIL%.TMP` (`/TYP:LATIN1` with its /LATIN1 option; "Be patient after UPL after Send? Y answer").
- Addresses accept `>INTERNET:`, `>FAX`, `>POSTAL`, `>X400`, `>MCIMAIL:`, `>MHS:` and `>TLX:`, a `/R` at the end for a return receipt, and `;` for one more address.
**Our choices where the sources give no data** [I]: the send confirmation is `Send? (Y or N)!`, the result is `Message sent to Name [ppn]`, and the read prompt in command mode is `Action!`.
- Return receipts have a surcharge of $0.25 [P].
**Address forms:**
| Form | Meaning |
|---|---|
| `70000,123` | Member |
| `INTERNET:user@host` | Internet (inbound mail also arrives as `user.id@compuserve.com`) |
| `INTERNET:user@host` | Internet (inbound mail also comes as `user.id@compuserve.com`) |
| `FAX:301-3877322` | Fax gateway |
| `POSTAL` | Laser-printed postal letter |
| `MCIMAIL:` / X.400 (`ems`) | Other mail networks [P] |
| `MHS:` | Real, but the syntax is unverified [I] |
| `MHS:` | Real, but the syntax is not verified [I] |
The name and address are written `Name >ADDRESS` [V, S10].
Write the name and address as `Name >ADDRESS` [V, S10].
---
@@ -660,7 +666,7 @@ The name and address are written `Name >ADDRESS` [V, S10].
/HELP - Type this message
```
Also mentioned: `/TALK` (private chat), `/ROLL` (dice, prints `5,1`), `/GAG` (staff only), and `exceeding job limit` when the same ID enters twice [P, S17].
The sources also give `/TALK` (private chat), `/ROLL` (dice, shows `5,1`), `/GAG` (staff only), and `exceeding job limit` when the same ID enters two times [P, S17].
### 6.2 Output samples [V, S13, S17]
@@ -684,19 +690,25 @@ The later `/UST` format (1986):
3) 69 76703,1211 Tlk BOO JOE CUFFS
```
In that format, `s` means scrambled and `Tlk` means in a `/TALK`.
In that format, `s` means scrambled, and `Tlk` means in a `/TALK`.
### 6.3 Model
- **Bands and channels:** channels 1–36 per band. There was a General band plus later bands (an Adult band; a modern recreation uses bands A/B).
- **Users:** each has a **handle** and a **job number**, which is the session's job number on the host.
- **Scrambling:** a per-key "encryption". Users with the same key see clear text; everyone else sees garbage [I: implement as a deterministic scramble].
- **Bands and channels:** channels 1–36 for each band. There was a General band and, later, more bands (an Adult band; a modern recreation uses bands A/B).
- **Users:** each user has a **handle** and a **job number**. The job number is the job number of the session on the host.
- **Scrambling:** an "encryption" for each key. Users with the same key see clear text. All other users see unwanted characters [I: implement as a deterministic scramble].
- **Line format:**
- forum conferences use `(room,name) text` [V];
- a 1985 magazine quotes CB as `(Old Man) Does anyone know what time it is?`;
- **the CB format is unresolved** — choose `(ch,Handle)` for consistency with forums [I].
- Forum conferences use `(room,name) text` [V].
- A magazine of 1985 quotes CB as `(Old Man) Does anyone know what time it is?`.
- **The CB format is not known.** Use `(ch,Handle)`, the same as forums [I].
**As built** [I]: `(Handle) text` for the tuned channel (the 1985 quote), `(ch,Handle) text` for a monitored one, `** Handle tuned in to channel n **` and `** Handle left channel n **` for comings and goings, `(Talk job,Handle) text` in a `/TALK`. The entry asks `What's your handle?` and `What channel (1-36)?`; `/TUN` answers `(Tuned to channel n, k others here)`.
**As built** [I]:
- `(Handle) text` for the tuned channel (the 1985 quote).
- `(ch,Handle) text` for a monitored channel.
- `** Handle tuned in to channel n **` and `** Handle left channel n **` when users come and go.
- `(Talk job,Handle) text` in a `/TALK`.
- At the entry, the host asks `What's your handle?` and `What channel (1-36)?`. `/TUN` answers `(Tuned to channel n, k others here)`.
---
@@ -706,16 +718,16 @@ In that format, `s` means scrambled and `Tlk` means in a `/TALK`.
|---|---|
| 1981 | 300 baud: $5.00/hr non-prime, $22.50/hr prime |
| 1986 | Non-prime $6 (300) / $12.50 (1200); prime $12.50 / $15 |
| 1987 | $6 (300) / $12.50 (1200/2400); prime surcharge dropped |
| 1987 | $6 (300) / $12.50 (1200/2400); no prime surcharge |
| ~1990 | $6.50 / $12.75 |
| Feb 1994 | Standard plan: $8.95/month for basic services, connect $4.80/hr (≤2400) and $9.60/hr (9600/14400). Alternative plan: $2.50/month plus $6.30 / $12.80 / $22.80 per hour. Non-prime is 1900–0800 weekdays and all weekend. |
Sources: trs-80.org, Compute! #78, START v2n3, S8.
**Menu markers:**
- `+` marks extended (hourly) services and `$` marks premium surcharges.
- `+` marks extended (hourly) services, and `$` marks premium surcharges.
- `(FREE)` marks free pages.
- The Executive Option added a $10/month minimum, 6-month file storage and exclusive databases.
- The Executive Option added a minimum of $10/month, file storage for 6 months and exclusive databases.
**GO BILLING (1988)** [V, S3]:
```
@@ -751,7 +763,7 @@ Last page !
The 1994 `NEWBIL` "Enhanced Billing Display" menu: `1 Account Balance`, `2 Pricing Plans & Clubs`, `3 Mail and Other Allowances`, `4 Account History`, `5 Detailed Session Activity`, `6 Hardcopy Requests`.
**For the revival:** bill in fake period dollars from recorded connect time. This adds charm and costs nothing.
**For the revival:** show bills in fake period dollars from the recorded connect time. This adds charm, and it costs nothing.
---
@@ -775,12 +787,12 @@ The 1994 `NEWBIL` "Enhanced Billing Display" menu: `1 Account Balance`, `2 Prici
## 9. Gaps
- No verbatim capture of CB band selection or of CB line format with channel numbers.
- There is no verbatim capture of the CB band selection, or of the CB line format with channel numbers.
- The `MHS:` address syntax.
- The exact text for a bad password (two candidates in §1.4).
- The exact text for a bad password (two possible texts in §1.4).
- `RS`/`RT`/`RN` shortcuts and QUICKSCAN output format (TAPCIS uses `SCA QUI`).
- **Next sources to mine:**
- Computer History Museum scans of CompuServe manuals (<https://archive.computerhistory.org/resources/access/text/2024/06/102751645-05-01-acc.pdf>, also 102751668, 102805861; OCR needed);
- *The Complete Handbook of CompuServe*;
- the 32 GB host disk images (doc 01 §2);
- <https://compuserveweb.com/>, a live recreation, to compare against.
- Computer History Museum scans of CompuServe manuals (<https://archive.computerhistory.org/resources/access/text/2024/06/102751645-05-01-acc.pdf>, also 102751668, 102805861; they need OCR).
- *The Complete Handbook of CompuServe*.
- The 32 GB host disk images (doc 01 §2).
- <https://compuserveweb.com/>, a live recreation, for comparison.
+77 -77
View File
@@ -1,25 +1,25 @@
# 03 — Link Protocols: A, B, B Plus, ESC I, VIDTEX
These protocols run *inside* the character stream of a terminal session. The host switches into them for file transfers, terminal identification and graphics. They also carry the GUI clients' HMI traffic (see [04](04-cim-hmi.md)). A reimplementation must have a correct B+ engine. Without it, nothing downloads, and CIM does not work at all.
These protocols run *inside* the character stream of a terminal session. The host changes to them for file transfers, terminal identification and graphics. They also carry the HMI traffic of the GUI clients (refer to [04](04-cim-hmi.md)). A new implementation must have a correct B+ engine. Without it, no downloads operate, and CIM does not operate at all.
Confidence tags: **[C]** confirmed from a spec or reference code · **[I]** inferred.
Confidence tags: **[C]** confirmed from a specification or reference code · **[I]** inferred.
## Sources
| Key | Source |
|---|---|
| R | Russ Ranshaw, *The CompuServe B Plus Protocol*, 18 Nov 1993. CompuServe's own spec. <https://discmaster.textfiles.com/view/16904/SOS-DFUE.ISO/programm/texte/bplus.doc> |
| R | Russ Ranshaw, *The CompuServe B Plus Protocol*, 18 Nov 1993. The specification from CompuServe. <https://discmaster.textfiles.com/view/16904/SOS-DFUE.ISO/programm/texte/bplus.doc> |
| W | Steve Wilhite, `bp.c` / `dte.c` (1985), Classic B reference code. comp.sources.unix, Mar 1986. <https://www.tuhs.org/Usenet/comp.sources.unix/1986-March/002804.html> |
| O | Steve Sneed, OOBPLUS 1.0 (1991), Pascal B+ used by OzCIS. <https://discmaster.textfiles.com/view/16184/MAX_PROGRAMMERS.iso/PASCAL/OOBPLS10.ZIP> |
| O | Steve Sneed, OOBPLUS 1.0 (1991), the Pascal B+ that OzCIS uses. <https://discmaster.textfiles.com/view/16184/MAX_PROGRAMMERS.iso/PASCAL/OOBPLS10.ZIP> |
| A | *Protocol Notes: CIS A Protocol* (1982/83). <https://discmaster.textfiles.com/view/19793/2015.02.ftp.barnyard.co.uk.tar/ftp.barnyard.co.uk/cpm/walnut-creek-CDROM/CPM/CIS/PROTCISA.TXT> |
| T | Tandy, *TRS-80 Videotex Software Specifications (26-5000)*. <https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/TRS-80%20Videotex%20Software%20Specifications%20(Tandy).pdf> |
| M | *Antic*, Aug 1986, "Going Online" (verbatim download transcript). <https://www.atarimagazines.com/v5n4/GoingOnline.html> |
| P | HP Palmtop Paper CIS forum guide. <https://www.palmtoppaper.com/ptphtml/1/ptp10025.htm> |
| Wk | Wikipedia, "B protocol". <https://en.wikipedia.org/wiki/B_protocol> |
The two spec check values were recomputed and match R. Sample packet `10 42 37 54 44 41 53 2E 43 03` gives standard checksum **0x2A** and XMODEM-CRC (init 0xFFFF) **0x57FF**. Use them as unit-test vectors.
We calculated the two check values of the specification again, and they agree with R. The sample packet `10 42 37 54 44 41 53 2E 43 03` gives the standard checksum **0x2A** and the XMODEM-CRC (init 0xFFFF) **0x57FF**. Use them as unit-test vectors.
Byte names used below: `SOH`=01, `ETX`=03, `EOT`=04, `ENQ`=05, `SI`=0F, `SO`=0E, `DLE`=10, `DC1`=11, `DC3`=13, `NAK`=15, `ESC`=1B, `RS`=1E.
Byte names in this document: `SOH`=01, `ETX`=03, `EOT`=04, `ENQ`=05, `SI`=0F, `SO`=0E, `DLE`=10, `DC1`=11, `DC3`=13, `NAK`=15, `ESC`=1B, `RS`=1E.
---
@@ -27,27 +27,27 @@ Byte names used below: `SOH`=01, `ETX`=03, `EOT`=04, `ENQ`=05, `SI`=0F, `SO`=0E,
| Protocol | Era | Notes |
|---|---|---|
| A | 1980–82 | Original. Tied to the AgVision/VideoTex projects [Wk]. B replaced it in 1982 [R]. |
| A | 1980–82 | The first protocol. Related to the AgVision/VideoTex projects [Wk]. B replaced it in 1982 [R]. |
| Classic B | 1982– | Stop-and-wait, 512-byte buffer, 8-bit additive checksum. |
| Interim B / "Quick B" | mid-80s | Adds `+` parameter negotiation and send-ahead. [O] calls a session "Quick B" once a `+` packet is seen. [I] |
| Interim B / "Quick B" | mid-80s | Adds `+` parameter negotiation and send-ahead. [O] calls a session "Quick B" after it sees a `+` packet. [I] |
| B Plus (B+) | late 80s–90s | Full negotiation: windows, 2 KB blocks, CRC-16/32, configurable quoting, download resume, file info, transport layer. **WinCIM and OzCIS use this.** |
---
## 2. A protocol [C, A]
- 8N1. The host enters protocol mode with **SI** and leaves it with **SO**. The terminal strips parity when looking for SI.
- 8N1. The host goes into protocol mode with **SI** and leaves it with **SO**. The terminal removes parity when it looks for SI.
- Host commands inside protocol mode:
- `ESC I`: identify (§5)
- `ESC A`: start a transfer
- `ESC L`: CP/M memory load
- ACK = `.` (2E), NAK = `/` (2F). If nothing comes back, the host re-sends ETX up to 4 times, then aborts. Ctrl-U from the terminal aborts.
- Header record: `SOH <rec#> <U|D> <A|B> <filespec> CR [LF] ETX <ck>`. Data records: `SOH <rec#> <data> ETX <ck>`. The last data record carries `EOT` just before ETX. SO ends the session.
- ACK = `.` (2E), NAK = `/` (2F). If no answer comes back, the host sends ETX again up to 4 times, then aborts. Ctrl-U from the terminal aborts.
- Header record: `SOH <rec#> <U|D> <A|B> <filespec> CR [LF] ETX <ck>`. Data records: `SOH <rec#> <data> ETX <ck>`. The last data record has `EOT` immediately before ETX. SO ends the session.
- Record numbers are ASCII `1`…`9`,`0`,`1`… [I]
- Masking: a data byte < 0x20 is sent as `DLE, b+0x40`. Framing characters are sent raw.
- Checksum: same rotate-add-carry as B (§3.3). It covers the bytes after SOH, excluding ETX, and is computed on unmasked values. A checksum < 0x20 is masked.
- Masking: the sender sends a data byte < 0x20 as `DLE, b+0x40`. It sends framing characters raw.
- Checksum: the same rotate-add-carry as B (§3.3). It covers the bytes after SOH, without ETX, and is calculated on unmasked values. A checksum < 0x20 is masked.
Priority for us: **low**. Implement only for completeness (period 8-bit clients).
Priority for us: **low**. Implement it only for completeness (8-bit clients of the period).
---
@@ -55,7 +55,7 @@ Priority for us: **low**. Implement only for completeness (period 8-bit clients)
### 3.1 Initiation [C, R §D/§L, W]
The host is always the initiator. While the terminal is in plain terminal mode, the host sends **ENQ**. The terminal's reply tells the host which B version it speaks:
The host always starts. While the terminal is in plain terminal mode, the host sends **ENQ**. The reply of the terminal tells the host which B version the terminal uses:
| Client | Reply to ENQ | Bytes |
|---|---|---|
@@ -64,14 +64,14 @@ The host is always the initiator. While the terminal is in plain terminal mode,
| B Plus | `DLE '+' '+' DLE '0'` | `10 2B 2B 10 30` |
| B Plus, relaxed timing | `DLE '+' '+' 'R' DLE '0'` | `10 2B 2B 52 10 30` (host doubles its timeouts) |
On ENQ the terminal resets to seq `'0'`, a 512-byte buffer, the standard checksum and the default quote set, and **stays in terminal mode**. It only enters protocol mode when it sees `DLE 'B'`.
On ENQ, the terminal resets to seq `'0'`, a 512-byte buffer, the standard checksum and the default quote set, and **stays in terminal mode**. It goes into protocol mode only when it sees `DLE 'B'`.
Host loop: send ENQ, at most 5 tries. Parse the reply:
- each `+` before the `DLE digit` raises `PlusSeen`, then `PlusPlus`;
- `R` sets relaxed timing;
- the digit seeds the sequence numbers.
Host loop: send ENQ, a maximum of 5 tries. Parse the reply:
- Each `+` before the `DLE digit` sets `PlusSeen`, then `PlusPlus`.
- `R` sets relaxed timing.
- The digit is the start value of the sequence numbers.
Then send a `+` packet (§4) if any `+` was seen, otherwise go straight to the `T` packet.
Then, if the host saw a `+`, it sends a `+` packet (§4). If not, it goes directly to the `T` packet.
### 3.2 Packet framing [C, R §C1, W]
@@ -80,9 +80,9 @@ DLE 'B' <seq> <type> <body…quoted> ETX <check…quoted> [RS]
10 42 30–39
```
- **seq**: one ASCII digit, `'9'` wraps to `'0'`. The host's first packet after the ENQ reply `DLE '0'` is `'1'`. The counter is shared by both directions: the receiver adopts the received seq, and its next sent packet uses seq+1 [I from W/O]. The Transport Layer (§4.6) keeps separate counters.
- **check**: covers seq + type + body + ETX, computed on the **unquoted** bytes (the quoting DLEs are not included). The check bytes are quoted themselves if they fall in the quote set.
- **size**: Classic B has a 512-byte buffer *including* the type byte, so at most 511 data bytes per `N`. B+ allows 0–2048 data bytes.
- **seq**: one ASCII digit. After `'9'`, it goes back to `'0'`. The first packet of the host after the ENQ reply `DLE '0'` is `'1'`. The two directions share the counter: the receiver uses the received seq, and its next sent packet uses seq+1 [I from W/O]. The Transport Layer (§4.6) keeps separate counters.
- **check**: covers seq + type + body + ETX, calculated on the **unquoted** bytes (the quoting DLEs are not included). If the check bytes are in the quote set, they are also quoted.
- **size**: Classic B has a 512-byte buffer that *includes* the type byte. Thus, there is a maximum of 511 data bytes for each `N`. B+ permits 0–2048 data bytes.
- **RS** follows the check value only when CM is 2 or 3 (§4.3).
### 3.3 Standard checksum [C, R §M, W]
@@ -104,12 +104,12 @@ func bChecksum(p []byte) byte {
- Encode 0x00–0x1F as `DLE, c+0x40` (ETX becomes `10 43`).
- Encode 0x80–0x9F as `DLE, (c&0x1F)+0x60` (0x93 becomes `10 73`).
- Decode: after a DLE, if the next byte < 0x60 the value is `c & 0x1F`, otherwise `(c & 0x1F) | 0x80`. **Decoders must accept a quoted byte even if it is not in the negotiated set.**
- Decode: after a DLE, if the next byte < 0x60, the value is `c & 0x1F`. If not, it is `(c & 0x1F) | 0x80`. **Decoders must accept a quoted byte also if it is not in the negotiated set.**
Default sets:
- Wilhite's Classic sender quotes `03 05 10 11 13 15`.
- The Classic sender of Wilhite quotes `03 05 10 11 13 15`.
- R §L lists all of 0x00–0x1F as the Classic default.
- The CIS host's B+ set is `03 05 10 11 13 15 1E 91 93`.
- The B+ set of the CIS host is `03 05 10 11 13 15 1E 91 93`.
**Host policy [I]:** quote all of 0x00–0x1F for Classic clients. That is always safe.
@@ -117,9 +117,9 @@ Default sets:
| Type | Body | Meaning |
|---|---|---|
| `T` | `<dir><dtype><filename>` | Transfer control. dir: `D` download (host→term), `U` upload, `C` close/EOF. dtype: `A` 7-bit ASCII (EOL conversion allowed), `B` binary, `I` image. Examples: `TDBFOO.ZIP`, `TUAREADME.TXT`, `TC`. |
| `N` | data | File data. A zero-length `N` is legal and is **not** EOF. |
| `F` | `<code>[text]` | Failure. The seq is ignored. Codes: `A` user abort, `C` capacity, `E` processing error, `I` I/O, `M` upload file missing, `N` unimplemented packet type, `S` sequence, `r` resume failure. The receiver ACKs it, then both sides leave protocol mode. |
| `T` | `<dir><dtype><filename>` | Transfer control. dir: `D` download (host→term), `U` upload, `C` close/EOF. dtype: `A` 7-bit ASCII (EOL conversion permitted), `B` binary, `I` image. Examples: `TDBFOO.ZIP`, `TUAREADME.TXT`, `TC`. |
| `N` | data | File data. A zero-length `N` is permitted and is **not** EOF. |
| `F` | `<code>[text]` | Failure. The receiver ignores the seq. Codes: `A` user abort, `C` capacity, `E` processing error, `I` I/O, `M` upload file missing, `N` unimplemented packet type, `S` sequence, `r` resume failure. The receiver ACKs it. Then the two sides leave protocol mode. |
| `+` | parameters | B+/Interim negotiation (§4.1). |
| `M` / `L` | data | Transport Layer: `M` more data follows, `L` last packet of a block. |
| `Tr` `Tf` `TI` | — | B+ resume and file info (§4.5). |
@@ -132,12 +132,12 @@ Default sets:
| NAK | `15` | Bad check or unexpected seq |
| WACK | `DLE ';'` (`10 3B`) | Wait. The sender pauses (W sleeps 5 s). |
| ENQ in session | `05` | Peer replies `DLE <last seq>` |
| Duplicate packet | — | Re-ACK it, discard it |
| Duplicate packet | — | ACK it again, discard it |
| Panic abort | `10 10 10 10` | Four DLEs from the terminal |
| Fallback detect | `DLE '+'` while waiting for an ACK | Terminal fell back to terminal mode: abort |
| Fallback detect | `DLE '+'` while the sender waits for an ACK | The terminal went back to terminal mode: abort |
- Response to a NAK: Classic retransmits the last packet. Interim and B+ send `ENQ ENQ`, wait for two identical ACKs, then resend everything unacked.
- Timeouts: 10 s per character, at most 10 errors. On a slow link the receiver should not NAK on timeout.
- Response to a NAK: Classic sends the last packet again. Interim and B+ send `ENQ ENQ`, wait for two identical ACKs, then send again all packets that are not acknowledged.
- Timeouts: 10 s for each character, a maximum of 10 errors. On a slow link, the receiver must not send NAK on timeout.
### 3.7 Flows [I from W/O, consistent with R]
@@ -153,7 +153,7 @@ H→T DLE B 'n' "TC" ETX ck
T→H DLE 'n' done; client is back in terminal mode
```
Upload: the host sends `TU<A|B><name>`. The **client does not ACK `TU`**: its first `N` packet (seq+1) is the implicit acknowledgement. The host ACKs each `N`, and the client ends with `TC`, which the host ACKs.
Upload: the host sends `TU<A|B><name>`. The **client does not ACK `TU`**: its first `N` packet (seq+1) is the implicit acknowledgement. The host ACKs each `N`. The client ends with `TC`, and the host ACKs it.
---
@@ -161,22 +161,22 @@ Upload: the host sends `TU<A|B><name>`. The **client does not ACK `TU`**: its fi
### 4.1 Transport Parameters packet (`+`)
- Always sent with the standard checksum.
- While it is in flight, B+ quotes 0x00–0x1F **and** 0x80–0x9F (Interim quotes 0x00–0x1F only).
- Body = binary bytes in this order. Missing trailing fields default to 0, and extra fields are ignored.
- The sender always sends it with the standard checksum.
- While it is in transit, B+ quotes 0x00–0x1F **and** 0x80–0x9F (Interim quotes 0x00–0x1F only).
- Body = binary bytes in this sequence. Missing fields at the end have the default 0. The receiver ignores extra fields.
| # | Field | Values |
|---|---|---|
| 1 | WS | Window Send: 0 = one outstanding, 1 = two … |
| 2 | WR | Window Receive, same encoding |
| 3 | BS | Block size ÷ 128: 0 or 4 = 512, 8 = 1024, 16 = 2048. R's text says "0x16" for 2048; that is a typo. |
| 3 | BS | Block size ÷ 128: 0 or 4 = 512, 8 = 1024, 16 = 2048. The text of R says "0x16" for 2048. That is a typing error. |
| 4 | CM | Check method: 0 standard, 1 XMODEM CRC-16, 2 CCITT CRC-16, 3 CRC-32 |
| 5 | DQ | Obsolete quote level, ignored if Q1–Q8 are present. 0 = {00 03 05 10 11 13 15}; 1 = {03 05 10 11 13 15}; 2 = level 1 + {91 93}; 3 = all of 0x00–0x1F and 0x80–0x9F |
| 6 | TL | 1 = Transport Layer supported |
| 7–10 | Q1–Q4 | Bitmask for 0x00–0x1F. Q1 bit7 = 0x00 … bit0 = 0x07; Q2 = 08–0F; Q3 = 10–17; Q4 = 18–1F |
| 11–14 | Q5–Q8 | Same bitmask for 0x80–0x9F |
| 15 | DR | Download resume: 0 none, 1 `Tr`, 2 `Tr` + `Tf` |
| 16 | UR | Upload resume. Not described; [O] says "not supported by CIS". |
| 16 | UR | Upload resume. Not described. [O] says "not supported by CIS". |
| 17 | FI | 1 = `TI` file-info packet supported |
- **CIS host values:** Q1–Q4 = `14 00 D4 02`, Q5–Q8 = `00 00 50 00`. That decodes to {03 05 10 11 13 15 1E 91 93}.
@@ -192,12 +192,12 @@ T→H DLE B '2' '+' <client params> ETX ck (implicit ACK of '1') [I]
H→T 10 32
```
Both sides then compute the same result:
Then the two sides calculate the same result:
- `sendWin = min(ownWS, peerWR)` and `recvWin = min(ownWR, peerWS)` (note the cross).
- `min()` of BS, CM, TL, DR, UR and FI.
- **Bitwise OR** of the quote masks.
The very next packet already uses the negotiated values.
The next packet already uses the negotiated values.
### 4.3 Check methods [C, R §C3/§M]
@@ -212,33 +212,33 @@ In Go: CM=3 is `hash/crc32.ChecksumIEEE`. CM=1 is CRC-16/CCITT-FALSE. CM=2 is CR
### 4.4 Sliding window [C, R §H/§I]
- The sender keeps one buffer per unacked packet. If the window is full, it waits for an ACK.
- An ACK for an older packet means ACKs were lost: release everything up to and including that packet.
- On a NAK: `ENQ ENQ` resync, then resend everything unacked.
- Back-off: +3 per retransmit, −1 per ACK. At ≥ 12, drop to stop-and-wait.
- Suggested block size by speed: 300 bps → 128, 1200 → 512, 2400 → 1024, 9600 → 2048 with a window of 4–5. Over telnet, use 2048 with the window the client offers.
- The sender keeps one buffer for each packet that is not acknowledged. If the window is full, it waits for an ACK.
- An ACK for an older packet means that ACKs were lost: release all packets up to and including that packet.
- On a NAK: `ENQ ENQ` resync, then send again all packets that are not acknowledged.
- Back-off: +3 for each retransmit, −1 for each ACK. At ≥ 12, change to stop-and-wait.
- Recommended block size by speed: 300 bps → 128, 1200 → 512, 2400 → 1024, 9600 → 2048 with a window of 4–5. Over telnet, use 2048 with the window that the client offers.
### 4.5 Resume and file info
- **`Tr<len> <crc> `**: sent by the client in reply to `TD` when it has a partial file. The fields are ASCII decimal, each followed by a space. The CRC uses the session algorithm, or XMODEM CRC-16 init −1 if the session uses the plain checksum.
- If the host's CRC over its first `len` bytes matches, it continues with `N` packets from that offset, or sends `TC` if the file is already complete.
- On mismatch: `Fr` if DR=1, or `Tf` if DR=2 (the client ACKs, then the full file follows).
- **`TI`**: sent by the file sender when FI=1. Body: `TI <dtype> <compression=0x00> <length> <tz> <cdate yyyymmdd> <ctime secs> <mdate> <mtime> <namelen as a binary byte> <truename>`, space-separated ASCII decimal. Spec example: `A\x0055387 300 19880422 52480 0 0 \x09BPLUS.DOC`.
- **`Tr<len> <crc> `**: the client sends it as the reply to `TD` when it has a partial file. The fields are ASCII decimal, each followed by a space. The CRC uses the algorithm of the session, or XMODEM CRC-16 init −1 if the session uses the plain checksum.
- If the CRC of the host over its first `len` bytes agrees, the host continues with `N` packets from that offset. If the file is already complete, it sends `TC`.
- If it does not agree: `Fr` if DR=1, or `Tf` if DR=2 (the client ACKs, then the full file follows).
- **`TI`**: the file sender sends it when FI=1. Body: `TI <dtype> <compression=0x00> <length> <tz> <cdate yyyymmdd> <ctime secs> <mdate> <mtime> <namelen as a binary byte> <truename>`, ASCII decimal with spaces between the fields. Example from the specification: `A\x0055387 300 19880422 52480 0 0 \x09BPLUS.DOC`.
### 4.6 Transport Layer (TL=1)
- An application escape sequence starts it. **That escape sequence is undocumented in R.**
- An application escape sequence starts it. **R does not document that escape sequence.**
- It uses separate send and receive sequence counters, carries data in `M`/`L` packets, and ends with `F`.
- This is the carrier for CIM/HMI. A reverse-engineered WinCIM 3 server reports host params `04 04 02 00 00 01` (TL=1), and HMI messages in `L` packets, entered via `ESC [ > … p`. See [04](04-cim-hmi.md) §2.4–§4.
- This is the carrier for CIM/HMI. A reverse-engineered WinCIM 3 server reports host params `04 04 02 00 00 01` (TL=1), and HMI messages in `L` packets, started through `ESC [ > … p`. Refer to [04](04-cim-hmi.md) §2.4–§4.
### 4.7 Line requirements
- An 8-bit clean path is required. The client must honour XON/XOFF from the host, which is why 11, 13, 91 and 93 are always quoted.
- An 8-bit clean path is necessary. The client must obey XON/XOFF from the host. For this reason, 11, 13, 91 and 93 are always quoted.
- **Over telnet [I]:**
- Negotiate `WILL/DO BINARY` in both directions.
- Double any 0xFF data byte (0xFF is not in any quote set).
- Strip the NUL from CR-NUL on input.
- Otherwise B+ streams get corrupted.
- Negotiate `WILL/DO BINARY` in the two directions.
- Double each 0xFF data byte (0xFF is not in a quote set).
- Remove the NUL from CR-NUL on input.
- If not, B+ streams become corrupted.
---
@@ -256,7 +256,7 @@ Example reply: `#CPM MYSYSTEM,CC,HC,PA,PL,` + CR.
### 5.3 B Plus era [C, R §N]
Order: the host normally runs the **ENQ test first**, then sends `ESC I` if the client speaks B.
Sequence: the host usually does the **ENQ test first**. Then it sends `ESC I` if the client uses B.
```
'#' <PID>:<Ver>:<OS> ',' {Fcode ','}* '+' <checksum decimal> CR
@@ -265,27 +265,27 @@ e.g. #WINCIM:1.0.b7:W31,… (PID ≤6, Ver ≤12, OS ≤3 chars)
| Group | Codes |
|---|---|
| Screen | `AC` ANSI colour · `CA` ANSI/VT100 cursor · `CC` VIDTEX/VT52 cursor · `CW` wide characters (`ESC m` on / `ESC l` off) · `SSyx` screen size (y = lines+31, x = cols+31, e.g. `SS7o` = 24×80; unused by CIS) |
| Screen | `AC` ANSI colour · `CA` ANSI/VT100 cursor · `CC` VIDTEX/VT52 cursor · `CW` wide characters (`ESC m` on / `ESC l` off) · `SSyx` screen size (y = lines+31, x = cols+31, for example `SS7o` = 24×80. CIS does not use it) |
| Graphics | `GF` GIF · `GH` hi-res RLE · `GM` med-res RLE · `GJ` JPEG · `NF` NAPLPS · `GIvcpwwwhhh` GIF capabilities |
| Protocols | `AP` Application Protocol (**the HMI flag** [I]) · `CB` capture buffer · `PB` B protocol · `PX` XMODEM |
| International | `CHd` charset · `COddd` country · `LAd` language |
| Misc | `HC` hard copy · `XX` ignored · `DT` seen in real replies, meaning undocumented |
| Misc | `HC` hard copy · `XX` ignored · `DT` seen in real replies, meaning not documented |
**Checksum:** the 16-bit sum of every character from `#` through `+`, sent as ASCII decimal. On a mismatch the host re-sends `ESC I` and compares consecutive replies, up to 10 tries. The spec's own example (`#PC3:3.2a:D,CC,GH,GM,GF,PB,+1035`) does **not** add up; the plain sum is 1680. OzCIS uses the plain sum.
**Checksum:** the 16-bit sum of all characters from `#` through `+`, sent as ASCII decimal. If the sum does not agree, the host sends `ESC I` again and compares consecutive replies, up to 10 tries. The example of the specification (`#PC3:3.2a:D,CC,GH,GM,GF,PB,+1035`) does **not** agree: the plain sum is 1680. OzCIS uses the plain sum.
**Host policy [I]:**
- Accept the reply if the sum matches, or if two consecutive replies are identical.
- Treat the ENQ reply as the authoritative B test; `PB` is advisory.
- Parse leniently: `#`, then comma-separated tokens, with product id first.
- Accept the reply if the sum agrees, or if two consecutive replies are identical.
- Use the ENQ reply as the authoritative B test. `PB` is only advisory.
- Parse leniently: `#`, then tokens with commas between them, with the product id first.
Real replies:
- Wilhite (pre-B+): `#IB1,PB,DT\r`
- Wilhite (before B+): `#IB1,PB,DT\r`
- OzCIS: `#OZ3,OzCIS1,AC,CA,SSxx,GF,PB,DT,+<sum>\r`
### 5.4 GIF interrogation [C as client behaviour, O]
- The host sends `ESC [ > 0 g`. The client replies with a capability string such as `#89a;1;0,320,200,4,0;0,640,200,2,2;…\r`.
- `ESC [ > 1 g` announces a GIF, which then arrives as a B+ download (`+`, then `T…`) straight into the viewer. The host waits for a CR once the image has been shown.
- The host sends `ESC [ > 0 g`. The client replies with a capability string, for example `#89a;1;0,320,200,4,0;0,640,200,2,2;…\r`.
- `ESC [ > 1 g` tells the client that a GIF comes. The GIF then arrives as a B+ download (`+`, then `T…`) directly into the viewer. The host waits for a CR after the client shows the image.
---
@@ -307,10 +307,10 @@ Real replies:
| `0C` / `0D` / `0A` / `09` / `08` | Clear screen / CR / LF / tab / backspace |
**RLE graphics:**
- After `ESC G M` or `ESC G H` the data is byte pairs `(count_off+0x20, count_on+0x20)`, run-length encoding a monochrome image.
- Only `ESC G N` is recognised while in graphics mode.
- After `ESC G M` or `ESC G H`, the data is byte pairs `(count_off+0x20, count_on+0x20)`. They are a run-length encoding of a monochrome image.
- In graphics mode, the terminal recognises only `ESC G N`.
The VIDTEX set is essentially VT52-compatible, so the host can use the same cursor codes for clients that report `CC`.
The VIDTEX set is almost the same as VT52. Thus, the host can use the same cursor codes for clients that report `CC`.
---
@@ -332,22 +332,22 @@ transfer is complete
### 7.2 Later additions [C, P]
By about 1991, command mode offered Xmodem, Kermit and CIS-B (`LIB n`, `BRO`, `DIR`, `DOW <file>`). YMODEM likely came later. [I]
By about 1991, command mode offered Xmodem, Kermit and CIS-B (`LIB n`, `BRO`, `DIR`, `DOW <file>`). YMODEM probably came later. [I]
### 7.3 Host mechanics
| Choice | Host action |
|---|---|
| CIS B | Immediately ENQ → (`+` negotiation) → `TD…`. No user action needed: clients auto-start on `DLE B`. |
| CIS B | Immediately ENQ → (`+` negotiation) → `TD…`. The user does not have to do an action: clients start automatically on `DLE B`. |
| XMODEM / Kermit | Print the start message, run the standard protocol, then wait for CR. |
| DC2/DC4 capture | `DC2` (12), raw text, `DC4` (14). Conventional capture on/off. [I] |
| A | `SI ESC A …` per §2 |
| A | `SI ESC A …` as in §2 |
---
## 8. Gaps
- No public modern B+ implementation was found. A FreeBSD port `bpl+` (1989) exists but could not be fetched. **[O] and [W] are the best references to port into Go.**
- The Application Protocol / Transport Layer start escape is undocumented in R. A 2026 reverse-engineering project reports `ESC [ > 0 q` / `ESC [ > 3;3 p` then ACK (doc 04 §2.4). Confirm on the wire.
- The meaning of `DT` is unknown, as is the full VIDTEX 4.x escape set.
- We found no public modern B+ implementation. A FreeBSD port `bpl+` (1989) exists, but we could not get it. **[O] and [W] are the best references to port into Go.**
- R does not document the start escape of the Application Protocol / Transport Layer. A 2026 reverse-engineering project reports `ESC [ > 0 q` / `ESC [ > 3;3 p`, then ACK (doc 04 §2.4). Confirm this on the wire.
- The meaning of `DT` is not known. The full VIDTEX 4.x escape set is also not known.
- Not retrieved: the Dr. Dobb's article on B, Jul 1986 (Levi Thomas & Nick Turner, vol. 11 no. 7, pp. 54–59).
+68 -68
View File
@@ -1,23 +1,23 @@
# 04 — The GUI Service: CIM clients and HMI
The graphical clients (DOSCIM, WinCIM, MacCIM, OS/2 CIM, CSNAV/MacNAV, OzWIN, TAPCIS 6.1) did not scrape text. They spoke **HMI (Host-Micro Interface)**, a binary request/response protocol that runs **inside B Plus Transport Layer packets** (see [03](03-link-protocols.md) §4.6).
The graphical clients (DOSCIM, WinCIM, MacCIM, OS/2 CIM, CSNAV/MacNAV, OzWIN, TAPCIS 6.1) did not scrape text. They used **HMI (Host-Micro Interface)**, a binary request/response protocol that runs **inside B Plus Transport Layer packets** (refer to [03](03-link-protocols.md) §4.6).
CompuServe never published the HMI spec. Everything below the B+ layer comes from reverse engineering.
CompuServe never published the HMI specification. All data below the B+ layer comes from reverse engineering.
Tags: **[C]** confirmed (period or primary document) · **[S]** secondary (Wikipedia, recollections) · **[RE]** from one reverse-engineering source only, not yet checked by us · **[GAP]** unknown.
Tags: **[C]** confirmed (document of the period or primary document) · **[S]** secondary (Wikipedia, recollections) · **[RE]** from one reverse-engineering source only, not yet checked by us · **[GAP]** unknown.
## Sources
| Key | Source |
|---|---|
| E | `24high/CompuServe-Emulator`, a C# server (Sep 2026) that claims to bring WinCIM 3.x online. It was recovered by disassembling WinCIM 3.0.2 (`CCTN240C.DLL`, `CS3COR.DLL`, `CS3.EXE`). Notes in German: `HMI-PROTOKOLL.md`, `SECURE-LOGIN.md`, `NAECHSTER-SCHRITT.md`, `POST.md`, `SUCHE.md`. <https://github.com/24high/CompuServe-Emulator> |
| E | `24high/CompuServe-Emulator`, a C# server (Sep 2026) that claims to bring WinCIM 3.x online. Its author recovered the data with a disassembly of WinCIM 3.0.2 (`CCTN240C.DLL`, `CS3COR.DLL`, `CS3.EXE`). Notes in German: `HMI-PROTOKOLL.md`, `SECURE-LOGIN.md`, `NAECHSTER-SCHRITT.md`, `POST.md`, `SUCHE.md`. <https://github.com/24high/CompuServe-Emulator> |
| F | CompuServe HMI developer FAQ, Nov 1994. <https://discmaster.textfiles.com/view/21536/03-Comm.zip/hmidev.txt> |
| N | Rick Wilkes, CIS HMI/NISA migration FAQ, Dec 1995. <https://discmaster.textfiles.com/view/6764/CDA1_96.ISO/novell/cishmi.faq> |
| R | Ranshaw, B Plus spec (1993). See doc 03. |
| R | Ranshaw, B Plus specification (1993). Refer to doc 03. |
| P | US Patent 5,737,538 (HMI "protocol data units"). <https://patents.justia.com/patent/5737538> |
| Wc | Wikipedia, "CompuServe Information Manager". <https://en.wikipedia.org/wiki/CompuServe_Information_Manager> |
> **About source E.** It is new (0 stars when found) and is the only detailed source for the HMI layer. Treat it as a strong lead, not ground truth: check each claim against a real WinCIM under Wine or in a VM. The repo also redistributes CompuServe's 1996 connection scripts and decompiler output. **Cite it; do not copy its files into this project.**
> **About source E.** It is new (0 stars when we found it), and it is the only detailed source for the HMI layer. Use it as a strong lead, not as a proven fact: check each claim against a real WinCIM under Wine or in a VM. The repository also redistributes the 1996 connection scripts of CompuServe and decompiler output. **Cite it. Do not copy its files into this project.**
---
@@ -25,23 +25,23 @@ Tags: **[C]** confirmed (period or primary document) · **[S]** secondary (Wikip
From the developer FAQ [F]:
- HMI is "a set of protocols" with "an application-level error-correcting transport layer".
- It avoids "pattern-matching" and allows asynchronous host data.
- The toolbox was available free, under NDA and licence. CompuServe "will not release the spec or source to the public".
- Developers were pointed to the IBM Communications Forum Lib 10 for the B Protocol, and the Graphics Support Forum Lib 16 for GIF.
- It does not use "pattern-matching", and it permits asynchronous host data.
- The toolbox was available free of charge, under NDA and licence. CompuServe "will not release the spec or source to the public".
- The FAQ sent developers to the IBM Communications Forum Lib 10 for the B Protocol, and to the Graphics Support Forum Lib 16 for GIF.
From the B Plus spec [R]:
- The `+` packet's 6th field, **TL**, is 1 when an application runs under the Transport Layer.
- Transport data travels in **`M`** (more follows) and **`L`** (last of block) packets. An `F` packet ends the transport session.
- The Transport Layer is entered with a "CompuServe Application Protocol escape sequence" from the host and an escape reply from the terminal. **The bytes are not given.**
- A client advertises support with the `AP` F-code in its `ESC I` reply.
From the B Plus specification [R]:
- The 6th field of the `+` packet, **TL**, is 1 when an application runs under the Transport Layer.
- Transport data goes in **`M`** (more follows) and **`L`** (last of block) packets. An `F` packet ends the transport session.
- The host starts the Transport Layer with a "CompuServe Application Protocol escape sequence", and the terminal sends an escape reply. **The specification does not give the bytes.**
- A client tells that it supports this with the `AP` F-code in its `ESC I` reply.
From the 1995 migration FAQ [N]:
- In 1995–96 forums moved from the 36-bit hosts to new **"NISA" hosts (Windows NT on Intel)**. These were **HMI-only**: no ASCII, and telnet terminal sessions were blocked.
- In 1995–96, forums moved from the 36-bit hosts to new **"NISA" hosts (Windows NT on Intel)**. These were **HMI-only**: no ASCII, and telnet terminal sessions were blocked.
- HMI clients listed: WinCIM, CSNAV, DOSCIM, OS2CIM, MacCIM, MacNAV, OzWIN, CISCOMM, TAPCIS 6.1.
- A few forums (Palmtop, Apple II, Amiga, Atari, C64) stayed on the 36-bit hosts.
- Some forums (Palmtop, Apple II, Amiga, Atari, C64) stayed on the 36-bit hosts.
- Mail got an optional, one-way HMI conversion.
So historically there were two backends: the PDP-10 hosts (ASCII + HMI) and the NISA hosts (HMI). **Our design merges them**: one core, two front ends (doc 05).
Thus, there were two backends: the PDP-10 hosts (ASCII + HMI) and the NISA hosts (HMI). **Our design merges them**: one core, two front ends (doc 05).
Client timeline [S, Wc]: CIM 1989 → WinCIM 1.x (1993) → 2.0.1 (1994, bundled Mosaic) → CompuServe for Windows / CS 3.0 (late 1996, the "CSi" rebrand, partly HTML) → AOL-based CompuServe 2000 / 7.0 (out of scope). **Target WinCIM 2.x and 3.0.x first.**
@@ -59,23 +59,23 @@ Client timeline [S, Wc]: CIM 1989 → WinCIM 1.x (1993) → 2.0.1 (1994, bundled
HostIPAddress=…
```
SANS lists port 4144 as "wincim" (<https://isc.sans.edu/port/4144>).
- **Our server should listen on 4144 for CIM and on 23 (or 2323) for terminals.** Both run the same login state machine; see doc 05.
- **Our server must listen on 4144 for CIM and on 23 (or 2323) for terminals.** The two use the same login state machine. Refer to doc 05.
- Host banner: `\r\nCONNECT 9600\r\n\r\nHost Name: `.
- The client's connection scripts drive the dial-up login, so the host prompts must match exactly.
- The connection scripts of the client control the dial-up login. Thus, the host prompts must be exactly the same.
### 2.2 The script dialogue [C: CompuServe's own CSERVE.SCR v3.9.1, 1996, hosted in E]
| Host prints | Script sends |
|---|---|
| `Host Name:` | **`CPS`** by default. **`CISAGREE`** when Network = Internet. Manuals say **`CIS`**. **Accept all three.** |
| `User ID:` | `+<id><params>/INT:60 /secure:1` for secure login. The leading `+` requests SLP. Plain login: `<id>/INT:60`. Options: `/HOST` (stop at host), `/GO:PPPCONNECT` (PPP). |
| `User ID:` | `+<id><params>/INT:60 /secure:1` for secure login. The `+` at the start requests SLP. Plain login: `<id>/INT:60`. Options: `/HOST` (stop at host), `/GO:PPPCONNECT` (PPP). |
| `Password:` | the password (plain login only) |
| `UIC:` | `^C` |
| `XPAD:` / `ITI:` | an X.121 address (network-specific) |
| `XPAD:` / `ITI:` | an X.121 address (specific to the network) |
The script treats login as **successful** on any of: `CompuServe`, `ESC [ >`, `^F` (ACK), `ESC I` (answered with its ID string). `PPP:` sends it down the PPP path.
The script accepts the login as **successful** on one of these items: `CompuServe`, `ESC [ >`, `^F` (ACK), `ESC I` (it answers with its ID string). `PPP:` sends it to the PPP path.
**Host error grammar.** The host prints `? LOG` or `??LOG` followed by a code. The script recognises these, so emit them verbatim:
**Host error grammar.** The host prints `? LOG` or `??LOG`, followed by a code. The script recognises these codes. Thus, send them verbatim:
| Code | Meaning |
|---|---|
@@ -88,7 +88,7 @@ The script treats login as **successful** on any of: `CompuServe`, `ESC [ >`, `^
Other messages: `? IPX` = InfoPlex unavailable, `? ICD` = PPP/gateway failure, ` NTW` = remote busy.
Network scripts: Tymnet answers its `log in:` prompt with `CPS` (`CNS` for AlaskaNet, `CNSG` for PacNet). That is not needed for TCP, but useful if we ever emulate a network node.
Network scripts: Tymnet answers its `log in:` prompt with `CPS` (`CNS` for AlaskaNet, `CNSG` for PacNet). TCP does not need this. But it is useful if we emulate a network node in the future.
### 2.3 Secure Login Protocol (SLP) [RE, E: SECURE-LOGIN.md, which has test vectors]
@@ -101,11 +101,11 @@ H→C "HR:" HostResponse (or "No." on failure)
- `K = MD5( UTF-16BE( lowercase(password) ) )`
- `UserResponse = MD5( K ‖ 48×0x00 ‖ H ‖ M ‖ K )`
- `HostResponse = MD5( K ‖ Z ‖ M ‖ H ‖ K )`. The meaning of `Z` must be checked in E.
- Values are Base64 plus a trailing 1-byte folded ones'-complement checksum, wrapped at 76 columns with CR.
- `DisableSecureLogin=ON` in CIS.INI falls back to plain `Password:`.
- `HostResponse = MD5( K ‖ Z ‖ M ‖ H ‖ K )`. It is necessary to check the meaning of `Z` in E.
- Values are Base64 plus a 1-byte folded ones'-complement checksum at the end, wrapped at 76 columns with CR.
- `DisableSecureLogin=ON` in CIS.INI changes back to plain `Password:`.
**Storage consequence:** the server needs K, not the plaintext password. Store K (an MD5 of the password) for SLP alongside a modern hash (bcrypt/argon2) for terminal logins. Both are derived at signup or password change. K is password-equivalent, so protect it like a secret.
**Result for storage:** the server must have K, not the plaintext password. Store K (an MD5 of the password) for SLP, together with a modern hash (bcrypt/argon2) for terminal logins. The server makes the two at signup or at a password change. K is equivalent to the password. Thus, protect it as a secret.
### 2.4 Terminal negotiation, then HMI [RE, E; checksum rule cross-checked against R]
@@ -119,34 +119,34 @@ C→H #3,2,1,4,2,0;614
H→C ACK (0x06) → client switches to HMI over B+
```
`ESC [ >` is very probably the "Application Protocol escape sequence" that [R] leaves unspecified. The `AP` code in the ID string is the client's capability flag.
`ESC [ >` is almost certainly the "Application Protocol escape sequence" that [R] does not specify. The `AP` code in the ID string is the capability flag of the client.
Server rule:
- **After login, a client whose ID string includes `AP` gets the HMI handshake.**
- A client without `AP` gets the ASCII top menu.
- The ID string's checksum follows the same rule as doc 03 §5.3.
- The checksum of the ID string follows the same rule as doc 03 §5.3.
---
## 3. B Plus as WinCIM uses it [RE, E]
- The host's `+` packet body is `04 04 02 00 00 01` (after the `+` type byte), read in Ranshaw's field order:
- The body of the `+` packet of the host is `04 04 02 00 00 01` (after the `+` type byte). In the field sequence of Ranshaw, this is:
| WS | WR | BS | CM | DQ | TL |
|---|---|---|---|---|---|
| 4 | 4 | 2 (256-byte blocks) | 0 (checksum) | 0 | **1** |
This is consistent with [R]: windows can exceed 1, and **TL=1 must be set for HMI**. E's own field labels differ; trust Ranshaw's order and check on the wire.
- E recommends BS = 8 (1024-byte blocks), and this server sends that (§4a).
- Sequence counters are separate per direction. That matches [R]'s rule for the Transport Layer, as opposed to Classic B's single shared counter.
- **Quirk:** WinCIM drops the first host message after B+ setup, so E sends the first ack twice.
- `HMIMaxTime` in CIS.INI defaults to 120 s. Send a keepalive or ack before then.
This agrees with [R]: windows can be more than 1, and **TL=1 must be set for HMI**. The field labels of E are different. Trust the sequence of Ranshaw and check on the wire.
- E recommends BS = 8 (1024-byte blocks). This server sends that value (§4a).
- Each direction has its own sequence counter. That agrees with the rule of [R] for the Transport Layer. Classic B has one shared counter.
- **Quirk:** WinCIM drops the first host message after the B+ setup. Thus, E sends the first ack two times.
- `HMIMaxTime` in CIS.INI has the default 120 s. Send a keepalive or ack before then.
---
## 4. HMI message layer [RE, E: HMI-PROTOKOLL.md]
Each HMI message rides in B+ `L` (or `M`…`L`) packets:
Each HMI message goes in B+ `L` (or `M`…`L`) packets:
```
'L' <stream:byte> <type:byte> <fields…>
@@ -178,56 +178,56 @@ Known request/response pairs:
| `0x22` | service search ("Find") | ? |
| `0x07` | logoff | — |
**Page names** use the old service page IDs: `CIS:NEWPAGE`, `CIS:CONTENTS`, `CIS:CHAT`, `CIS:FORUMS`, `HOM:MAILHMI`. A GO word the user types is prefixed with `HOM:`.
**Page names** use the old page IDs of the service: `CIS:NEWPAGE`, `CIS:CONTENTS`, `CIS:CHAT`, `CIS:FORUMS`, `HOM:MAILHMI`. The client puts `HOM:` before a GO word that the user types.
This matters for the design: **HMI and ASCII share one page/menu tree.** HMI just asks for the same pages by ID and gets structured data back instead of text.
This is important for the design: **HMI and ASCII share one page/menu tree.** HMI asks for the same pages by ID, and gets structured data back in place of text.
**State of E:**
- Working: login, SLP, ESC I, B+, pages and menus, article text, mail *reading*, forums, partial Find.
- Operates: login, SLP, ESC I, B+, pages and menus, article text, mail *read*, forums, partial Find.
- **Not done:** mail send, CB/chat, file libraries (streams 2/3/6/8), the forms layer (`FORMCB.DLL`), news (`NEWS.DLL`), and message types `0x2D`/`0x2E`.
- E counts about 190 `StartMessage` call sites in the client, so the catalogue is far from complete.
- E counts about 190 `StartMessage` call sites in the client. Thus, the catalogue is far from complete.
---
## 4a. What this server does (as built, milestone 7) [RE, E; tested against a fake CIM only]
Code: `internal/cis/slp.go`, `internal/cis/hmi.go`, `internal/xfer/cisbtl.go`. Test: `TestCompuServeCIM` in `internal/server`. None of it has met a real WinCIM yet; that is milestone 9.
Code: `internal/cis/slp.go`, `internal/cis/hmi.go`, `internal/xfer/cisbtl.go`. Test: `TestCompuServeCIM` in `internal/server`. We did not try any of it with a real WinCIM yet. That is milestone 9.
- **Secure Login.** `+<id>` at `User ID:` starts it. The host sends a random 64 to 512-byte challenge. It checks UR against the account's kept K and answers `HR:`, or `No.` on failure. K is kept (bound to the password hash, like the OSCAR keys) whenever the user logs on with a password, or sets one, while a `compuserve` listener runs. A user with no kept K logs on once with a password (WinCIM: `DisableSecureLogin=ON` in CIS.INI, or any terminal), and is logged as such.
- **After the login:** `ESC I`, the banner (which has `CompuServe` in it), `ESC [ > 0 q`, then `ESC [ > n ; n p` with mode 3 if offered (then 2, 1, 6, 8, 10). A parameter line whose sum is wrong gets NAK and the `p` again, up to three times. A good one gets ACK.
- **Transport Layer:** ENQ (up to 5 times) until `DLE + + DLE 0`. Then the host's `+` packet `04 04 08 00 00 01` (BS 8, 1 KB blocks, as E recommends, and TL=1). The counters are separate per direction. Messages over 1023 bytes go as `M` packets and a final `L`. An `F` packet ends the session.
- **Secure Login.** `+<id>` at `User ID:` starts it. The host sends a random challenge of 64 to 512 bytes. It checks UR against the kept K of the account, and answers `HR:`, or `No.` on failure. The server keeps K (bound to the password hash, as the OSCAR keys are) each time that the user logs on with a password or sets one, while a `compuserve` listener runs. A user with no kept K must log on one time with a password (WinCIM: `DisableSecureLogin=ON` in CIS.INI, or any terminal). The log records this.
- **After the login:** `ESC I`, the banner (which contains `CompuServe`), `ESC [ > 0 q`, then `ESC [ > n ; n p` with mode 3 if the client offers it (then 2, 1, 6, 8, 10). If the sum of a parameter line is incorrect, the host sends NAK and the `p` again, up to three times. A correct line gets ACK.
- **Transport Layer:** ENQ (up to 5 times) until `DLE + + DLE 0`. Then the `+` packet of the host, `04 04 08 00 00 01` (BS 8, 1 KB blocks, as E recommends, and TL=1). Each direction has its own counter. Messages of more than 1023 bytes go as `M` packets and a final `L`. An `F` packet ends the session.
- **HMI:**
- `0x20` gets `0x21`. The date is in standard DOS format; E's own packing differs, so check it on the wire.
- `0x24` and `0x25` give a menu as `0x27`, with item kind 0 and no title or extra blocks. An article goes as `0x28`, and its text is fetched with `0x29`/`0x2A`: 700-byte `0x04` pieces, then `0x2B`. Every line starts with a space and lines are joined with CR LF.
- `0x34` returns the rest of the items, 15 at a time.
- `0x22` (Find) returns `0x23`: up to 12 pairs of (title, page name) from the page tree's FIND.
- `0x20` gets `0x21`. The date is in standard DOS format. The packing of E is different. Thus, check it on the wire.
- `0x24` and `0x25` give a menu as `0x27`, with item kind 0 and no title or extra blocks. An article goes as `0x28`. The client gets its text with `0x29`/`0x2A`: 700-byte `0x04` pieces, then `0x2B`. Each line starts with a space, and CR LF joins the lines.
- `0x34` gives the remaining items, 15 at a time.
- `0x22` (Find) gives `0x23`: up to 12 pairs of (title, page name) from the FIND of the page tree.
- `0x0D` gets empty `0x0E` records.
- `0x07` hangs up.
- Everything else gets an ack on stream 1.
- The first message after the Transport Layer starts is sent twice, 300 ms apart. Every answer waits 120 ms first, as E's does.
- **Page names:** `CIS:<ID>` and `HOM:<word>` both resolve through the ASCII service's page tree (`pages.txt`, IDs and GO words). Aliases: `NEWPAGE` → `NEW`, `CONTENTS` → `TOP`, `MAILHMI` → `MAIL`. Pages go out as `CIS:<ID>`, numbered with a 24-bit hash of the ID. An unknown name gets an article saying so, never nothing.
- **Forums and Mail (milestone 8), as pages, the way E measured WinCIM asking for them** (`internal/cis/hmiforum.go`):
- All other messages get an ack on stream 1.
- The host sends the first message after the start of the Transport Layer two times, 300 ms apart. Before each answer, the host waits 120 ms, as E does.
- **Page names:** `CIS:<ID>` and `HOM:<word>` both resolve through the page tree of the ASCII service (`pages.txt`, IDs and GO words). Aliases: `NEWPAGE` → `NEW`, `CONTENTS` → `TOP`, `MAILHMI` → `MAIL`. Pages go out as `CIS:<ID>`, with a 24-bit hash of the ID as the number. An unknown name gets an article that tells this. It never gets nothing.
- **Forums and Mail (milestone 8), as pages, in the way that E measured the requests of WinCIM** (`internal/cis/hmiforum.go`):
- `CIS:FORUMS` lists the forums.
- `CIS:<GO>` is one forum: its sections, then its libraries.
- `CIS:<GO>/S<n>` lists a section's messages, newest first, up to 200.
- `CIS:<GO>/M<number>` is one message as an article, in the forum software 4 header format. Reading it sets the last-read mark.
- `CIS:<GO>/L<n>` is a library's file list, as an article.
- `CIS:MAIL` is the mailbox: `HOM:MAILHMI` from Get Mail, newest first, unread letters marked `*`.
- `CIS:MAIL/<id>` is one letter. Reading it marks it read.
- Every item has kind 0. E found that kind 1 draws a label the client will not select.
- Pages are made afresh on each request.
- **Not yet:** sending mail. E found that it is the `IInMailSendTV` transaction, sent at Send/Retrieve All, and its bytes are not recovered. Forum posting (`IFoMsgSendTV`), library transfers (`IFoLibSendTV`, streams 2/3/6/8), the CB, and the forms layer (`FORMCB.DLL`) are not done either.
- `CIS:<GO>/S<n>` lists the messages of a section, newest first, up to 200.
- `CIS:<GO>/M<number>` is one message as an article, in the header format of forum software 4. When the user reads it, the server sets the last-read mark.
- `CIS:<GO>/L<n>` is the file list of a library, as an article.
- `CIS:MAIL` is the mailbox: `HOM:MAILHMI` from Get Mail, newest first, with the mark `*` on unread letters.
- `CIS:MAIL/<id>` is one letter. When the user reads it, the server marks it as read.
- All items have kind 0. E found that kind 1 draws a label that the client will not select.
- The server makes the pages again for each request.
- **Not yet:** mail send. E found that it is the `IInMailSendTV` transaction, sent at Send/Retrieve All. Its bytes are not recovered. Forum posts (`IFoMsgSendTV`), library transfers (`IFoLibSendTV`, streams 2/3/6/8), the CB, and the forms layer (`FORMCB.DLL`) are also not done.
## 5. Reverse-engineering plan for the gaps
1. **Rig.** Run WinCIM 2.x and 3.0.x under Wine or in a Win9x VM, set `CommType=WINSOCK` and point it at our server. Log every byte in both directions, with B+ decoded (doc 05 §7 calls for a wire tap in the server).
2. **Cross-check E** on the wire, message by message, before relying on it. Each confirmed item goes from [RE] to [C-wire] in this doc.
1. **Rig.** Run WinCIM 2.x and 3.0.x under Wine or in a Win9x VM. Set `CommType=WINSOCK` and point it at our server. Log each byte in the two directions, with B+ decoded (doc 05 §7 asks for a wire tap in the server).
2. **Cross-check E** on the wire, message by message, before you depend on it. When you confirm an item, change its tag in this document from [RE] to [C-wire].
3. **Disassemble** (Ghidra) `CCTN240C.DLL` (transport) and `CS3COR.DLL` (HMI messages) to find the stream/type table: the `StartMessage` call sites.
4. **Next features, in order:** mail send → file libraries (B+ downloads inside HMI) → forum message post/reply → CB chat → forms.
5. **Older clients** (DOSCIM, WinCIM 1.x, MacCIM) may predate SLP and use other mode numbers. Test them separately.
4. **Next features, in this sequence:** mail send → file libraries (B+ downloads inside HMI) → forum message post/reply → CB chat → forms.
5. **Older clients** (DOSCIM, WinCIM 1.x, MacCIM) can be older than SLP and can use other mode numbers. Test them separately.
## 6. Out of scope (for now)
- CS 3.0's HTML/web content panes, which used ordinary HTTP. Add later with a small web server.
- CompuServe 2000 / 7.0, which are AOL protocols.
- PPP dial-up (`/GO:PPPCONNECT`), which is irrelevant over TCP.
- The HTML/web content panes of CS 3.0, which used ordinary HTTP. Add them later with a small web server.
- CompuServe 2000 / 7.0, which use AOL protocols.
- PPP dial-up (`/GO:PPPCONNECT`), which is not applicable over TCP.
+52 -52
View File
@@ -6,41 +6,41 @@ The fork adds two CompuServe front ends:
- **ASCII**: the classic terminal service.
- **HMI**: the WinCIM/CIM GUI service.
Both run on top of the BBS's existing users, message base, mail, file areas, chat hub, transfers and listeners.
The two front ends run on the existing users, message base, mail, file areas, chat hub, transfers and listeners of the BBS.
Protocol and UX details are in docs [02](02-terminal-ux.md), [03](03-link-protocols.md) and [04](04-cim-hmi.md).
The details of the protocols and the user interface are in docs [02](02-terminal-ux.md), [03](03-link-protocols.md) and [04](04-cim-hmi.md).
## 1. Why D-Modem/bbs fits
Reviewed at commit `b9a9acc` (7 Nov 2026): about 87k lines of Go, Go 1.24, created 10 Oct 2026.
We examined commit `b9a9acc` (7 Nov 2026): about 87k lines of Go, Go 1.24, created 10 Oct 2026.
| CompuServe needs | D-Modem/bbs already has |
|---|---|
| Telnet and modem callers, 8-bit clean | `internal/telnet` (BINARY, ECHO, SGA, NAWS, TTYPE, IAC doubling). Modem callers come via the D-Modem softmodem, so **real dial-up into CompuServe** is possible. |
| Listeners, limits, TLS, bans, panic isolation | `internal/server` (`Listener{Kind: telnet\|raw\|rlogin\|ssh}`, per-IP limits, `handle()`), `internal/guard` |
| One core with several front ends | `internal/app` defines a `Frontend` interface. `textui` and `ui3270` are two front ends over the same screens. **This is the shape we want.** |
| Telnet and modem callers, 8-bit clean | `internal/telnet` (BINARY, ECHO, SGA, NAWS, TTYPE, IAC doubling). Modem callers come through the D-Modem softmodem. Thus, **real dial-up into CompuServe** is possible. |
| Listeners, limits, TLS, bans, panic isolation | `internal/server` (`Listener{Kind: telnet\|raw\|rlogin\|ssh}`, limits for each IP, `handle()`), `internal/guard` |
| One core with more than one front end | `internal/app` defines a `Frontend` interface. `textui` and `ui3270` are two front ends over the same screens. **This is the shape that we want.** |
| Users, sessions, who's online, "jobs" | `store.User`, `bbs.Node` (node number ≈ CIS job number), calls log |
| Forum messages with threads | `store.Message{AreaID, ReplyTo, Thread, …}`, areas with groups and read/post access |
| CompuServe Mail | Private mail in `store` (`AreaID = 0`, inbox per user) |
| Forum libraries | `store.FileArea` / `store.File` (downloads count, uploader, descriptions), file store, archive readers |
| CompuServe Mail | Private mail in `store` (`AreaID = 0`, an inbox for each user) |
| Forum libraries | `store.FileArea` / `store.File` (download count, uploader, descriptions), file store, archive readers |
| XMODEM / YMODEM / Kermit | `internal/xfer`, a protocol registry (`xfer.Protocols`) with `Send(Port, files)` / `Receive(Port, sink)` |
| CB Simulator and forum conferences | Chat hub with rooms, permanent rooms, paging (`bbs/chat*.go`) |
| DB, migrations, backups | SQLite, PostgreSQL or MySQL. Additive `ALTER TABLE` migrations (`store/schema.go migrate`). Backups. |
| Bonus | HTTP API, web terminal (xterm.js), web forum, NNTP: the CIS forums for free in a browser or newsreader |
| Bonus | HTTP API, web terminal (xterm.js), web forum, NNTP: the CIS forums in a browser or newsreader with no extra work |
Building all of this from scratch would take months. The CompuServe-specific work (login, page tree, the ASCII command language, B+, HMI) is about the same either way.
To build all of this from the start would take months. The work that is specific to CompuServe (login, page tree, the ASCII command language, B+, HMI) is about the same in the two cases.
## 2. Constraints and risks
1. **We must fork; a library import won't work.** Everything useful is under `internal/`, and Go forbids importing `internal` packages from another module. Keep the fork mergeable (§4).
2. **The licence is AGPL-3.0-only**, with a commercial licence as the alternative. Our fork must stay AGPL. Anyone using the service over the network must be offered the source (a `GO SOURCE` page linking the repo covers this). Sending changes upstream requires their CLA (CONTRIBUTING.md).
3. **The project is young:** about 4 weeks old, about 62 commits, one org. Expect API churn. Mitigate by keeping our code in new packages and touching few upstream files.
4. **Probe collisions.** For ANSI callers the BBS sends `ENQ` (answerback) and `CSI > 0 q` (XTVERSION) at connect. Both mean something to CompuServe clients:
1. **We must fork. A library import will not operate.** All the useful code is under `internal/`, and Go does not let a different module import `internal` packages. Keep the fork mergeable (§4).
2. **The licence is AGPL-3.0-only**, with a commercial licence as the alternative. Our fork must stay AGPL. We must offer the source to all persons who use the service over the network (a `GO SOURCE` page with a link to the repository is sufficient). To send changes upstream, we must sign their CLA (CONTRIBUTING.md).
3. **The project is young:** about 4 weeks old, about 62 commits, one organization. Expect API changes. To decrease this risk, keep our code in new packages and change few upstream files.
4. **Probe collisions.** For ANSI callers, the BBS sends `ENQ` (answerback) and `CSI > 0 q` (XTVERSION) at connect. These two have a meaning for CompuServe clients:
- `ENQ` starts the B-protocol handshake (doc 03 §3.1).
- `ESC [ > 0 q` is CIM's application-mode query (doc 04 §2.4).
- `ESC [ > 0 q` is the application-mode query of CIM (doc 04 §2.4).
**CIS listeners must skip the BBS's terminal probing** and run their own identification (`ESC I`).
5. **The app screens are BBS-shaped.** `internal/app` defines BBS menus (message areas, profile…). CompuServe's page tree, `!` prompts and forum command language are different. **We reuse the services under `app`, not its screens.** Our front ends are new packages.
**CIS listeners must skip the terminal probes of the BBS** and run their own identification (`ESC I`).
5. **The app screens have the shape of a BBS.** `internal/app` defines BBS menus (message areas, profile…). The page tree, `!` prompts and forum command language of CompuServe are different. **We use the services under `app` again, but not its screens.** Our front ends are new packages.
## 3. Architecture
@@ -70,14 +70,14 @@ Building all of this from scratch would take months. The CompuServe-specific wor
| Package | Purpose |
|---|---|
| `internal/cis/login` | Network dialogue: `CONNECT` banner, `Host Name:` (CIS/CPS/CISAGREE), `User ID:` parsing (`+`, `/INT:60`, `/secure:1`, `/GO:x`, `;TTY`, `*NAVIG`), password or SLP (doc 04 §2.3), `?LOG xxx` codes, banner and logoff text |
| `internal/cis/login` | Network dialogue: `CONNECT` banner, `Host Name:` (CIS/CPS/CISAGREE), `User ID:` parse (`+`, `/INT:60`, `/secure:1`, `/GO:x`, `;TTY`, `*NAVIG`), password or SLP (doc 04 §2.3), `?LOG xxx` codes, banner and logoff text |
| `internal/cis/termid` | `ESC I` reply parser and checksum, the `ENQ` B-version test, `Caps` struct, GIF caps (`ESC [ > 0 g`) |
| `internal/xfer/cisb.go` | CIS B / Interim / B+ engine: quoting, checksum and CRCs, packets, window, `Tr`/`TI`, and **Transport Layer** `M`/`L` for HMI. Registered in `xfer.Protocols` as `B` and `Q` (Quick B). Upstream-friendly, since it is just another protocol. |
| `internal/xfer/cisb.go` | CIS B / Interim / B+ engine: quotes, checksum and CRCs, packets, window, `Tr`/`TI`, and **Transport Layer** `M`/`L` for HMI. Registered in `xfer.Protocols` as `B` and `Q` (Quick B). Easy to send upstream, because it is only one more protocol. |
| `internal/cis/aproto` | A protocol (low priority) |
| `internal/cis/core` | CompuServe's domain on top of `store`/`bbs`: page tree and GO resolver, forums, libraries, mail address forms (`INTERNET:` etc.), CB model, billing meter, PPN allocation. **It knows nothing about bytes or screens.** |
| `internal/cis/core` | The CompuServe domain on top of `store`/`bbs`: page tree and GO resolver, forums, libraries, mail address forms (`INTERNET:` and other forms), CB model, billing meter, PPN allocation. **It knows nothing about bytes or screens.** |
| `internal/cis/ascii` | Terminal front end: line input with ^U/^V/^O/^C/^P semantics, pager, `!` prompts, BRIEF/PAGED/COMMAND/MENU modes, DEFAULT settings, forum command language (doc 02 §4.5), EDIT/LINEDIT, Mail, CB slash-commands, download protocol menu |
| `internal/cis/hmi` | GUI front end: `ESC [ >` handshake, HMI message codec (u16/u24/varint/text/DOS date), streams, dispatcher onto `cis/core` |
| `internal/cis/wiretap` | Per-session byte log of both directions, with B+/HMI decode. Viewable through the existing HTTP API. **This is the reverse-engineering tool.** |
| `internal/cis/wiretap` | A byte log of the two directions for each session, with B+/HMI decode. You can see it through the existing HTTP API. **This is the reverse-engineering tool.** |
| `content/` | The page tree (YAML): page IDs, GO aliases, menus, articles, help text, the forum list |
### 3.2 Changes to upstream files (keep this list short)
@@ -85,33 +85,33 @@ Building all of this from scratch would take months. The CompuServe-specific wor
| Upstream file | Change |
|---|---|
| `internal/server/server.go` | In `handle()`, dispatch `Listener.Kind == "cis"` and `"cim"` to `cis/login.Run(...)`. Add the two kinds to the config parser (`config.go`). |
| `internal/xfer/xfer.go` | Append `B` and `Q` to `Protocols` (or register them from `cisb.go`'s `init`). |
| `internal/store/schema.go` | New tables, plus additive columns via the existing `migrate` list (§5). |
| `internal/xfer/xfer.go` | Add `B` and `Q` to `Protocols` (or register them from the `init` of `cisb.go`). |
| `internal/store/schema.go` | New tables, and additive columns through the existing `migrate` list (§5). |
| `cmd/bbs/main.go` | Load `content/`, and add a `cis` subcommand (seed forums, allocate IDs). |
| `bbs.conf.sample` | `[listen cis]` and `[listen cim]` examples, plus a `[cis]` section. |
| `bbs.conf.sample` | `[listen cis]` and `[listen cim]` examples, and a `[cis]` section. |
## 4. Fork workflow
- Fork `D-Modem/bbs` to our GitHub and clone it into this project. Add `upstream` as a remote.
- Our work lives in `internal/cis/**`, `internal/xfer/cisb*.go`, `content/` and `docs/cis/`. Upstream files carry only the hooks in §3.2.
- Rebase or merge `upstream/main` weekly, with CI running `go vet` and `go test ./...` (upstream already has `.github/workflows/ci.yml`).
- Candidates for upstream PRs, if we sign their CLA: `xfer/cisb.go` (B+ is useful to any BBS) and a generic listener-kind hook.
- Our work is in `internal/cis/**`, `internal/xfer/cisb*.go`, `content/` and `docs/cis/`. Upstream files contain only the hooks in §3.2.
- Rebase or merge `upstream/main` each week, with CI that runs `go vet` and `go test ./...` (upstream already has `.github/workflows/ci.yml`).
- Possible upstream PRs, if we sign their CLA: `xfer/cisb.go` (B+ is useful to all BBSes) and a generic listener-kind hook.
## 5. Data mapping onto `store`
| CompuServe | Stored as |
|---|---|
| User ID `70000,123` | `users.name = "70000,123"`, so the whole BBS login, access and who's-online machinery works unchanged on the ID. The display name goes in a new `users.real_name`. New `users.slp_key` (doc 04 §2.3). Allocate octal-only IDs from 70000,100; sysops from 76701,x. |
| User ID `70000,123` | `users.name = "70000,123"`. Thus, the full login, access and who's-online functions of the BBS operate on the ID with no change. The display name goes in a new `users.real_name`. New `users.slp_key` (doc 04 §2.3). Allocate octal-only IDs from 70000,100. Sysops from 76701,x. |
| Forum | New `cis_forums(id, go_word, name, welcome, version_tag, sysop_ids)`. |
| Forum section 0–17 | One `store.Area` per section: `Group = forum`, plus new `areas.cis_forum`, `areas.cis_section`. |
| Forum message number | CIS numbers messages per forum (`#: 210094`), while `store.Message.ID` is global. Add `messages.cis_num` (unique per forum, monotonic) and map `ReplyTo`/`Thread` directly. |
| Membership | New `cis_members(forum, user, name, joined, high_msg, options)`. The per-forum name comes from JOIN, and options from OPT (mode, prompt char, sections). |
| Library n | `store.FileArea` plus new `file_areas.cis_forum` / `cis_lib`. |
| File entry | `store.File` plus new `title`, `keywords`, `dtype` (A/B). `Downloads` is "Accesses". The uploader PPN is the user's name. |
| Forum section 0–17 | One `store.Area` for each section: `Group = forum`, and new `areas.cis_forum`, `areas.cis_section`. |
| Forum message number | CIS gives message numbers for each forum (`#: 210094`), but `store.Message.ID` is global. Add `messages.cis_num` (unique for each forum, monotonic) and map `ReplyTo`/`Thread` directly. |
| Membership | New `cis_members(forum, user, name, joined, high_msg, options)`. The name for each forum comes from JOIN, and the options from OPT (mode, prompt char, sections). |
| Library n | `store.FileArea` and new `file_areas.cis_forum` / `cis_lib`. |
| File entry | `store.File` and new `title`, `keywords`, `dtype` (A/B). `Downloads` is "Accesses". The uploader PPN is the name of the user. |
| Mail | Existing private mail. Add `from_addr`/`to_addrs` (address forms), `expire`, `binary`. |
| CB | Chat hub rooms named `cb:<band>:<ch>`, forum conferences as `co:<forum>:<room>`. Handles live in `cis_handles`, and the job number is `bbs.Node.Num`. |
| CB | Chat hub rooms with the names `cb:<band>:<ch>`, forum conferences as `co:<forum>:<room>`. Handles are in `cis_handles`, and the job number is `bbs.Node.Num`. |
| DEFAULT settings | `users.prefs` (it already holds `key=value` preferences): `brief=yes paged=no top=command editor=edit width=79 …` |
| Billing | Session times are in the calls log already; a new `cis_charges` view prices them with the period rate tables (doc 02 §7). |
| Billing | Session times are already in the calls log. A new `cis_charges` view calculates their prices with the rate tables of the period (doc 02 §7). |
## 6. Connection lifecycle (on `cis` and `cim` listeners)
@@ -133,7 +133,7 @@ session a bbs.Node is registered for its life: who's online, chat delivery,
logoff "Thank you for using CompuServe!" / "Off at …" / "Connect time = h:mm"; calls log
```
The B-protocol `ENQ` test runs when a download or graphic is about to be sent, not at login. The result is cached in `Caps`.
The B-protocol `ENQ` test runs immediately before the server sends a download or graphic, not at login. The server caches the result in `Caps`.
## 7. Interaction walkthroughs
@@ -174,42 +174,42 @@ C: 0x0F keepalive H: 0x01 … C: 0x07 logoff
### 7.3 One world
- A WinCIM user posts in IBMCOM section 4. `core.Forums.Post` stores it in the section's `store.Area`, and a terminal user's `REA NEW` sees it.
- The upstream **NNTP server and web forum** expose the same messages, without extra work.
- A WinCIM user posts in IBMCOM section 4. `core.Forums.Post` stores the post in the `store.Area` of the section, and the `REA NEW` of a terminal user shows it.
- The upstream **NNTP server and web forum** show the same messages, with no extra work.
- CB:
- A terminal user on `/TUN 12` and a WinCIM chat user share the hub room `cb:A:12`.
- ASCII renders `(12,Handle) text`; HMI renders its chat message (to be reverse-engineered).
- IRC users can join the same room through upstream's ircd, if enabled.
- ASCII renders `(12,Handle) text`. HMI renders its chat message (we must reverse-engineer this).
- IRC users can join the same room through the ircd of upstream, if it is enabled.
## 8. Concurrency
The upstream model is one goroutine per caller with node registration in `bbs`, and we keep it. Additions:
- `link` reads with per-byte deadlines (`xfer.Port` already has `SetReadDeadline`) for B+ timeouts.
- During a transfer, the ASCII front end hands the port to `xfer` and takes it back afterwards.
The upstream model is one goroutine for each caller, with node registration in `bbs`. We keep this model. Additions:
- `link` reads with deadlines for each byte (`xfer.Port` already has `SetReadDeadline`) for B+ timeouts.
- During a transfer, the ASCII front end gives the port to `xfer`, and takes it back after the transfer.
- The HMI session runs a reader goroutine (B+ Transport Layer → messages) and a writer that merges replies with async events (chat, mail-waiting).
- Chat and CB fan-out uses the upstream hub, so slow clients never block a room.
- Chat and CB fan-out uses the upstream hub. Thus, slow clients never block a room.
## 9. Testing
| Layer | How |
|---|---|
| `xfer/cisb` | Spec vectors (checksum `0x2A`, CRC `0x57FF`, doc 03). Fuzz the decoder. Loopback host↔client over `net.Pipe` with noise, drops and duplicates. Test against OzCIS's B+ in DOSBox-X. |
| `xfer/cisb` | Specification vectors (checksum `0x2A`, CRC `0x57FF`, doc 03). Fuzz the decoder. Loopback host↔client over `net.Pipe` with noise, drops and duplicates. Test against the B+ of OzCIS in DOSBox-X. |
| `termid` | Real ID strings: WinCIM, OzCIS, Wilhite. |
| `cis/ascii` | Golden transcripts from the captures in doc 02, as exact bytes. TAPCIS's command strings (doc 02 §4.5) as acceptance tests. |
| `cis/ascii` | Golden transcripts from the captures in doc 02, as exact bytes. The command strings of TAPCIS (doc 02 §4.5) as acceptance tests. |
| `login/SLP` | Test vectors from the 24high emulator, checked independently. |
| `hmi` | Replay recorded WinCIM sessions from the wire tap. |
| End to end | `telnet localhost 2323`. DOSBox-X `serial1=modem` (dial `ATDT host:2323`) with TAPCIS, OzCIS and AutoSIG. WinCIM 2.x/3.x under Wine (`CommType=WINSOCK`, port 4144). **Real modems via D-Modem.** |
| End to end | `telnet localhost 2323`. DOSBox-X `serial1=modem` (dial `ATDT host:2323`) with TAPCIS, OzCIS and AutoSIG. WinCIM 2.x/3.x under Wine (`CommType=WINSOCK`, port 4144). **Real modems through D-Modem.** |
## 10. Milestones
0. **Fork and setup:** fork, build, run the stock BBS, add a CI job, add `[listen cis]` and dispatch to a stub `login.Run`.
0. **Fork and setup:** fork, build, run the standard BBS, add a CI job, add `[listen cis]` and dispatch to a stub `login.Run`.
1. **Login and top menu:** Host Name, User ID, password, banner, page tree from `content/`, `GO`/`T`/`M`/`B`/`F`/`R`/`H`, pager, `OFF`/`BYE`/`LOG`.
2. **DEFAULT settings:** BRIEF/PAGED/COMMAND/MENU in `users.prefs`; `SET`; `;TTY`.
2. **DEFAULT settings:** BRIEF/PAGED/COMMAND/MENU in `users.prefs`. `SET`. `;TTY`.
3. **Forums, ASCII:** JOIN, sections, `REA`/`SCA`/`BRO` command language, headers, post/reply, EDIT, OPTIONS, exit stats.
4. **Libraries and transfers:** BRO/DIR/DOW/UPL, protocol menu (XMODEM and Kermit from upstream), then **CIS B/B+** in `xfer`.
5. **Mail:** menu and `Mail!` command modes, address forms, `INTERNET:` gateway (upstream's SMTP work in TODO.md may help).
5. **Mail:** menu and `Mail!` command modes, address forms, `INTERNET:` gateway (the SMTP work of upstream in TODO.md can help).
6. **CB Simulator** and forum conferences on the chat hub.
7. **CIM:** `cim` listener, SLP, `ESC I`/AP handshake, B+ Transport Layer, HMI session, pages, menus, articles. Get WinCIM to the main menu.
8. **HMI features:** forums, mail read → send → libraries → chat (reverse-engineering at each step; doc 04 §5).
9. **Offline-reader pass:** TAPCIS, AutoSIG and OzCIS run their scripts cleanly.
8. **HMI features:** forums, mail read → send → libraries → chat (reverse engineering at each step. Refer to doc 04 §5).
9. **Offline-reader pass:** TAPCIS, AutoSIG and OzCIS run their scripts with no errors.
10. **Polish:** billing display, RLE/GIF pages, sysop tools in the upstream config UI, content import.
+16 -16
View File
@@ -1,8 +1,8 @@
# CompuServe Revival — Research and Design
These docs are the groundwork for reimplementing the CompuServe Information Service backend. The backend will be written in Go as a fork of [D-Modem/bbs](https://github.com/D-Modem/bbs). It will serve both the classic terminal interface and the WinCIM/CIM GUI clients.
These documents are the base for a new implementation of the CompuServe Information Service backend. We will write the backend in Go as a fork of [D-Modem/bbs](https://github.com/D-Modem/bbs). It will serve the classic terminal interface and the WinCIM/CIM GUI clients.
> **Update:** rather than a fork, the service is being built in this repository, as `internal/cis` (a `frontend = compuserve` listener) and `internal/xfer/cisb.go`. Where doc 05 talks about "the fork" and "upstream files", read "this repo" and "the BBS's existing files". The goal is compatibility with the real clients (TAPCIS, OzCIS, AutoSIG, WinCIM and the other CIMs), not a look-alike.
> **Update:** we do not use a fork. We build the service in this repository, as `internal/cis` (a `frontend = compuserve` listener) and `internal/xfer/cisb.go`. Where doc 05 says "the fork" and "upstream files", read "this repo" and "the existing files of the BBS". The objective is compatibility with the real clients (TAPCIS, OzCIS, AutoSIG, WinCIM and the other CIMs), not a copy that only looks the same.
| Doc | Contents |
|---|---|
@@ -10,29 +10,29 @@ These docs are the groundwork for reimplementing the CompuServe Information Serv
| [02 — Terminal (ASCII) experience](02-terminal-ux.md) | Verbatim login, menus, prompts, forum command language, message headers, libraries, Mail, CB, billing, GO words |
| [03 — Link protocols](03-link-protocols.md) | A, B and B+ at the byte level, ESC I identification, VIDTEX escapes, how transfers start |
| [04 — GUI service (CIM/HMI)](04-cim-hmi.md) | Connection scripts, `?LOG` codes, Secure Login, the AP handshake, B+ Transport Layer, HMI message catalogue, reverse-engineering plan |
| [05 — Server design](05-server-design.md) | How the fork is laid out, the data mapping, connection lifecycle, walkthroughs, testing, milestones |
| [05 — Server design](05-server-design.md) | The layout of the fork, the data mapping, connection lifecycle, walkthroughs, tests, milestones |
## Confidence tags used throughout
- **[C] / [V]** Confirmed: a primary spec, period document or verbatim capture says so.
- **[P]** Paraphrased from a period source.
- **[C] / [V]** Confirmed: a primary specification, a document of the period or a verbatim capture says it.
- **[P]** Paraphrased from a source of the period.
- **[S]** Secondary: Wikipedia or recollections.
- **[RE]** Comes from a single reverse-engineering source (mainly the 2026 `24high/CompuServe-Emulator`). It needs checking on the wire.
- **[I]** Inference or design choice.
- **[RE]** Comes from a single reverse-engineering source (mainly the 2026 `24high/CompuServe-Emulator`). It is necessary to check it on the wire.
- **[I]** Inference or design decision.
- **[GAP]** Not publicly known.
## Most important sources
- Russ Ranshaw, *The CompuServe B Plus Protocol* (1993): CompuServe's own spec.
- Steve Wilhite's `bp.c` (1985) and Steve Sneed's OOBPLUS (1991): reference code for B and B+.
- TAPCIS 5.3 manual and scripts, and the Forum 4D command listing (1989): the ASCII command contract.
- Russ Ranshaw, *The CompuServe B Plus Protocol* (1993): the specification from CompuServe.
- The `bp.c` of Steve Wilhite (1985) and the OOBPLUS of Steve Sneed (1991): reference code for B and B+.
- The TAPCIS 5.3 manual and scripts, and the Forum 4D command list (1989): the contract for the ASCII commands.
- Session captures from 1987–1995 on discmaster.textfiles.com.
- `24high/CompuServe-Emulator` (C#, 2026): the only detailed HMI and Secure Login notes found. **Cite it, but don't copy from it:** it contains CompuServe's scripts and decompiler output.
- CompuServe's 1994 HMI developer FAQ and the 1995 NISA migration FAQ.
- `24high/CompuServe-Emulator` (C#, 2026): the only detailed HMI and Secure Login notes that we found. **Cite it, but do not copy from it:** it contains scripts from CompuServe and decompiler output.
- The 1994 HMI developer FAQ from CompuServe and the 1995 NISA migration FAQ.
## Biggest open questions
1. The HMI message catalogue beyond pages, articles and mail-read (doc 04 §4).
2. The CB line format and band selection text (doc 02 §6).
3. Whether pre-1996 CIM clients used Secure Login and which mode numbers they used.
4. Exact host help texts. Candidates: the archive.org disk images and the Computer History Museum manual scans.
1. The HMI message catalogue after pages, articles and mail-read (doc 04 §4).
2. The format of the CB line and the text for the band selection (doc 02 §6).
3. Did CIM clients before 1996 use Secure Login, and which mode numbers did they use?
4. The exact help texts of the host. Possible sources: the archive.org disk images and the manual scans of the Computer History Museum.
+133 -110
View File
@@ -1,9 +1,11 @@
The BBS has an AIM and ICQ server (OSCAR, the protocol AOL's AIM and ICQ
clients spoke), beside its [IRC](IRC) server and on the same chat. Someone
signed on in AIM 7, AIM 5, AIM 4, ICQ 2003, Pidgin, Miranda or any other
OSCAR client sees the BBS's users on their buddy list, IMs them and talks in its
[chat rooms](Chat-and-Paging), with callers on telnet, SSH, 3270s, IRC,
the web terminal and the API.
The BBS has an AIM and ICQ server (OSCAR, the protocol of the AIM and
ICQ clients of AOL). This server is adjacent to the [IRC](IRC) server of
the BBS, and it uses the same chat. A user can sign on in AIM 7, AIM 5,
AIM 4, ICQ 2003, Pidgin, Miranda or a different OSCAR client. That user
sees the users of the BBS on the buddy list, sends IMs to them, and
talks in the [chat rooms](Chat-and-Paging) of the BBS. The other users
in these rooms can be on telnet, SSH, 3270s, IRC, the web terminal and
the API.
```ini
[oscar]
@@ -13,135 +15,156 @@ host = aim.example.org:5190
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:5190` | where to listen |
| `host` | the address each client came to | where clients are sent to reconnect (`host:port`); set it behind NAT |
| `max_clients` | `256` | connections at once |
| `max_per_ip` | `16` | from one address (each client opens a few) |
| `uin_base` | `100000` | an account's ICQ number is this plus its number |
| `system` | `OnlineHost` | the screen name the BBS's notices come from |
| `tls_address` | none | a TLS port for the [later logins](#later-aim-versions), e.g. `:443` |
| `tls_cert`, `tls_key` | none | its certificate and key (`tls_cert = acme` for the `[acme]` one) |
| `tls_host` | `host`'s name at `tls_address`'s port | where clients that ask for TLS are sent (`host:port`); a TLS proxy's, when one is in front |
| `address` | `:5190` | the address on which to listen |
| `host` | the address to which each client came | the address to which the BBS sends clients to connect again (`host:port`). Set it behind NAT |
| `max_clients` | `256` | the maximum number of connections at one time |
| `max_per_ip` | `16` | the maximum from one address (each client opens some connections) |
| `uin_base` | `100000` | the ICQ number of an account is this value plus the account number |
| `system` | `OnlineHost` | the screen name from which the notices of the BBS come |
| `tls_address` | none | a TLS port for the [later logins](#later-aim-versions), for example `:443` |
| `tls_cert`, `tls_key` | none | its certificate and key (`tls_cert = acme` for the certificate of `[acme]`) |
| `tls_host` | the name of `host` at the port of `tls_address` | the address to which the BBS sends clients that ask for TLS (`host:port`). The address of a TLS proxy, when there is one in front |
Point the client at the BBS: in AIM up to 6.1, the "Host" under Connection
settings (`login.oscar.aol.com` was AOL's, so a hosts file entry, or the
BBS's [DNS server](DNS), also works); in Pidgin, the server and port of an AIM or ICQ account, with "Use
clientLogin" unticked and encryption off, or see [later AIM
versions](#later-aim-versions) to use clientLogin. The deny list and bans in
`[security]` apply as they do everywhere else.
Point the client at the BBS:
- In AIM up to 6.1, set the "Host" in the Connection settings.
`login.oscar.aol.com` was the host of AOL. Thus, an entry in the hosts
file, or the [DNS server](DNS) of the BBS, also operates.
- In Pidgin, set the server and port of an AIM or ICQ account. Clear
"Use clientLogin" and disable encryption. Or, to use clientLogin,
refer to [later AIM versions](#later-aim-versions).
The deny list and bans in `[security]` apply, as on all other routes.
## Signing on
Every AIM user is a BBS user, signed on with their BBS name as the screen
name and their BBS password. A name with spaces may be typed with or
without them (`Carol Ann` or `carolann`). ICQ clients sign on by number:
`uin_base` plus the account's number (with the default, account 7 is
`100007`). Failed logins count towards the throttle and the hack log, like
any other login, and the user's access level must allow chat.
Each AIM user is a BBS user. The user signs on with the BBS name as the
screen name, and with the BBS password. You can type a name with spaces
with or without the spaces (`Carol Ann` or `carolann`). ICQ clients sign
on by number: `uin_base` plus the account number (with the default,
account 7 is `100007`). Failed logins count towards the throttle and the
hack log, as all other logins do. The access level of the user must
permit chat.
AIM clients since 3.5 send the password as an MD5 digest, which the BBS's
password hashes can't check. So the BBS keeps each account's AIM digests
too, made whenever the password is known: when the account is made, when
its password is set, and at any login by password. An account from before
`[oscar]` was set up has none yet: its user logs in once some other way
(telnet, SSH, IRC, the web) and can then sign on with any AIM client. The
log says so when that is why a sign-on failed. Old clients (AIM 1 to 3, ICQ,
Java AIM) send the password itself and sign on at once. The digests are
kept only while `[oscar]` is set up; anyone who read them from the database
could sign on by AIM as that user, as with any AIM server.
AIM clients since 3.5 send the password as an MD5 digest. The password
hashes of the BBS cannot check this digest. Thus, the BBS also keeps the
AIM digests of each account. It makes them each time that it knows the
password: when the account is made, when the password is set, and at all
logins by password. An account from before the configuration of
`[oscar]` has no digests yet. Its user must log in one time by a
different method (telnet, SSH, IRC, the web). Then the user can sign on
with all AIM clients. If this is the cause of a failed sign-on, the log
tells you. Old clients (AIM 1 to 3, ICQ, Java AIM) send the password
itself, and sign on immediately.
The BBS keeps the digests only while `[oscar]` is configured. A person
who reads them from the database can sign on by AIM as that user, as
with all AIM servers.
## Buddies
The buddy list is the user's [friends list](Chat-and-Paging#friends):
the same list the BBS's chat and IRC show, so a buddy is always a BBS
user (by name, or ICQ number). Adding anyone else is refused. A friend
added by IRC or the BBS comes to an AIM client that is on at once, in
their group (`Friends` if they have none); one added or removed on AIM
is on or off the list everywhere. Groups and aliases are kept with the
friends list; the list's other items (permit and deny entries,
preferences) as the client sent them. A client that keeps its own list
(AIM 3 and 4) has its buddies put on the friends list as it sends them.
The buddy list is the [friends list](Chat-and-Paging#friends) of the
user. It is the same list that the chat of the BBS and IRC show. Thus, a
buddy is always a BBS user (by name, or ICQ number). The BBS refuses all
other buddies. If you add a friend by IRC or the BBS, an AIM client that
is on gets it immediately, in its group (`Friends` if it has no group).
If you add or remove a buddy on AIM, the change applies on all routes.
The BBS keeps groups and aliases with the friends list. It keeps the
other items of the list (permit and deny entries, preferences) as the
client sent them. If a client keeps its own list (AIM 3 and 4), the BBS
puts its buddies on the friends list when the client sends them.
A buddy is online while they are on the BBS by any route, and shown away
when they are away on AIM or IRC. Their profile is the one their AIM
client set, or for someone not on AIM their line about themselves, their
location and what they are doing on which node. Permit and deny lists,
"allow only buddies" and ICQ's invisible status hide the user and refuse
their IMs, from AIM users and others alike.
A buddy is online while the buddy is on the BBS by any route. The buddy
shows as away when the buddy is away on AIM or IRC. The profile of the
buddy is the profile that the AIM client of the buddy set. For a user
who is not on AIM, the profile is the line about the user, the location,
and the current activity on the node. Permit and deny lists, "allow only
buddies" and the invisible status of ICQ hide the user. They also
refuse IMs to the user, from AIM users and from other users.
## IMs
An IM to a BBS user reaches every node they are on: an AIM or ICQ client
gets it as an IM (from AIM to AIM with its fonts and colours), an IRC client
as a `PRIVMSG`, a caller on a terminal as a message line. What they send
back comes as an IM from them. Typing notices, file transfers and direct
connections pass between AIM clients. IMs are [kept](Chat-and-Paging#private-messages).
An IM to a BBS user who isn't on is kept for them, and the sender told so
(once) by `OnlineHost`; they get it when they next sign on: on AIM as an
IM marked with when it was sent, on ICQ as an offline message, on IRC or
a terminal as a message line. An IM to a name that is no BBS user's is
refused ("not logged on"). The BBS's notices (new mail, a page for the sysop) come as IMs
from `OnlineHost`.
An IM to a BBS user goes to all nodes where the user is on:
- An AIM or ICQ client gets it as an IM (from AIM to AIM with its fonts
and colours).
- An IRC client gets it as a `PRIVMSG`.
- A caller on a terminal gets it as a message line.
The answers come as an IM from that user. Typing notices, file transfers
and direct connections go between AIM clients. The BBS
[keeps](Chat-and-Paging#private-messages) IMs. If a BBS user is not on,
the BBS keeps an IM for the user, and `OnlineHost` tells the sender
(one time). The user gets the IM at the next sign-on: on AIM as an IM
with the time that it was sent, on ICQ as an offline message, on IRC or
a terminal as a message line. The BBS refuses an IM to a name that is
not a BBS user ("not logged on"). The notices of the BBS (new mail, a
page for the sysop) come as IMs from `OnlineHost`.
## Chat rooms
An AIM chat room is a BBS chat room, and so an IRC channel: "Join a Chat
Room" with `main` is in `#main` with IRC users and the terminals' Chat. A
name is made a room's: lower case, spaces as dashes, at most 20 letters
and digits (`Test Room` is `test-room`). Inviting a buddy who isn't on AIM
sends them a line naming the room.
An AIM chat room is a BBS chat room, and thus an IRC channel. "Join a
Chat Room" with `main` puts the user in `#main` with IRC users and the
Chat of the terminals. The BBS changes a name into a room name: lower
case, dashes in place of spaces, a maximum of 20 letters and digits
(`Test Room` is `test-room`). If you invite a buddy who is not on AIM,
the BBS sends the buddy a line with the name of the room.
## Later AIM versions
AOL's later clients sign on by HTTP before they reach the server proper,
and the BBS serves both ways they do it, on port 5190 itself (a
connection that starts as an HTTP request is told apart by its first
byte) and on `tls_address`:
The later clients of AOL sign on by HTTP before they connect to the
server. The BBS serves the two methods that they use. It serves them on
port 5190 (the BBS knows a connection that starts as an HTTP request by
its first byte) and on `tls_address`:
- **AIM 6.2 to 7.5** post a Kerberos-style login to `/`. Set the client's
host and port under Settings, Connection, to the BBS's TLS address
(they ask for HTTPS and then a TLS connection, so `tls_address` is
needed). The client checks the certificate against its own
store (an NSS database in its folder), so a certificate from a public
CA, or the BBS's own added there, is needed.
- **AIM 6.0 and 6.1** can't be set to another server for this login; set
their `serviceManifest.xml` to the old (BUCP) login and they sign on as
AIM 5 does.
- **Pidgin with "Use clientLogin"**, AIM Express and the phones' AIM ask
`api.screenname.aol.com` (`/auth/clientLogin`) and then
`api.oscar.aol.com` (`/aim/startOSCARSession`). Point those names at the
BBS in the hosts file; by HTTPS they need a certificate for those names
that the client trusts. Either way the client then signs on to the host
the BBS names, by TLS if it asked for it ("Use SSL") and there is a
TLS host.
- **AIM 6.2 to 7.5** post a Kerberos-style login to `/`. In Settings,
Connection, set the host and port of the client to the TLS address of
the BBS. These clients ask for HTTPS and then a TLS connection. Thus,
`tls_address` is necessary. The client checks the certificate against
its own store (an NSS database in its folder). Thus, you must have a
certificate from a public CA, or add the certificate of the BBS to
that store.
- **AIM 6.0 and 6.1** cannot use a different server for this login. Set
their `serviceManifest.xml` to the old (BUCP) login. Then they sign on
as AIM 5 does.
- **Pidgin with "Use clientLogin"**, AIM Express and the AIM of the
phones ask `api.screenname.aol.com` (`/auth/clientLogin`) and then
`api.oscar.aol.com` (`/aim/startOSCARSession`). Point those names at
the BBS in the hosts file. With HTTPS, they must have a certificate
for those names that the client trusts. In all cases, the client then
signs on to the host that the BBS names. It uses TLS if it asked for
it ("Use SSL") and if there is a TLS host.
These logins send the password itself (inside TLS), so they work for any
account, without the AIM digests above.
These logins send the password itself (inside TLS). Thus, they operate
for all accounts, without the AIM digests above.
Wrong passwords count against the throttle and the hack log as any other
login does. The session secret clientLogin gives isn't used to check
the requests that follow; the token is a one-time sign-on cookie good for
five minutes.
Incorrect passwords count against the throttle and the hack log, as all
other logins do. The BBS does not use the session secret from
clientLogin to check the requests that follow. The token is a one-time
sign-on cookie, valid for five minutes.
### AIM 6.2 and later, and TLS
AIM 6.2 to 7.5 open TLS with an SSL 2.0-format hello and speak only TLS
1.0 with RSA key exchange. Go's TLS can't read that hello, so the BBS
answers those clients with [retrossl](https://github.com/D-Modem/retrossl),
D-Modem's SSL 3.0 and TLS 1.0 server (AES, 3DES, RC4 or DES, by RSA), as it
does clients that offer only SSL 3.0; every other client gets Go's TLS. So `tls_cert` must be
an RSA certificate (with `[acme]`, `key_type = rsa2048`); the log says so
at start when it isn't. A chat room asked for by TLS is sent to the TLS
host too.
AIM 6.2 to 7.5 open TLS with a hello in SSL 2.0 format. They use only
TLS 1.0 with RSA key exchange. The TLS of Go cannot read that hello.
Thus, the BBS answers those clients with
[retrossl](https://github.com/D-Modem/retrossl), the SSL 3.0 and TLS 1.0
server of D-Modem (AES, 3DES, RC4 or DES, by RSA). It does the same for
clients that offer only SSL 3.0. All other clients get the TLS of Go.
Thus, `tls_cert` must be
an RSA certificate (with `[acme]`, `key_type = rsa2048`). If it is not,
the log tells you at the start. The BBS also sends a chat room that the
client asks for by TLS to the TLS host.
A TLS proxy in front (stunnel, nginx) works as well: have it pass the
plain connection to port 5190 and set `tls_host` to its address. Behind
it every client comes from the proxy's address, so `max_per_ip`, the
login throttle and bans see that one address.
A TLS proxy in front (stunnel, nginx) also operates. Configure it to
pass the plain connection to port 5190, and set `tls_host` to its
address. Behind the proxy, all clients come from the address of the
proxy. Thus, `max_per_ip`, the login throttle and bans see only that
address.
## Port 5190 and AOL
5190 was AOL's own port before it was AIM's. A connection that begins as
an AOL client's (a P3 packet) is told apart by its first byte, so an AOL
front end can share the port; until there is one, such a connection is
logged and closed.
5190 was the port of AOL before it was the port of AIM. The BBS knows a
connection that starts as an AOL client connection (a P3 packet) by its
first byte. Thus, an AOL front end can share the port. If there is no
AOL front end, the BBS logs such a connection and closes it.
+82 -68
View File
@@ -1,9 +1,15 @@
The BBS can be an AOL host for AOL's own Windows clients (3.0, 4.0 and
later) over TCP. A caller signs on in the client with their BBS name and
password, and the BBS draws its Welcome window. People Connection is the
BBS's chat, and Instant Messages are its private messages, with callers on
every other route, mail is BBS mail, and keywords go to each of these.
This is early work, not yet tried with a real client.
The BBS can be an AOL host for the Windows clients of AOL (3.0, 4.0 and
later) over TCP. A caller signs on in the client with the BBS name and
password. Then the BBS draws its Welcome window. These functions of AOL
connect to the BBS:
- People Connection is the chat of the BBS.
- Instant Messages are the private messages of the BBS. They go to and
from callers on all other routes.
- Mail is BBS mail.
- Keywords go to each of these functions.
This is early work. We did not try it with a real client yet.
```ini
[aol]
@@ -12,85 +18,92 @@ address = :5190
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:5190` | where to listen |
| `max_clients` | `256` | clients at once |
| `max_per_ip` | `4` | from one address |
| `address` | `:5190` | the address on which to listen |
| `max_clients` | `256` | the maximum number of clients at one time |
| `max_per_ip` | `4` | the maximum number of clients from one address |
Port 5190 is also the [AIM and ICQ](AIM-and-ICQ) server's. With `[oscar]`
on the same address, the two share it: a connection that begins as an AOL
client's goes to the AOL host, and everything else stays with OSCAR.
The [AIM and ICQ](AIM-and-ICQ) server also uses port 5190. If `[oscar]`
is on the same address, the two servers share it. If a connection starts
as an AOL client connection, it goes to the AOL host. All other
connections stay with OSCAR.
## Pointing the client at the BBS
The client's TCP connection (`TCP.CCL` in its folder) dials
`AmericaOnline.aol.com` on port 5190. Either point that name at the BBS in
the hosts file of the client's machine
(`C:\Windows\hosts` on Windows 95 and 98), or give the machine the BBS's
[DNS server](DNS), or change the name in `TCP.CCL`.
Then pick "TCP/IP" as the connection in the client's Setup.
The TCP connection of the client (`TCP.CCL` in its folder) dials
`AmericaOnline.aol.com` on port 5190. Do one of these steps:
- Point that name at the BBS in the hosts file of the machine of the
client (`C:\Windows\hosts` on Windows 95 and 98).
- Give the [DNS server](DNS) of the BBS to the machine.
- Change the name in `TCP.CCL`.
Then, in the Setup of the client, select "TCP/IP" as the connection.
## Signing on
The screen name and password on the client's Welcome window are a BBS
account's. "New User" does not make an account; callers join by telnet or
the web first. A failed sign-on is shown in the client, and counts against
the address as failed logins do everywhere else. The deny list and bans in
`[security]` apply.
The screen name and password on the Welcome window of the client are
those of a BBS account. "New User" does not make an account. Callers
must join by telnet or the web first. The client shows a failed sign-on.
It counts against the address, as failed logins do on all other routes.
The deny list and bans in `[security]` apply.
A signed-on client is a node, as any caller is, and appears in Who's On
as `AOL`. Sign Off in the client signs off and hangs up.
A client that signed on is a node, as all callers are. It shows in Who's
On as `AOL`. Sign Off in the client signs off and hangs up.
## Chat and Instant Messages
People Connection takes the client into the BBS's main chat room, in the
client's own room window: the people there are listed, and lines come and
go with callers on terminals, IRC, AIM, ICQ and MSN in the same room. A
line beginning `/me ` is an action.
People Connection takes the client into the main chat room of the BBS,
in the room window of the client. The window lists the people in the
room. Lines come and go with callers in the same room on terminals, IRC,
AIM, ICQ and MSN. A line that starts with `/me ` is an action.
The room window's List Rooms (or the keyword Rooms) lists the BBS's chat
rooms with how many are in each, and a button goes into one. The keyword
Room and a name, such as `room tea`, goes into that room, making it if no
one is there yet, as `/join` does elsewhere.
List Rooms in the room window (or the keyword Rooms) lists the chat
rooms of the BBS, with the number of people in each. A button goes into
a room. The keyword Room and a name, for example `room tea`, goes into
that room. If no one is in the room yet, the BBS makes it, as `/join`
does on other routes.
An Instant Message goes to a BBS user wherever they are on, as a private
message (an IM in AIM, a PRIVMSG on IRC, a line on a terminal). One away
has it when they next sign on, as on every other route, and the sender is
told. Messages to the client open its own Instant Message window, one for
each person. Screen names are compared without their spaces, so
`CarolAnn` is the user Carol Ann (AOL's screen names have no spaces).
An Instant Message goes to a BBS user as a private message, on all
routes where the user is on (an IM in AIM, a PRIVMSG on IRC, a line on a
terminal). If the user is away, the user gets it at the next sign-on, as
on all other routes. The BBS tells the sender. Messages to the client
open its Instant Message window, one window for each person. The BBS
compares screen names without their spaces. Thus, `CarolAnn` is the user
Carol Ann (AOL screen names have no spaces).
## Mail
Compose Mail in the client sends BBS mail to each name it is addressed
to, by screen name as for IMs. 4.0's formatted mail arrives as plain text.
The Welcome window says how much new mail is waiting, and new mail while
signed on is shown in a message box.
Compose Mail in the client sends BBS mail to each name in the address,
by screen name as for IMs. Formatted mail from 4.0 arrives as plain
text. The Welcome window shows the quantity of new mail. If new mail
arrives while the client is signed on, the client shows it in a message
box.
The keyword Mail opens the BBS's mailbox window, newest first with new
mail marked `*`. A button reads a mail, which marks it read, and the mail's
window can delete it.
The keyword Mail opens the mailbox window of the BBS. The newest mail is
first, and new mail has the mark `*`. A button reads a mail and marks it
as read. The window of the mail can delete it.
The client's own mail windows work too: Read New Mail on the toolbar
(`m7`), Old Mail (`m9`, mail already read) and Sent Mail (`m8`). Each is
filled with a MIP list, newest first. Opening a mail (`m3`) sends it
whole and marks it read. Ignore marks a mail read, Keep As New marks it
unread again, and Delete puts it in the BBS trash (`m2`). These answers
were worked out from the client's mail tool and have not yet been tried
with a real client.
The mail windows of the client also operate: Read New Mail on the
toolbar (`m7`), Old Mail (`m9`, mail that the user read) and Sent Mail
(`m8`). The BBS fills each one with a MIP list, newest first. When the
user opens a mail (`m3`), the BBS sends all of it and marks it as read.
Ignore marks a mail as read. Keep As New marks it as unread again.
Delete puts it in the BBS trash (`m2`). We found these answers from the
mail tool of the client. We did not try them with a real client yet.
## Message boards
The keyword Boards lists the BBS's message areas the caller may read,
with their new messages. A board lists its topics, the one written in
last first, with `*` on those with posts not yet read. A topic shows its
posts in order and marks them read. Start a topic and Reply open a window
with a subject and the text, and Send posts it, as from any other route.
A long topic shows its first 30 posts; the rest are read by telnet or the
web.
The keyword Boards lists the message areas of the BBS that the caller
can read, with their new messages. A board lists its topics, with the
topic that has the latest post first. A `*` shows the topics with posts
that the caller did not read. A topic shows its posts in sequence and
marks them as read. Start a topic and Reply open a window with a subject
and the text. Send posts it, as from all other routes. A long topic shows
its first 30 posts. Read the other posts by telnet or the web.
## Keywords
The client's Keyword window (Ctrl+K) takes:
The Keyword window of the client (Ctrl+K) accepts these keywords:
| Keyword | Goes to |
|---|---|
@@ -99,14 +112,15 @@ The client's Keyword window (Ctrl+K) takes:
| `Rooms` | the chat rooms |
| `Room` *name* | that chat room |
| `Boards` | the message boards |
| `Who` | who is on now, by any route |
| `Who` | the users who are on now, by all routes |
| `Help` | the list of keywords |
## How it is built
- `internal/aol/p3`: P3, the client's link layer (packets, checksums,
acknowledgements, resends).
- `internal/aol/fdo`: FDO91, the forms language the client draws windows
from. It has a compiler from FDO91 source, so the host's windows are
written as source.
- `internal/aol`: the host, which handles each token the client sends.
- `internal/aol/p3`: P3, the link layer of the client (packets,
checksums, acknowledgements, resends).
- `internal/aol/fdo`: FDO91, the forms language that the client uses to
draw windows. It has a compiler from FDO91 source. Thus, we write the
windows of the host as source.
- `internal/aol`: the host, which processes each token that the client
sends.
+42 -40
View File
@@ -1,10 +1,10 @@
Every user has an **access level** (0 to 255) and **flags** (letters A to
Z). The sysop decides what each level may do, and what level and flags
each message area, file area, door and menu requires. Sysops pass every
check.
Each user has an **access level** (0 to 255) and **flags** (letters A to
Z). The sysop sets what each level can do. The sysop also sets the level
and flags that each message area, file area, door and menu requires.
Sysops pass all checks.
None of this is required. If you set nothing up, every user's level is 20
and nothing requires more.
This configuration is optional. If you set nothing, the level of all
users is 20, and nothing requires more.
## Levels
@@ -30,31 +30,32 @@ downloads = 20
name = Trusted
```
A user gets the settings of the highest `[level]` at or below their own
level, so in the example above, level 35 gets `[level 20]`'s settings. A
level below every `[level]` section has no limits. Each `[level]` can set:
A user gets the settings of the highest `[level]` that is at or below the
level of the user. Thus, in the example above, level 35 gets the settings
of `[level 20]`. A level below all `[level]` sections has no limits. Each
`[level]` can set:
| Key | Default | What it sets |
|---|---|---|
| `name` | `Level N` | shown in the profile and to the API |
| `time` | `0` | minutes online a day; the caller is warned at 5 and 1 minutes left and hung up at the end (and gets at least a minute of a call, to read and log off). A door's time limit is cut to what is left |
| `downloads` | `0` | files a day, by any way (the BBS, FTP, 3270, the API) |
| `ratio` | `0` | files a user may download for each they have uploaded (0: no ratio); the files uploaded are those still in the areas |
| `ratio_free` | `0` | files a user may download before the ratio counts: with `ratio = 3` and `ratio_free = 10`, someone with 2 uploads may download 16 |
| `name` | `Level N` | the name that the profile and the API show |
| `time` | `0` | minutes online each day. The BBS gives a warning to the caller when 5 and 1 minutes remain. At the end, it hangs up (the caller gets a minimum of one minute of a call, to read and log out). The BBS decreases the time limit of a door to the time that remains |
| `downloads` | `0` | files each day, by all methods (the BBS, FTP, 3270, the API) |
| `ratio` | `0` | the number of files that a user can download for each file that the user uploaded (0: no ratio). The uploaded files are those that are still in the areas |
| `ratio_free` | `0` | the number of files that a user can download before the ratio starts. With `ratio = 3` and `ratio_free = 10`, a user with 2 uploads can download 16 |
| `post` | `yes` | post in message areas |
| `mail` | `yes` | mail other users (and netmail); without it, only the sysop |
| `chat` | `yes` | chat rooms (a page's private room is the page's) |
| `mail` | `yes` | send mail to other users (and netmail). Without it, the user can send mail only to the sysop |
| `chat` | `yes` | chat rooms (the private room of a page follows the page) |
| `page` | `yes` | page the sysop |
| `download`, `upload` | `yes` | files |
| `doors` | `yes` | doors |
Days follow the server's local time, so time and download allowances
start again at midnight.
Days follow the local time of the server. Thus, the time and download
allowances start again at midnight.
## Requirements
A requirement for an area, door or menu is written as a list of terms,
and the user must meet all of them:
A requirement for an area, door or menu is a list of terms. The user
must meet all of them:
| Term | Meaning |
|---|---|
@@ -63,39 +64,40 @@ and the user must meet all of them:
| `!X` | does not have flag X |
| `sysop` | sysops only |
So `30 F !X` means level 30 or more, with flag F and without flag X. An
empty requirement lets in anyone who is logged in. A locked user meets no
Thus, `30 F !X` means level 30 or more, with flag F and without flag X.
An empty requirement lets all logged-in users in. A locked user meets no
requirement.
| Where | How | Notes |
|---|---|---|
| message area | `bbs area require AREA READ POST` | who sees it (in lists, newsgroups by NNTP, the API) and who posts |
| file area | `bbs filearea require AREA DOWNLOAD UPLOAD` | an area is listed to those who may do either |
| message area | `bbs area require AREA READ POST` | the users who see it (in lists, in newsgroups through NNTP, in the API) and the users who post |
| file area | `bbs filearea require AREA DOWNLOAD UPLOAD` | the BBS lists an area to the users who can do one of the two |
| door | `require = 30 L` in its `[door]` | |
| menu | `require = 50` in its `[menu]` | to be taken into it |
| menu item | `x = menu:extras Extras \| 50 X` | the item is shown only to those who meet what follows `\|` |
| menu | `require = 50` in its `[menu]` | to go into it |
| menu item | `x = menu:extras Extras \| 50 X` | the BBS shows the item only to the users who meet the terms after `\|` |
On the command line, `-` means no requirement: `bbs area require General - 20`.
## Validation
New users start at `new_user_level`. Their welcome tells them they are
waiting for the sysop to validate them, and they can mail the sysop even
if their level cannot send mail. The sysop validates them in any of three
ways:
New users start at `new_user_level`. Their welcome tells them that they
wait for the sysop to validate them. They can send mail to the sysop,
also if their level cannot send mail. The sysop validates them in one of
three ways:
- on the BBS: `V` on the main menu (*Validate users (N)*) goes through
those waiting: validate, set another level, lock, skip;
- by the command: `bbs user waiting`, `bbs user validate NAME`,
`bbs user level NAME N`, `bbs user flags NAME +AB -C`;
- by the API: `PATCH /api/v1/admin/users/{name}` with `level` and
- On the BBS: `V` on the main menu (*Validate users (N)*) shows the
users who wait, one at a time. For each, you can validate, set a
different level, lock or skip.
- With the commands: `bbs user waiting`, `bbs user validate NAME`,
`bbs user level NAME N`, `bbs user flags NAME +AB -C`.
- With the API: `PATCH /api/v1/admin/users/{name}` with `level` and
`flags` (`"AB"`, or an edit `"+A -B"`).
Users can see their own level, flags, time left and downloads in their
profile (and in `access` at `GET /api/v1/me`), but not anyone else's. No
one can change their own.
Users can see their own level, flags, time that remains and downloads in
their profile (and in `access` at `GET /api/v1/me`). They cannot see the
values of other users. Users cannot change their own values.
Drop files give doors the caller's level as their security level (255 for
sysops).
Drop files give the level of the caller to doors as the security level
(255 for sysops).
**See also:** [Administration](Administration), [Configuration](Configuration), [Security](Security)
+19 -18
View File
@@ -1,7 +1,8 @@
This page lists the `bbs` commands a sysop uses day to day. Each command
works on the configuration the BBS runs with (`-config FILE`; without it,
the defaults and `bbs.db` in the current directory). All of them are safe
to run while the BBS is serving callers.
This page lists the `bbs` commands that a sysop uses each day. Each
command uses the configuration of the BBS (`-config FILE`). Without
`-config FILE`, it uses the defaults and `bbs.db` in the current
directory. You can safely run all of these commands while the BBS serves
callers.
## Users
@@ -20,7 +21,7 @@ bbs user del NAME # their mail goes; their messages stay
bbs db copy DATABASE # into a new one: a path, postgres://..., mysql://...
```
See [Databases](Databases).
Refer to [Databases](Databases).
## Access
@@ -33,7 +34,7 @@ bbs area require AREA READ POST # "30 F", sysop, - for none
bbs filearea require AREA DOWNLOAD UPLOAD
```
See [Access levels](Access-Levels).
Refer to [Access levels](Access-Levels).
## SSH keys
@@ -43,7 +44,7 @@ bbs sshkey list [USER]
bbs sshkey del ID
```
Users can also add their own keys from their profile or through the API: see [SSH](SSH).
Users can also add their own keys from their profile or through the API. Refer to [SSH](SSH).
## Message areas
@@ -59,14 +60,14 @@ bbs area keep AREA MESSAGES DAYS # keep the newest MESSAGES, for DAYS (0: no
bbs area purge # take away what areas keep no more, now
```
The BBS applies each area's limits every hour while it runs, and `bbs
area purge` applies them at once. Messages beyond the newest `MESSAGES`,
and messages older than `DAYS`, are deleted along with their votes and
polls.
While the BBS runs, it applies the limits of each area every hour. `bbs
area purge` applies them immediately. The BBS deletes the messages after
the newest `MESSAGES`, and the messages older than `DAYS`. It also
deletes their votes and polls.
A sysop can also add areas from inside the BBS (`+` in the message areas)
and delete any message. For newsgroups, see
[Newsgroups and NNTP](Newsgroups-and-NNTP); for echoes, see
and delete all messages. For newsgroups, refer to
[Newsgroups and NNTP](Newsgroups-and-NNTP). For echoes, refer to
[FidoNet](FidoNet).
## File areas
@@ -81,7 +82,7 @@ bbs file list AREA
bbs file del AREA NAME
```
See [Files and FTP](Files-and-FTP).
Refer to [Files and FTP](Files-and-FTP).
## Image boards
@@ -94,12 +95,12 @@ bbs chan ban add ADDRESS DAYS [BOARD|-] [REASON...]
bbs chan ban list | del ID
```
See [Image boards](Image-Boards).
Refer to [Image boards](Image-Boards).
## Mail exchange
The BBS exchanges mail with its peers on its own schedule. These commands
do it now.
do the exchange now.
```
bbs news sync [PEER] # exchange articles with news peers now
@@ -124,8 +125,8 @@ bbs room topic ROOM ["TOPIC"] # set its topic (none: clear it)
bbs room del ROOM # it goes with its last caller
```
A running BBS picks up these changes at its next start; BBSServ's `ROOM`
command makes them at once. See [IRC](IRC#permanent-rooms).
A BBS that runs gets these changes at its next start. The `ROOM` command
of BBSServ makes them immediately. Refer to [IRC](IRC#permanent-rooms).
## The rest
+38 -34
View File
@@ -1,6 +1,7 @@
The BBS can back itself up while callers are on. Each backup is one
archive holding the configuration file, the database and the files. This
page covers making backups, what is in them, and restoring one.
The BBS can make backups while callers are on. Each backup is one
archive. The archive contains the configuration file, the database and
the files. This page tells how to make backups, what they contain, and
how to restore a backup.
```
bbs -config /etc/bbs/bbs.conf backup # make one now
@@ -9,8 +10,8 @@ bbs -config /etc/bbs/bbs.conf backup restore ARCHIVE # show what it would resto
bbs -config /etc/bbs/bbs.conf backup restore ARCHIVE -yes
```
The [configuration screens](Configuration#editing-it-the-configuration-screens)'
Maintenance menu does the same: Back up now, the list of backups, and the
The Maintenance menu of the [configuration screens](Configuration#editing-it-the-configuration-screens)
does the same tasks: Back up now, the list of backups, and the
`[backup]` settings.
## What a backup holds
@@ -19,48 +20,51 @@ Each backup is `bbs-YYYYMMDD-HHMMSS.tar.gz` in the backup directory:
| File | What it is |
|---|---|
| `MANIFEST` | when it was made, the database's engine, where each thing was |
| `bbs.conf` | the configuration file the BBS runs by |
| `database.db` | the database as a SQLite file, whatever its engine, taken whole at one moment: SQLite's by `VACUUM INTO`, a PostgreSQL or MySQL server's copied in one read-only transaction that sees nothing written after it began. Callers may go on as it is taken |
| `key.ssh_host_ed25519_key` ... | the SSH listeners' host keys (always, whatever `files` says): a BBS put back on another machine answers with the keys its callers know |
| `files/`, `chan/`, `fido/`, `screens/`, `scripts/` | the file areas', image boards', FidoNet's, display files' and scripts' directories (with `files = yes`) |
| `MANIFEST` | the time of the backup, the engine of the database, and the initial location of each item |
| `bbs.conf` | the configuration file that the BBS uses |
| `database.db` | the database as a SQLite file, for all engines. The BBS copies the full database at one time. For SQLite, it uses `VACUUM INTO`. For a PostgreSQL or MySQL server, it copies the database in one read-only transaction. This transaction does not see data that the server writes after the transaction starts. Callers can continue while the BBS makes the copy |
| `key.ssh_host_ed25519_key` ... | the host keys of the SSH listeners (always, for all values of `files`). Thus, a BBS that you restore on a different machine answers with the keys that its callers know |
| `files/`, `chan/`, `fido/`, `screens/`, `scripts/` | the directories of the file areas, image boards, FidoNet, display files and scripts (with `files = yes`) |
An archive is written under a temporary name and renamed when it is
complete, so any archive in the directory is a whole one. Beyond `keep`
archives, the oldest are deleted.
The BBS writes an archive with a temporary name. It changes the name when
the archive is complete. Thus, each archive in the directory is complete.
If there are more than `keep` archives, the BBS deletes the oldest.
## [backup]
| Key | Default | What it sets |
|---|---|---|
| `dir` | `backups` beside an SQLite database | where the archives go: better on another disk, or copied off the machine (a server's database has no default: say one) |
| `dir` | `backups` adjacent to an SQLite database | the location of the archives. Another disk is better, or copy them to a different machine. (A database on a server has no default: set one) |
| `at` | none | daily, at this time (`03:30`) |
| `keep` | `7` | archives kept (0: all) |
| `files` | `yes` | the files' directories too; `no`: the configuration, the database and the host keys alone |
| `keep` | `7` | the number of archives to keep (0: all) |
| `files` | `yes` | also the directories of the files. `no`: only the configuration, the database and the host keys |
Changes take effect at a reload (`systemctl reload bbs`) or when the
Changes start at a reload (`systemctl reload bbs`) or when the
Configuration screen saves them.
## Restoring a backup
`bbs backup restore ARCHIVE` lists what the archive holds and where each
part would go. It follows *this* system's configuration rather than where
things were when the backup was made, so a backup can move to another
machine. With the BBS stopped, add `-yes` to restore it:
`bbs backup restore ARCHIVE` lists the contents of the archive and the
destination of each part. It uses the configuration of *this* system,
not the locations at the time of the backup. Thus, you can move a backup
to a different machine.
- each file or directory already there is first renamed to
`NAME.before-restore-YYYYMMDD-HHMMSS`, never overwritten (delete these
once all is well);
- an SQLite database is put in the database's place;
- a PostgreSQL, MySQL or MariaDB database must be new and empty (set up
as for `bbs db copy`), and the archive's database is copied into it. If
the database already has users, the restore is refused before anything
is unpacked or changed: create a new database, point `database` at it,
and restore again;
- anything the archive does not hold (such as the files, with
`files = no`) is left as it is.
To restore the backup, stop the BBS and add `-yes`. The restore does
these steps:
An archive with paths that would escape their destination is refused
before anything is changed.
- It first gives each file or directory that is already there the new
name `NAME.before-restore-YYYYMMDD-HHMMSS`. It never overwrites them.
Delete these items when you know that the restore is correct.
- It puts an SQLite database in the location of the database.
- A PostgreSQL, MySQL or MariaDB database must be new and empty
(configure it as for `bbs db copy`). The restore copies the database of
the archive into it. If the database already has users, the restore
stops before it unpacks or changes anything. In that case, create a new
database, point `database` at it, and do the restore again.
- It does not change items that are not in the archive (for example, the
files, with `files = no`).
If an archive has paths that go outside their destination, the restore
stops before it changes anything.
**See also:** [Databases](Databases), [Configuration](Configuration), [Sysop tools](Sysop-Tools)
+6 -6
View File
@@ -1,4 +1,4 @@
This page shows how to build bbs from source. You need Go 1.26 or later.
This page shows how to build bbs from source. You must have Go 1.26 or later.
```
make # or: go build ./cmd/bbs
@@ -6,17 +6,17 @@ make test
make install # installs /usr/local/bin/bbs, and /etc/bbs/bbs.conf if there is none
```
bbs does not use cgo, so there is no C compiler to set up. Every database
driver is built in: SQLite is [modernc.org/sqlite](https://modernc.org/sqlite),
bbs does not use cgo. Thus, you do not have to configure a C compiler. All
database drivers are in the binary. SQLite is [modernc.org/sqlite](https://modernc.org/sqlite),
PostgreSQL is [pgx](https://github.com/jackc/pgx), and MySQL and MariaDB are
[go-sql-driver](https://github.com/go-sql-driver/mysql).
## go3270
bbs uses the D-Modem suite's fork of go3270,
bbs uses the fork of go3270 from the D-Modem suite,
[D-Modem/go3270](https://github.com/D-Modem/go3270) (Go module
`github.com/D-Modem/go3270`), which adds 3270 query replies and graphics.
While that repository is private, Go has to fetch it from GitHub with your
`github.com/D-Modem/go3270`). This fork adds 3270 query replies and graphics.
While that repository is private, Go must get it from GitHub with your
own credentials:
```
+160 -139
View File
@@ -1,11 +1,11 @@
The BBS has its own ACME client, in the manner of acme.sh. It gets
certificates from Let's Encrypt, ZeroSSL or any other ACME CA, keeps them
beside the database, and renews them before they run out. Every TLS server
of the BBS can use them: the web server, mail (IMAP, POP3, SMTP), news,
FTP, IRC, IRC linking, NTS, telnet over TLS, and Gemini and Yahoo!
Messenger when told.
The BBS has its own ACME client, similar to acme.sh. It gets
certificates from Let's Encrypt, ZeroSSL or a different ACME CA. It
keeps them adjacent to the database, and renews them before they expire.
All TLS servers of the BBS can use them: the web server, mail (IMAP,
POP3, SMTP), news, FTP, IRC, IRC linking, NTS, telnet over TLS, and
Gemini and Yahoo! Messenger when you configure them to.
It is built on [lego](https://github.com/go-acme/lego) (MIT). It is off
It uses [lego](https://github.com/go-acme/lego) (MIT). It is disabled
unless there is an `[acme]` section.
## The short way
@@ -19,41 +19,45 @@ domains = bbs.example.org, mail.example.org
address = :443
```
That is all a web server and mail server need. The CA checks the names
over HTTP on port 80, which the BBS answers itself. Any TLS server with no
`cert_file` and `key_file` (or `tls_cert` and `tls_key`) then uses the
certificate. The first is got at start-up, so the servers have none for
the few seconds that takes.
A web server and a mail server need only these settings. The CA checks
the names over HTTP on port 80. The BBS answers these checks itself.
Then all TLS servers with no `cert_file` and `key_file` (or `tls_cert`
and `tls_key`) use the certificate. The BBS gets the first certificate
at the start. Thus, the servers have no certificate for the few seconds
that this takes.
Port 80 and 443 need root (the BBS binds them before it gives root up,
with `user =`) or `CAP_NET_BIND_SERVICE`.
Ports 80 and 443 must have root (the BBS binds them before it stops its
root access, with `user =`) or `CAP_NET_BIND_SERVICE`.
## Which certificate a server uses
| `cert_file` | the certificate |
|---|---|
| none, with `[acme]` | the ACME one whose names cover the name the client asks for (SNI), or the first |
| `acme` | the same, said outright (the way for `[listen]`'s `tls_cert`, for Gemini and for Yahoo) |
| none, with `[acme]` | the ACME certificate whose names include the name that the client asks for (SNI), or the first |
| `acme` | the same, given explicitly (the method for the `tls_cert` of `[listen]`, for Gemini and for Yahoo) |
| `acme:NAME` | the `[acme NAME]` certificate |
| a path | that file, with `key_file` |
Files are read again when they change, whatever renews them. The ACME
client's are read again within a minute of each renewal, with no restart.
The BBS reads files again when they change, for all renewal methods. It
reads the files of the ACME client again within one minute of each
renewal, with no restart.
Two servers keep their own unless told:
Two servers keep their own certificates unless you configure them:
- **Gemini** clients pin the certificate they first see, and an ACME
certificate gets a new key each renewal, so Gemini keeps the one `bbs
- **Gemini** clients pin the first certificate that they see, and an
ACME certificate gets a new key at each renewal. Thus, Gemini keeps the
certificate that `bbs
gemini cert` makes. Use `cert_file = acme` for a capsule whose visitors
check it against a CA.
- **Yahoo! Messenger**'s login is `login.yahoo.com`, a name no CA will
sign for this host. It still needs a certificate the client trusts.
check the certificate against a CA.
- The login of **Yahoo! Messenger** is `login.yahoo.com`. No CA will sign
this name for this host. The login still must have a certificate that
the client trusts.
## More than one certificate
`[acme]`'s own `domains` make the certificate named `default`. Each
`[acme NAME]` makes another, with its own `challenge`, `dns` and
`key_type` if they differ:
The `domains` of `[acme]` make the certificate with the name `default`.
Each `[acme NAME]` makes a different certificate, with its own
`challenge`, `dns` and `key_type` if they are different:
```
[acme]
@@ -77,77 +81,83 @@ tls_cert = acme:wild
## Challenges
How the CA is shown the names are this host's:
The challenge is the method that shows the CA that the names belong to
this host:
- **`http`** (the default): a token at
`http://NAME/.well-known/acme-challenge/`. A plain web server of the
BBS's already on port 80 (`[http]` with `tls = no`, or `[ymsg]`'s
`http_address`) answers it. Otherwise the client listens on
`http://NAME/.well-known/acme-challenge/`. If a plain web server of the
BBS is already on port 80 (`[http]` with `tls = no`, or the
`http_address` of `[ymsg]`), it answers. If not, the client listens on
`http_address`, `:80` by default.
- **`tls-alpn`**: a certificate on port 443, from whichever TLS server of
the BBS is there. Nothing has to listen on port 80.
- **`dns`**: a TXT record at `_acme-challenge.NAME`. This is the only one
for `*.wildcards`, and the one for a BBS behind a firewall. `dns` names
how the record is made.
- **`tls-alpn`**: a certificate on port 443, from the TLS server of the
BBS that is there. No server must listen on port 80.
- **`dns`**: a TXT record at `_acme-challenge.NAME`. This is the only
method for `*.wildcards`, and the method for a BBS behind a firewall.
`dns` names the method that makes the record.
## DNS providers
`dns =` is one of:
`dns =` is one of these:
- A provider built in: `cloudflare`, `route53`, `digitalocean`, `hetzner`,
`gandiv5`, `ovh`, `namecheap`, `porkbun`, `godaddy`, `desec`, `duckdns`,
`pdns` (PowerDNS), `rfc2136` (BIND and the like, by TSIG), `acme-dns`
and `httpreq`. Their credentials are lego's environment variables, such
as `CF_DNS_API_TOKEN` for Cloudflare. See
- A built-in provider: `cloudflare`, `route53`, `digitalocean`,
`hetzner`, `gandiv5`, `ovh`, `namecheap`, `porkbun`, `godaddy`,
`desec`, `duckdns`, `pdns` (PowerDNS), `rfc2136` (BIND and similar
servers, by TSIG), `acme-dns` and `httpreq`. Their credentials are the
environment variables of lego, for example `CF_DNS_API_TOKEN` for
Cloudflare. Refer to
[lego's DNS providers](https://go-acme.github.io/lego/dns/).
- **`acmesh:dns_xx`**: one of acme.sh's 150 or so
[dnsapi scripts](https://github.com/acmesh-official/acme.sh/wiki/dnsapi),
run with acme.sh's own functions loaded. Set `acmesh` to acme.sh's path.
Their credentials are acme.sh's variables (`CF_Token`, `GD_Key`...), and
those acme.sh saved in its `account.conf` work too.
- **`exec:PROGRAM`**: a program of the sysop's, run as `PROGRAM present
- **`acmesh:dns_xx`**: one of the approximately 150
[dnsapi scripts](https://github.com/acmesh-official/acme.sh/wiki/dnsapi)
of acme.sh, run with the functions of acme.sh loaded. Set `acmesh` to
the path of acme.sh. Their credentials are the variables of acme.sh
(`CF_Token`, `GD_Key`...). The credentials that acme.sh saved in its
`account.conf` also operate.
- **`exec:PROGRAM`**: a program of the sysop, run as `PROGRAM present
_acme-challenge.NAME. VALUE` and then `PROGRAM cleanup ...`.
Credentials go in the environment (systemd's `Environment=` or
`EnvironmentFile=`) or in `dns_env_file`, `KEY=value` lines kept out of
`bbs.conf`:
Put credentials in the environment (the `Environment=` or
`EnvironmentFile=` of systemd) or in `dns_env_file`. This file has
`KEY=value` lines, and keeps the credentials out of `bbs.conf`:
```
# /etc/bbs/acme-dns.env, mode 0600, the BBS user's
CF_DNS_API_TOKEN=...
```
The client waits for the record to be out before the CA looks:
The client waits until the record is published before the CA looks:
- `dns_check = authoritative` (the default) asks the zone's own servers.
- `dns_check = authoritative` (the default) asks the servers of the
zone.
- `dns_check = resolvers` asks `dns_resolvers`.
- `dns_check = no` only waits `dns_wait` seconds, like acme.sh's
`--dnssleep`.
- `dns_check = no` only waits `dns_wait` seconds, as the `--dnssleep` of
acme.sh does.
## CAs
`ca =` is `letsencrypt` (the default), `letsencrypt-staging` (for trying
it out: it has much higher limits, and its certificates are not trusted),
`zerossl`, `buypass`, `google`, `sslcom`, or a directory's URL.
`ca =` is `letsencrypt` (the default), `letsencrypt-staging` (for tests:
it has much higher limits, and its certificates are not trusted),
`zerossl`, `buypass`, `google`, `sslcom`, or the URL of a directory.
ZeroSSL and Google need External Account Binding: `eab_kid` and
ZeroSSL and Google must have External Account Binding: `eab_kid` and
`eab_hmac_key` from the CA. For ZeroSSL, as with acme.sh, an `email` is
enough: the client gets the binding for it.
sufficient: the client gets the binding for it.
The account is made when first needed, agreeing to the CA's terms. It is
kept under `acme/accounts/` with the CA's host name.
The client makes the account when it first needs it, and agrees to the
terms of the CA. It keeps the account under `acme/accounts/` with the
host name of the CA.
## Renewal
A certificate is got again when:
The client gets a certificate again in these conditions:
- it has `renew_days` (30) or fewer days left,
- the CA's renewal information (ARI) says to,
- or its `domains` or `key_type` have changed.
- It has `renew_days` (30) or fewer days before it expires.
- The renewal information (ARI) of the CA says to renew it.
- Its `domains` or `key_type` changed.
The client looks every 12 hours, and an hour after a failure. After each
new certificate, `hook` is run (by `sh`) with `CERT_NAME`, `CERT_FILE`,
`KEY_FILE` and `CERT_DOMAINS` set, to hand it to other programs:
The client looks every 12 hours, and one hour after a failure. After
each new certificate, the BBS runs `hook` (by `sh`) with `CERT_NAME`,
`CERT_FILE`, `KEY_FILE` and `CERT_DOMAINS` set, to give the certificate
to other programs:
```
hook = cp "$CERT_FILE" /etc/nginx/bbs.crt && cp "$KEY_FILE" /etc/nginx/bbs.key && systemctl reload nginx
@@ -155,14 +165,14 @@ hook = cp "$CERT_FILE" /etc/nginx/bbs.crt && cp "$KEY_FILE" /etc/nginx/bbs.key &
## Files
Under `acme/` beside the database (or `dir`):
Under `acme/` adjacent to the database (or `dir`):
| path | what |
|---|---|
| `certs/NAME.crt` | the certificate and its chain (PEM) |
| `certs/NAME.key` | its key (PEM, mode 0600) |
| `accounts/HOST/` | the account at that CA: its key and registration |
| `challenges/` | challenges being answered for `bbs acme renew` |
| `challenges/` | the challenges that `bbs acme renew` answers now |
Other programs can use the certificates from `certs/`.
@@ -175,32 +185,33 @@ bbs acme renew -force get them all now
bbs acme renew NAME... get these now
```
`bbs check` lists them too.
`bbs check` also lists them.
`bbs acme renew` can run while `bbs serve` does. When `bbs serve` holds
port 80 or 443, it answers that renewal's challenges itself: they are put
in `acme/challenges/` for it. `bbs serve` reads the new certificate within
a minute.
`bbs acme renew` can run while `bbs serve` runs. When `bbs serve` holds
port 80 or 443, it answers the challenges of that renewal itself: the
renewal puts them in `acme/challenges/` for it. `bbs serve` reads the new
certificate within one minute.
## Trying it out
Use `ca = letsencrypt-staging` until a certificate comes, then remove it.
Let's Encrypt's production limits are tight for repeated failures.
Use `ca = letsencrypt-staging` until you get a certificate. Then remove
it. The production limits of Let's Encrypt are strict for repeated
failures.
To try it with no public name at all, run
[Pebble](https://github.com/letsencrypt/pebble), Let's Encrypt's test CA,
with `ca = https://localhost:14000/dir` and
`LEGO_CA_CERTIFICATES=pebble.minica.pem` in the environment so the client
trusts it.
To try it with no public name, run
[Pebble](https://github.com/letsencrypt/pebble), the test CA of Let's
Encrypt, with `ca = https://localhost:14000/dir` and
`LEGO_CA_CERTIFICATES=pebble.minica.pem` in the environment. Thus, the
client trusts it.
## The BBS's own certificate authority
No public CA will sign for `login.live.com`, `login.yahoo.com` or
`api.screenname.aol.com`, the names the old clients ask for once the
BBS's [DNS server](DNS) sends them here. For those the BBS is a
certificate authority of its own. Its certificate goes on each caller's
machine once; the BBS signs each server's certificate itself and renews
it before it runs out.
`api.screenname.aol.com`. The old clients ask for these names after the
[DNS server](DNS) of the BBS sends them here. For these names, the BBS
is its own certificate authority. You put its certificate on the machine
of each caller one time. The BBS signs the certificate of each server
itself, and renews it before it expires.
```ini
[msn]
@@ -220,82 +231,91 @@ hostname = gemini.example.org
cert_file = ca
```
`tls_cert = ca` (`cert_file = ca` for Gemini) needs no key file. At its
start `bbs serve` makes the CA if there is none (in `ca/` beside the
database), signs each server a certificate for its names, and looks again
daily.
`tls_cert = ca` (`cert_file = ca` for Gemini) does not need a key file.
At its start, `bbs serve` makes the CA if there is none (in `ca/`
adjacent to the database). It signs a certificate for the names of each
server, and looks again each day.
The CA is a root and sub-CAs under it, each with its own key. The root
(`ca/ca.crt`) is the one callers' machines trust, and it signs only the
sub-CAs. The services sub-CA (`ca/services-ca.crt`) signs the BBS's own
servers' certificates, and a program beside the BBS, such as a TLS proxy,
gets a sub-CA of its own (`bbs ca subca proxy`). Each certificate is sent
with its sub-CA's after it, so clients need only the root. A sub-CA's key
signs nothing but servers' certificates, and the root's key stays with the
BBS. The BBS's servers sign with:
The CA is a root with sub-CAs below it. Each has its own key:
- The root (`ca/ca.crt`) is the certificate that the machines of callers
trust. It signs only the sub-CAs.
- The services sub-CA (`ca/services-ca.crt`) signs the certificates of
the servers of the BBS.
- A program adjacent to the BBS, for example a TLS proxy, gets its own
sub-CA (`bbs ca subca proxy`).
The BBS sends each certificate with the certificate of its sub-CA after
it. Thus, clients need only the root. The key of a sub-CA signs only the
certificates of servers. The key of the root stays with the BBS. The
servers of the BBS sign with these names:
| Server | Names |
|---|---|
| `[msn]` | `login.passport.com` (its common name), `nexus.passport.com`, `loginnet.passport.com`, `login.live.com` |
| `[ymsg]` | `login.yahoo.com` |
| `[oscar]` | `api.screenname.aol.com`, `api.oscar.aol.com`, `kdc.uas.aol.com`, `slogin.oscar.aol.com`, `login.oscar.aol.com`, `login.messaging.aol.com`, `slogin.icq.com`, `login.icq.com`, and `tls_host`'s name |
| `[oscar]` | `api.screenname.aol.com`, `api.oscar.aol.com`, `kdc.uas.aol.com`, `slogin.oscar.aol.com`, `login.oscar.aol.com`, `login.messaging.aol.com`, `slogin.icq.com`, `login.icq.com`, and the name of `tls_host` |
| `[gemini]` | `hostname` |
Each server's certificate covers only its own names, so with Windows XP
clients (which name no server in TLS) give each its own IP, as above, not
one shared port 443. An HTTPS address on an IP of its own is in the certificate too, for a
client given the address. The keys are RSA 2048, which AIM 6.2 to 7.5 and
Windows XP need. A certificate is good for 397 days and signed again 30
days before its end, keeping its key. Gemini's is good for as long as the
CA, since Gemini clients pin what they first see.
The certificate of each server includes only its own names. Thus, with
Windows XP clients (which name no server in TLS), give each server its
own IP, as above. Do not use one shared port 443. If an HTTPS address is
on its own IP, the certificate also includes that IP, for a client that
got the address. The keys are RSA 2048, which AIM 6.2 to 7.5 and Windows
XP must have. A certificate is valid for 397 days. The BBS signs it
again 30 days before it expires, and keeps its key. The certificate of
Gemini is valid for the same time as the CA, because Gemini clients pin
the first certificate that they see.
### On callers' machines
`ca/install-ca.zip` puts the CA among a machine's trusted roots. Put it in
a file area for callers to download, or hand it out. It holds:
`ca/install-ca.zip` puts the CA in the trusted roots of a machine. Put it
in a file area for callers to download, or give it to them. It contains:
| File | For |
|---|---|
| `NAME-CA.cer` | Windows 98 and later: double-click, Install Certificate, Trusted Root Certification Authorities |
| `install-ca.inf` | Windows 95 and later: right-click, Install (the machine's roots, by the registry) |
| `install-ca.reg` | the same, double-clicked; `remove-ca.reg` takes it out |
| `install-ca.inf` | Windows 95 and later: right-click, Install (the roots of the machine, by the registry) |
| `install-ca.reg` | the same, with a double-click. `remove-ca.reg` removes it |
| `install-ca.bat` | Windows Vista and later, as an administrator: `certutil`, or the `.reg` without it |
| `NAME-CA.mobileconfig` | macOS and iOS: a profile |
| `NAME-CA.crt` | Linux (`update-ca-certificates`), and programs with a store of their own: Firefox, Netscape, AIM 6 and later (its NSS database) |
| `README.txt` | which to use, and the CA's fingerprint to check |
| `NAME-CA.crt` | Linux (`update-ca-certificates`), and programs with their own store: Firefox, Netscape, AIM 6 and later (its NSS database) |
| `README.txt` | the file to use, and the fingerprint of the CA to check |
The `.inf` and `.reg` write the certificate where Windows keeps the
machine's trusted roots (`HKLM\SOFTWARE\Microsoft\SystemCertificates\ROOT`),
which works from Windows 95 on, with no Internet Explorer needed. None of
the package has been tried on the old Windows versions yet.
The `.inf` and `.reg` write the certificate in the location where Windows
keeps the trusted roots of the machine
(`HKLM\SOFTWARE\Microsoft\SystemCertificates\ROOT`). This operates from
Windows 95, and Internet Explorer is not necessary. We did not try the
package on the old Windows versions yet.
### Old Windows: SHA-1
Windows 95 to 2000, and XP before Service Pack 3, know no SHA-256. Make
the CA with `bbs ca init -sha1` (before anything else makes it) and it
signs with SHA-1, as the CAs of the time did. Current systems refuse
SHA-1 certificates, so use it only for a BBS whose callers' machines are
that old.
Windows 95 to 2000, and XP before Service Pack 3, do not know SHA-256.
Make the CA with `bbs ca init -sha1` (before other functions make it).
Then it signs with SHA-1, as the CAs of that time did. Current systems
refuse SHA-1 certificates. Thus, use it only for a BBS whose callers
have machines that old.
### A TLS proxy
A TLS proxy in front of anything (stunnel, nginx, WebOne, an
SSL-stripping proxy for old browsers) is given a sub-CA of its own,
rather than the root or the services sub-CA:
Give a TLS proxy in front of a service (stunnel, nginx, WebOne, an
SSL-stripping proxy for old browsers) its own sub-CA. Do not give it the
root or the services sub-CA:
```sh
bbs ca subca proxy
```
This makes `ca/proxy-ca.crt` and `ca/proxy-ca.key` (made once, then shown).
A proxy that makes its certificates as it goes, WebOne's port for one,
takes those two and sends `proxy-ca.crt` after each certificate it
signs. For a proxy that wants fixed files, `bbs ca issue -ca proxy -out
This makes `ca/proxy-ca.crt` and `ca/proxy-ca.key` (made one time, then
shown). A proxy that makes its certificates when necessary (for example,
the port of WebOne) uses those two files, and sends `proxy-ca.crt` after
each certificate that it signs. For a proxy that must have fixed files,
`bbs ca issue -ca proxy -out
/etc/stunnel login.example.com 192.168.77.20` writes
`login.example.com.crt` (with the proxy CA's after it) and
`login.example.com.key`. Callers who installed the CA trust both, as they
do the BBS's own servers. Without `-ca`, `bbs ca issue` signs with the
services sub-CA.
`login.example.com.crt` (with the certificate of the proxy CA after it)
and `login.example.com.key`. Callers who installed the CA trust the two,
as they trust the servers of the BBS. Without `-ca`, `bbs ca issue`
signs with the services sub-CA.
### Commands
@@ -307,8 +327,9 @@ bbs ca issue [-ca NAME] [-out DIR] [-days N] NAME... a certificate a sub-CA si
bbs ca package [-out FILE] the zip again
```
Keep `ca/` with your backups, and its `.key` files private: anyone with
one can make certificates the callers' machines trust. A CA made by an
earlier BBS, before the sub-CAs, signed servers itself; the BBS refuses
it and says so. Move `ca/` away and it makes a new one, and callers
install the new `install-ca.zip`.
Keep `ca/` with your backups, and keep its `.key` files private. A person
with one of them can make certificates that the machines of callers
trust. A CA that an earlier version of the BBS made, before the sub-CAs,
signed servers itself. The BBS refuses this type of CA and tells you.
Move `ca/` to a different location. Then the BBS makes a new CA, and
callers install the new `install-ca.zip`.
+87 -78
View File
@@ -1,122 +1,131 @@
Callers on different nodes can talk to each other in three ways: in chat
rooms, by private messages, and by paging the sysop. Each user also keeps
a [friends list](#friends).
rooms, with private messages, and with a page to the sysop. Each user
also has a [friends list](#friends).
## Chat rooms
*C* on the text main menu (*Chat* on a 3270's) goes into the main room.
Anyone can start another room with `/join NAME`. A room closes when its
last caller leaves, unless the sysop has made it
[permanent](IRC#permanent-rooms). Anyone who joins a room sees its last
20 lines.
*C* on the text main menu (*Chat* on the main menu of a 3270) goes into
the main room. All users can start a different room with `/join NAME`.
A room closes when its last caller leaves, unless the sysop made it
[permanent](IRC#permanent-rooms). When a user joins a room, the user
sees its last 20 lines.
| Command | What it does |
|---|---|
| (a line) | say it to the room |
| (a line) | sends the line to the room |
| `/me ACTION` | `* alice waves` |
| `/who` | who is in this room |
| `/rooms` | the rooms in use, and who is in them |
| `/join ROOM` | go to another room (letters, digits and `-`, up to 20) |
| `/msg WHO TEXT` | a private message to a user (or to a node, by its number), [kept](#private-messages) if they are away |
| `/history [WHO]` | those you have talked with, or your last lines with one |
| `/friends` | your [friends list](#friends), and who on it is on |
| `/friend WHO`, `/unfriend WHO` | put a user on your friends list, or take them off |
| `/block WHO`, `/unblock WHO` | refuse a user's private messages, or take them again ([blocking](#blocking)) |
| `/topic [TEXT]` | the room's topic; a [registered room](IRC#chanserv)'s ops set it, the sysop a [permanent room](IRC#permanent-rooms)'s |
| `/who` | shows the users in this room |
| `/rooms` | shows the rooms in use, and the users in them |
| `/join ROOM` | goes to a different room (letters, digits and `-`, up to 20) |
| `/msg WHO TEXT` | sends a private message to a user (or to a node, by its number). The BBS [keeps](#private-messages) it if the user is away |
| `/history [WHO]` | shows the users that you talked with, or your last lines with one user |
| `/friends` | shows your [friends list](#friends), and which friends are on |
| `/friend WHO`, `/unfriend WHO` | puts a user on your friends list, or removes the user |
| `/block WHO`, `/unblock WHO` | refuses the private messages of a user, or accepts them again ([blocking](#blocking)) |
| `/topic [TEXT]` | the topic of the room. The ops of a [registered room](IRC#chanserv) set it. The sysop sets the topic of a [permanent room](IRC#permanent-rooms) |
| `/cs COMMAND` | ChanServ: [register a room](IRC#chanserv), its access list (`/cs HELP`) |
| `/kick WHO [WHY]` | put one out of the room (a registered room's ops; `Carol_Ann` for Carol Ann) |
| `/mode [CHANGES]` | a registered room's [channel modes](IRC#channel-modes): `/mode +m`, `/mode +b alice`, `/mode +b` lists the bans |
| `/invite WHO` | ask one into the room (past `+i`, `+k`, `+l`) |
| `/join ROOM KEY` | come into a room with a key |
| `/knock ROOM [WHY]` | ask the ops of a room you are kept out of to let you in |
| `/quit` | leave the chat |
| `/help` | these |
| `/kick WHO [WHY]` | removes a user from the room (ops of a registered room. `Carol_Ann` for Carol Ann) |
| `/mode [CHANGES]` | the [channel modes](IRC#channel-modes) of a registered room: `/mode +m`, `/mode +b alice`. `/mode +b` lists the bans |
| `/invite WHO` | invites a user into the room (past `+i`, `+k`, `+l`) |
| `/join ROOM KEY` | goes into a room with a key |
| `/knock ROOM [WHY]` | asks the ops of a room that you cannot go into to let you in |
| `/quit` | leaves the chat |
| `/help` | shows these commands |
On the text BBS, a line someone else says appears the moment it arrives,
above what you are typing, which is then redrawn. A 3270 shows only what
it is sent, and is best not sent anything while its caller types, so the
chat screen shows new lines each time you press Enter (to say something,
or with nothing typed) or PF5.
On the text BBS, a line from a different user shows immediately when it
arrives. It shows above the text that you type, and the BBS then draws
your text again. A 3270 shows only the data that it gets. It is best to
send nothing to a 3270 while its caller types. Thus, the chat screen
shows new lines each time that you push Enter (to send a line, or with
no text) or PF5.
A caller can say up to 8 lines in 10 seconds; more than that is refused
("slow down").
A caller can send up to 8 lines in 10 seconds. The BBS refuses more
lines ("slow down").
Rooms whose names begin with `mrc-` belong to [MRC](MRC) and are shared
with other BBSes. With [IRC server linking](IRC-Linking), rooms beginning
`irc-` are an IRC network's channels, and `/msg NICK TEXT` reaches
someone on that network. The rooms are also channels on the BBS's [IRC](IRC)
server (`#main` and the rest), with IRC clients in them alongside the
callers.
Rooms with names that start with `mrc-` are part of [MRC](MRC). Other
BBSes share them. With [IRC server linking](IRC-Linking), rooms that
start with `irc-` are the channels of an IRC network. `/msg NICK TEXT`
sends a message to a user on that network. The rooms are also channels
on the [IRC](IRC) server of the BBS (`#main` and the other rooms). IRC
clients are in them together with the callers.
## Private messages
On the text BBS, *Who's online* ends by offering to send a line to a
node, and `/msg WHO TEXT` sends one from chat (on a 3270 too), to a user
by name or to a node by its number. The line reaches the caller
wherever they are: on the text BBS, at whatever prompt they are at; on a
3270, on the message line of their next screen (with `(+N)` when more
are waiting); on [IRC](IRC) as a `PRIVMSG`; on [AIM or ICQ](AIM-and-ICQ)
or [MSN](MSN-Messenger) or [Yahoo](Yahoo-Messenger) as an IM.
On the text BBS, at the end of *Who's online*, the BBS offers to send a
line to a node. `/msg WHO TEXT` sends a line from chat (also on a 3270),
to a user by name or to a node by its number. The line goes to the
caller on all routes:
Private messages are kept, however they were sent: the BBS's chat, IRC,
AIM, ICQ, MSN or Yahoo. A message to a user who isn't on is kept for them, and they
get it when they next log in, with the time it was sent (an ICQ client
gets them as its offline messages). `/history WHO` (on IRC, `/msg
BBSServ HISTORY nick`) shows your last lines with someone. Only the two
users in a conversation can read it back.
- On the text BBS, at the current prompt of the caller.
- On a 3270, on the message line of the next screen (with `(+N)` when
more lines wait).
- On [IRC](IRC) as a `PRIVMSG`.
- On [AIM or ICQ](AIM-and-ICQ) or [MSN](MSN-Messenger) or
[Yahoo](Yahoo-Messenger) as an IM.
The BBS keeps private messages from all routes: the chat of the BBS,
IRC, AIM, ICQ, MSN or Yahoo. If a user is not on, the BBS keeps the
message for the user. The user gets it at the next login, with the time
of the message (an ICQ client gets them as its offline messages).
`/history WHO` (on IRC, `/msg
BBSServ HISTORY nick`) shows your last lines with a user. Only the two
users in a conversation can read it again.
## Friends
Every user has one friends list, of BBS users. It is the same list
everywhere: `/friends` in chat, `FRIENDS` to BBSServ on IRC, and the
buddy list on [AIM and ICQ](AIM-and-ICQ#buddies), the contact list on
[MSN](MSN-Messenger#contacts) and [Yahoo](Yahoo-Messenger#buddies). A friend added on one shows on the others;
an AIM, MSN or Yahoo client that is on gets them at once, in their group
(`Friends` on AIM if they have none).
Each user has one friends list, of BBS users. It is the same list on all
routes: `/friends` in chat, `FRIENDS` to BBSServ on IRC, the buddy list
on [AIM and ICQ](AIM-and-ICQ#buddies), and the contact list on
[MSN](MSN-Messenger#contacts) and [Yahoo](Yahoo-Messenger#buddies). A
friend that you add on one route shows on the other routes. An AIM, MSN
or Yahoo client that is on gets the friends immediately, in their group
(`Friends` on AIM if they have no group).
## Blocking
Every user also has one blocked list. `/block WHO` puts a user on it
(and `/unblock WHO` takes them off), as do MSN's "Block" and Yahoo's
ignore list. A blocked
user's private messages are refused, however they send them (chat, IRC,
AIM, MSN, Yahoo) and whether or not you are on, and MSN and Yahoo show
you offline to them.
Each user also has one blocked list. `/block WHO` puts a user on it, and
`/unblock WHO` removes the user. "Block" on MSN and the ignore list of
Yahoo do the same. The BBS refuses the private messages of a blocked
user on all routes (chat, IRC, AIM, MSN, Yahoo), also when you are not
on. MSN and Yahoo show you as offline to the blocked user.
## Paging the sysop
*S* on the text main menu (*Page the sysop* on a 3270) asks what the page
is about, and tells every sysop who is logged in and not busy:
*S* on the text main menu (*Page the sysop* on a 3270) asks for the
subject of the page. Then the BBS tells each sysop who is logged in and
not busy:
```
** alice (node 2) is paging you: my upload failed (Chat, then /answer) **
```
The caller waits in a private room of their own (`sysop-2`), which only
they and sysops can join. A sysop answers with `/answer` in chat (which
picks the caller who has waited longest) or `/answer NODE`. `/pages`
lists who is waiting, and `/busy` turns pages to that sysop off and on.
The sysop's main menu shows `Chat (1 paging)` while someone waits. If the
caller gives up (`/quit`, PF3), the page is cancelled.
The caller waits in a private room (`sysop-2`). Only the caller and
sysops can join it. A sysop answers with `/answer` in chat (this selects
the caller who waited longest) or with `/answer NODE`. `/pages` lists
the callers who wait. `/busy` disables and enables pages to that sysop.
While a caller waits, the main menu of the sysop shows
`Chat (1 paging)`. If the caller stops (`/quit`, PF3), the BBS cancels
the page.
If no sysop is on, the caller is offered the chance to leave the sysop a
message, and `page_command` (in `[general]`) runs to tell the sysop some
other way:
If no sysop is on, the BBS offers the caller the option to leave a
message for the sysop. Then `page_command` (in `[general]`) runs, to
tell the sysop in a different way:
```
[general]
page_command = /usr/local/bin/notify-sysop {user} {node} {reason}
```
`{user}`, `{node}` and `{reason}` are filled in as whole arguments, and
are also given as `BBS_PAGE_USER`, `BBS_PAGE_NODE` and `BBS_PAGE_REASON`.
There is no shell, so nothing a caller typed is ever run. The command can
take up to 30 seconds. For example, with [ntfy](https://ntfy.sh):
The BBS puts the values of `{user}`, `{node}` and `{reason}` in as full
arguments. It also gives them as `BBS_PAGE_USER`, `BBS_PAGE_NODE` and
`BBS_PAGE_REASON`. There is no shell. Thus, the BBS never runs text that
a caller typed. The command can use up to 30 seconds. For example, with
[ntfy](https://ntfy.sh):
```
page_command = curl -s -d "{user} on node {node}: {reason}" https://ntfy.sh/my-bbs-pages
```
A caller can page at most once a minute.
A caller can page a maximum of one time each minute.
**See also:** [Administration](Administration), [Security](Security)
+168 -155
View File
@@ -1,11 +1,12 @@
# CompuServe
A listener with `frontend = compuserve` serves a recreation of the
CompuServe Information Service instead of the BBS's menus. It runs on the
BBS's own users, and it aims to work with the real CompuServe software:
terminal programs, offline readers (TAPCIS, AutoSIG, OzCIS) and the
CompuServe Information Manager (WinCIM, DOSCIM, MacCIM). Their
scripts look for the period's exact prompts, so the service keeps them.
CompuServe Information Service in place of the menus of the BBS. It uses
the users of the BBS. Its objective is to operate with the real
CompuServe software: terminal programs, offline readers (TAPCIS,
AutoSIG, OzCIS) and the CompuServe Information Manager (WinCIM, DOSCIM,
MacCIM). The scripts of these programs look for the exact prompts of
that period. Thus, the service keeps these prompts.
```ini
[listen cis]
@@ -14,11 +15,11 @@ address = :2324
frontend = compuserve
```
A `raw` listener works too: modem callers through app_dmodem dial
straight into CompuServe. `connect = 9600` sets the `CONNECT` line shown
before `Host Name:`. It is on by default for telnet, which is what CIM's
scripts expect over TCP, and off for raw listeners, where the modem has
already said it.
A `raw` listener also operates: modem callers through app_dmodem dial
directly into CompuServe. `connect = 9600` sets the `CONNECT` line that
the service shows before `Host Name:`. It is on by default for telnet,
because the scripts of CIM expect it over TCP. It is off for raw
listeners, because the modem already sent it.
## Logging on
@@ -28,46 +29,51 @@ User ID: 72000,1
Password:
```
- **Host Name:** `CIS`, `CPS` or `CISAGREE`, the names CompuServe's own
scripts send.
- **User ID:** the account's number written as a CompuServe ID: account 1
is `72000,1`, using octal digits only, like CompuServe's own. A caller
can also type their BBS name; in that case the ID is shown at logon.
The ID may carry the usual options, such as `/INT:60`, `;TTY` and
`/GO:word`.
- **Host Name:** `CIS`, `CPS` or `CISAGREE`, the names that the scripts
of CompuServe send.
- **User ID:** the account number written as a CompuServe ID: account 1
is `72000,1`. It uses only octal digits, as the IDs of CompuServe did.
A caller can also type the BBS name. In that case, the service shows
the ID at logon. The ID can have the usual options, for example
`/INT:60`, `;TTY` and `/GO:word`.
- **Password:** the BBS password.
- **Bad logon:** a wrong ID or password gets
- **Bad logon:** an incorrect ID or password gets
`?? LOGINE - Invalid entry - try again`. Locked accounts and throttled
addresses get CompuServe's `?LOG` codes.
addresses get the `?LOG` codes of CompuServe.
After the logon the host sends `ESC I`. Terminals that know it answer
After the logon, the host sends `ESC I`. Terminals that know it answer
with their identification, which shows in who's online. A CIM client
(`AP` in its reply) gets the graphical service instead; see below.
(`AP` in its reply) gets the graphical service. Refer to the text below.
## CIM (WinCIM)
CIM clients speak HMI, a binary protocol inside B Plus packets. The
service follows what 24high/CompuServe-Emulator recovered from WinCIM
3.0.2: the Secure Login, the terminal-mode trade after it, the B Plus
Transport Layer, and the HMI messages for pages. In WinCIM you can:
CIM clients use HMI, a binary protocol inside B Plus packets. The
service follows the data that 24high/CompuServe-Emulator recovered from
WinCIM 3.0.2: the Secure Login, the terminal-mode exchange after it, the
B Plus Transport Layer, and the HMI messages for pages. In WinCIM, you
can do these actions:
- browse the main menu, the menus and articles of `pages.txt`, What's New
and the Table of Contents, and use Find;
- read the forums: the forum list, a forum's sections and libraries, a
section's messages (newest first) and each message, which then counts
as read;
- see a library's files (downloads still need a terminal program);
- read your mail with **Get Mail**: the mailbox, newest first, unread
letters marked `*`. A letter read is marked read.
- Browse the main menu, the menus and articles of `pages.txt`, What's
New and the Table of Contents, and use Find.
- Read the forums: the forum list, the sections and libraries of a
forum, the messages of a section (newest first) and each message. A
message that you read counts as read.
- See the files of a library (downloads still must have a terminal
program).
- Read your mail with **Get Mail**: the mailbox, newest first, with the
mark `*` on unread letters. When you read a letter, the service marks
it as read.
Sending mail, posting to forums, downloads and the CB are not in CIM yet.
WinCIM sends mail and forum messages through transactions of its own,
which nobody has recovered yet. Use a terminal program for those for now.
CIM cannot yet send mail, post to forums, download, or use the CB.
WinCIM sends mail and forum messages through its own transactions, which
nobody has recovered yet. For now, use a terminal program for those
tasks.
Point WinCIM at the listener over TCP (with the BBS's [DNS
server](DNS), `HostIPAddress` may be `compuserve.com`). In CIS.INI, the connector's
`CommType=WINSOCK`, `WinsockCommType=Local` and `HostIPAddress` set
this. CompuServe's own port for that was 4144:
Point WinCIM at the listener over TCP (with the [DNS
server](DNS) of the BBS, `HostIPAddress` can be `compuserve.com`). In
CIS.INI, the `CommType=WINSOCK`, `WinsockCommType=Local` and
`HostIPAddress` of the connector set this. The port of CompuServe for
this was 4144:
```ini
[listen wincim]
@@ -78,87 +84,90 @@ connect = 9600
```
**Secure Login.** CIM logs on with the Secure Login Protocol (`+` before
the User ID), which never sends the password. The host checks it against
a key it keeps from the password. That key is kept only while a
`compuserve` listener runs, the next time the user logs on with their
password or sets one. Until then a Secure Login fails with `No.`, and the
log says why. Log on once from a terminal, or set
`DisableSecureLogin=ON` in CIS.INI for one plain login.
the User ID). This protocol never sends the password. The host checks
it against a key that it keeps from the password. The host keeps that
key only while a `compuserve` listener runs. It makes the key the next
time that the user logs on with the password or sets a password. Until
then, a Secure Login fails with `No.`, and the log gives the reason. Log
on one time from a terminal, or set `DisableSecureLogin=ON` in CIS.INI
for one plain login.
None of this has met a real WinCIM yet; that is the next round of
testing.
We did not try any of this with a real WinCIM yet. That is the next set
of tests.
## Commands
| Command | Does |
|---|---|
| a number | that menu choice |
| a number | selects that menu item |
| `T` | the TOP menu |
| `M` | the previous menu |
| `B` | back a page |
| `F` | forward a page |
| `R` | resend the page |
| `N` / `P` | next or previous item of the menu |
| `B` | back one page |
| `F` | forward one page |
| `R` | sends the page again |
| `N` / `P` | the next or previous item of the menu |
| `H` or `?` | help |
| `GO word` | go to a page by GO word or page ID |
| `FIND topic` | list the pages that mention a topic |
| `GO word` | goes to a page by GO word or page ID |
| `FIND topic` | lists the pages that contain a topic |
| `SET BRIEF ON` | brief `!` prompts |
| `SET PAGED ON` | stop at each screen |
| `SET PAGED ON` | stops at each screen |
| `SET WIDTH n` / `SET LINES n` | screen size |
| `OFF` or `BYE` | sign off |
| `LOG` | sign off and go back to `User ID:` |
| `OFF` or `BYE` | signs off |
| `LOG` | signs off and goes back to `User ID:` |
Commands chain with `;`, as in `SET BRI ON;GO RATES`.
You can join commands with `;`, as in `SET BRI ON;GO RATES`.
## Terminal settings (GO DEFAULT)
`SET` changes the session's settings. `GO DEFAULT` (or `TERMINAL`, or
choice 1 of `GO PROFILE`) keeps them with your User ID, through
CompuServe's own menus: TERMINAL SETTINGS/SERVICE OPTIONS, then
PERMANENT SETTINGS with its Logon/Service, Display, Terminal and
Transfer protocol groups. When you leave, you confirm the changes. The
screens follow TAPCIS's ALT-P script (PARAMS.SCR, 1991), which sets a new
member up through them.
`SET` changes the settings of the session. `GO DEFAULT` (or `TERMINAL`,
or item 1 of `GO PROFILE`) keeps them with your User ID, through the
menus of CompuServe: TERMINAL SETTINGS/SERVICE OPTIONS, then PERMANENT
SETTINGS with its Logon/Service, Display, Terminal and Transfer protocol
groups. When you leave, you confirm the changes. The screens follow the
ALT-P script of TAPCIS (PARAMS.SCR, 1991), which configures a new member
through them.
What the kept settings do:
The kept settings do these functions:
- PAGED, BRIEF, WIDTH and LINES take effect at each logon.
- **Mail waiting: Go to MAIL** goes straight into Mail when letters wait.
- **Online editor** sets Mail's line numbering when Mail has no setting
of its own.
- PAGED, BRIEF, WIDTH and LINES apply at each logon.
- **Mail waiting: Go to MAIL** goes directly into Mail when letters wait.
- **Online editor** sets the line numbers of Mail when Mail has no
setting of its own.
- **Protocol preference** (B, Quick B, XMODEM or Kermit) skips the
protocol menu.
The rest are kept and shown, as scripts expect, but do nothing here:
terminal type, parity, delays, first service, TOP goes to, forum mode and
graphics support. Forums are always in command mode. Add `;TTY` to the
User ID (`72000,1;TTY`) to log on with the defaults for once.
The service keeps and shows the other settings, as scripts expect, but
they do nothing here: terminal type, parity, delays, first service, TOP
goes to, forum mode and graphics support. Forums are always in command
mode. To log on with the defaults one time, add `;TTY` to the User ID
(`72000,1;TTY`).
## Forums
`GO FORUMS` lists the forums. Each forum is a group of the BBS's message
areas, and each area in it is a section (S0, S1, ...). Areas in no group
make up a forum named after the BBS. A group with more than 18 areas is
split into several forums, because CompuServe's forums had at most 18
sections. A forum's GO word is its name in capitals, letters and digits
only (`Amiga Tech` is `GO AMIGATECH`). Message numbers are the BBS's own,
so they rise across the forum with gaps.
`GO FORUMS` lists the forums. Each forum is a group of the message areas
of the BBS. Each area in it is a section (S0, S1, ...). Areas that are
not in a group make a forum with the name of the BBS. The service
divides a group with more than 18 areas into more than one forum,
because the forums of CompuServe had a maximum of 18 sections. The GO
word of a forum is its name in capitals, with letters and digits only
(`Amiga Tech` is `GO AMIGATECH`). Message numbers are the numbers of the
BBS. Thus, they increase across the forum, with gaps.
The forum works in command mode, at `Forum !`, which is the mode TAPCIS
and the other offline readers need:
The forum operates in command mode, at `Forum !`. TAPCIS and the other
offline readers must have this mode:
| Command | Does |
|---|---|
| `REA [NEW\|ALL\|WAI\|REV\|THR] [FROM:x] [TO:x] [SUB:x] [SEC:n,n] [DAYS:n] [STA:n] [n]` | read (NEW by default); `Read action !` after each: `RE` reply, `RER` reread, `P` parent, CR next |
| `SCA ...` / `SCA QUI ...` | the headers, or one line each |
| `BRO ...` | a header at a time, read on CR |
| `POST [SEC:n] [TO:x] [SUB:x]` | write a message (EDIT: `/EX` then `S` to store, or `/POST`) |
| `DES` / `NEW` | the sections; the new messages in each |
| `OPT;TYP N` | read nonstop (`TYP P` pauses again); the rest of OPT is taken |
| `REA [NEW\|ALL\|WAI\|REV\|THR] [FROM:x] [TO:x] [SUB:x] [SEC:n,n] [DAYS:n] [STA:n] [n]` | reads (NEW by default). `Read action !` after each: `RE` reply, `RER` read again, `P` parent, CR next |
| `SCA ...` / `SCA QUI ...` | the headers, or one line for each |
| `BRO ...` | one header at a time, read on CR |
| `POST [SEC:n] [TO:x] [SUB:x]` | writes a message (EDIT: `/EX` then `S` to store, or `/POST`) |
| `DES` / `NEW` | the sections. The new messages in each |
| `OPT;TYP N` | reads with no stop (`TYP P` stops again). The service accepts the other OPT settings |
| `MES` / `M` | the `Messages !` prompt and back |
| `EXIT`, `M`, `T`, `GO x`, `OFF` | leave the forum |
| `EXIT`, `M`, `T`, `GO x`, `OFF` | leaves the forum |
Headers follow forum software 4's:
Headers follow those of forum software 4:
```
#: 2 S1/Software
@@ -168,31 +177,31 @@ Fm: sysop 72000,2
To: alice 72000,1
```
Membership (JOIN) and conferencing are not there yet.
Membership (JOIN) and conferences are not available yet.
## Libraries
A forum's libraries are the file areas in its group, numbered from 0 like
its sections. File areas in no group are the libraries of the forum named
after the BBS. Put a file area in a group with
`bbs filearea group AREA GROUP`.
The libraries of a forum are the file areas in its group, with numbers
from 0, as its sections have. File areas that are not in a group are the
libraries of the forum with the name of the BBS. To put a file area in a
group, use `bbs filearea group AREA GROUP`.
`LIB n` from `Forum !` opens a library, at `LIB !`:
| Command | Does |
|---|---|
| `DIR [name] [/DES] [KEY:x] [AGE:n]` | the files, newest first; with `/DES` or a name, their title, keywords and description |
| `BRO ...` | a file at a time, with a disposition menu |
| `SCA [/DES] ...` | a line or two each (`NAME/Bin Bytes: n`) |
| `DOW name [/PROTO:B\|QB\|XMODEM\|KERMIT\|CAPTURE]` | download; without `/PROTO:`, CompuServe's protocol menu |
| `UPL name [/PROTO:...] [/TYPE:ASC\|BIN]` | upload, then the title, keywords and description (465 characters at most) |
| `LIB n`, `M` | another library; back to the forum |
| `DIR [name] [/DES] [KEY:x] [AGE:n]` | the files, newest first. With `/DES` or a name, their title, keywords and description |
| `BRO ...` | one file at a time, with a disposition menu |
| `SCA [/DES] ...` | one or two lines for each (`NAME/Bin Bytes: n`) |
| `DOW name [/PROTO:B\|QB\|XMODEM\|KERMIT\|CAPTURE]` | downloads. Without `/PROTO:`, the protocol menu of CompuServe |
| `UPL name [/PROTO:...] [/TYPE:ASC\|BIN]` | uploads, then the title, keywords and description (a maximum of 465 characters) |
| `LIB n`, `M` | a different library. Back to the forum |
The B and Quick B choices run the B Plus engine. The host sends ENQ, and
the terminal's answer decides between Classic B, Quick B and B Plus.
XMODEM and Kermit print CompuServe's start message and wait for a CR when
the transfer is complete. Downloads count against the BBS's daily limits
and ratios, the same as on the BBS itself. Entries look like this:
The B and Quick B selections run the B Plus engine. The host sends ENQ,
and the answer of the terminal selects Classic B, Quick B or B Plus.
XMODEM and Kermit print the start message of CompuServe, and wait for a
CR when the transfer is complete. Downloads count against the daily
limits and ratios of the BBS, as on the BBS. Entries look like this:
```
[72000,2]
@@ -204,39 +213,42 @@ BPLUS.ZIP/binary 08-Nov-26 8700 Accesses: 1
## Mail
`GO MAIL` (or `EASY`, `EASYPLEX`) enters CompuServe Mail. It is the BBS's
private mail: what is sent here arrives in the BBS's mailbox, and the
other way round. A message is *pending* until it is read. Read messages
stay in the mailbox, as if saved, until they are deleted.
`GO MAIL` (or `EASY`, `EASYPLEX`) opens CompuServe Mail. It is the
private mail of the BBS. Mail sent here arrives in the mailbox of the
BBS, and mail sent on the BBS arrives here. A message is *pending* until
you read it. Read messages stay in the mailbox, as if saved, until you
delete them.
Mail starts in menu mode, as CompuServe's did. `SET` opens the Options
Menu, where option 2 changes the mode to PROMPT or COMMAND, and the
Mail starts in menu mode, as the Mail of CompuServe did. `SET` opens the
Options Menu. There, option 2 changes the mode to PROMPT or COMMAND. The
answer to `Make changes permanent for future Mail sessions ? (Y or N) !`
keeps it with the account. TAPCIS's setup script (`PARAMS.SCR`, run by
Alt-P) does exactly this, then `set edit noline` and `set page off`, which
are kept too. In command mode the prompt is `Mail!`.
keeps it with the account. The setup script of TAPCIS (`PARAMS.SCR`, run
by Alt-P) does exactly this, then `set edit noline` and `set page off`.
The service also keeps these. In command mode, the prompt is `Mail!`.
| Command | Does |
|---|---|
| `READ [n\|ALL\|SAVED]` | read the pending messages (or the saved ones); `Action!` after each: CR next, `DELETE`, `SAVE`, `REREAD`, `REPLY`, `FORWARD [address]`, `DOWNLOAD [/PROTO:x]` |
| `SCAN [ALL\|SAVED]` | one line each: ` 1 alice/Testing` |
| `COMPOSE [address]` | write (EDIT, ending with `/EX`), then `Send to (Name or User ID):`, `Subject:` and `Send? (Y or N)!` |
| `UPLOAD [/PRO:B] [/TYP:ASCII\|LATIN1]` | a message's text by a protocol, then the same questions (TAPCIS's `UPL/PRO:B/TYP:ASCII MAIL%.TMP`) |
| `READ [n\|ALL\|SAVED]` | reads the pending messages (or the saved ones). `Action!` after each: CR next, `DELETE`, `SAVE`, `REREAD`, `REPLY`, `FORWARD [address]`, `DOWNLOAD [/PROTO:x]` |
| `SCAN [ALL\|SAVED]` | one line for each: ` 1 alice/Testing` |
| `COMPOSE [address]` | writes (EDIT, with `/EX` at the end), then `Send to (Name or User ID):`, `Subject:` and `Send? (Y or N)!` |
| `UPLOAD [/PRO:B] [/TYP:ASCII\|LATIN1]` | the text of a message by a protocol, then the same questions (the `UPL/PRO:B/TYP:ASCII MAIL%.TMP` of TAPCIS) |
| `DOWNLOAD [n\|ALL\|SAVED] [/PROTO:x]` | messages as one text file, by a protocol |
| `DELETE n` | delete a message |
| `ADDRESS` | the address book, which is kept (and is the same one MSN Classic's Exchange uses), and `NAME` for your Mail name (for this session only) |
| `DELETE n` | deletes a message |
| `ADDRESS` | the address book, which the service keeps (it is the same one that the Exchange of MSN Classic uses), and `NAME` for your Mail name (for this session only) |
| `SET`, `SET MODE x`, `SET EDIT x`, `SET PAGE x`, `MODE` | the options |
| `EXIT`, `T`, `GO x`, `OFF` | leave Mail |
| `EXIT`, `T`, `GO x`, `OFF` | leaves Mail |
Addresses take CompuServe's forms: a BBS name, a User ID (`72000,1`), a
name and an ID (`Sysop 72000,2`, `Sysop [72000,2]`), or a name and a
network address after `>`. `INTERNET:72000.1@compuserve.com` is a member
here. Other Internet addresses, FAX, POSTAL, MCIMAIL, X.400 and MHS are
refused, with a message saying so. A FidoNet address (`Bob@1:234/5`) goes
out as netmail when the BBS is on FidoNet. An address ending in `;` asks
for another, and a `/R` (return receipt) is accepted but not acted on.
Addresses use the forms of CompuServe: a BBS name, a User ID
(`72000,1`), a name and an ID (`Sysop 72000,2`, `Sysop [72000,2]`), or a
name and a network address after `>`.
`INTERNET:72000.1@compuserve.com` is a member here. The service refuses
other Internet addresses, FAX, POSTAL, MCIMAIL, X.400 and MHS, with a
message that tells this. A FidoNet address (`Bob@1:234/5`) goes out as
netmail when the BBS is on FidoNet. An address that ends in `;` asks for
another address. The service accepts a `/R` (return receipt), but does
not do it.
A message reads like this:
A message looks like this:
```
Date: 08-Nov-26 12:40 UTC
@@ -248,32 +260,33 @@ Hello from Mail.
## CB Simulator
`GO CB` enters the CB Simulator. Its channels are the BBS's chat rooms
`cb-1` to `cb-36`, so callers in the BBS's own chat, or on IRC, can join a
channel too. A CB caller picks a handle, which can't be another member's
name, and a channel. After that, whatever they type is said on that
channel. A line from the tuned channel shows as `(Handle) text`, and a
line from a monitored channel shows as `(17,Handle) text`. Others see
the handle, and the BBS's other chat programs see the caller's name.
`GO CB` opens the CB Simulator. Its channels are the chat rooms `cb-1`
to `cb-36` of the BBS. Thus, callers in the chat of the BBS, or on IRC,
can also join a channel. A CB caller selects a handle, which cannot be
the name of a different member, and a channel. Then all text that the
caller types goes to that channel. A line from the tuned channel shows
as `(Handle) text`. A line from a monitored channel shows as
`(17,Handle) text`. Other CB callers see the handle. The other chat
programs of the BBS see the name of the caller.
| Command | Does |
|---|---|
| `/TUN n` | tune to channel n (1-36) |
| `/MON 1,4`, `/UNM 1,4` | listen to other channels too, or stop |
| `/STA` | how many are on each channel |
| `/UST [n]` | who is on CB: job, User ID, channel (`17s` scrambled, `Tlk` talking), node, handle |
| `/WHO` | the User ID of the last talker |
| `/HAN name` | change your handle |
| `/SCR key`, `/SMC key`, `/XCL key`, `/UNS` | scramble what you send and unscramble what you get, one of the two, or neither |
| `/SQU handle` | squelch a handle (again to unsquelch) |
| `/TALK job` | talk with one caller alone (`/EXIT` back to the channel) |
| `/ROLL [3D6]` | roll dice for the channel |
| `/TUN n` | tunes to channel n (1-36) |
| `/MON 1,4`, `/UNM 1,4` | also listens to other channels, or stops |
| `/STA` | the number of users on each channel |
| `/UST [n]` | the users on CB: job, User ID, channel (`17s` scrambled, `Tlk` talking), node, handle |
| `/WHO` | the User ID of the last user who sent a line |
| `/HAN name` | changes your handle |
| `/SCR key`, `/SMC key`, `/XCL key`, `/UNS` | scrambles the text that you send and unscrambles the text that you get, one of the two, or neither |
| `/SQU handle` | squelches a handle (again to unsquelch) |
| `/TALK job` | talks with one caller only (`/EXIT` back to the channel) |
| `/ROLL [3D6]` | rolls dice for the channel |
| `/TIM`, `/JOB`, `/HELP` | the time, your job number (the BBS node), the commands |
| `/EXI`, `/OFF` | leave CB, or log off |
| `/EXI`, `/OFF` | leaves CB, or logs off |
Scrambling works the way CompuServe's did. Everything you send goes out
permuted by the key, and everything you receive is unpermuted with it,
so only callers using the same key read each other.
Scrambling operates as it did on CompuServe. The key permutes all text
that you send, and the key reverses the permutation on all text that you
get. Thus, only callers who use the same key can read each other.
## What is there and what is coming
@@ -283,10 +296,10 @@ so only callers using the same key read each other.
| Forums on the message areas, with the forum command language | |
| The CompuServe B, Quick B and B Plus protocols (`internal/xfer/cisb.go`) | B Plus resume (Tr) and file information (TI) |
| Libraries on the file areas, with B+ downloads and uploads | |
| CompuServe Mail on the BBS's private mail | Binary mail |
| CompuServe Mail on the private mail of the BBS | Binary mail |
| The CB Simulator on the chat rooms | Forum conferences (CO) |
| CIM: Secure Login, the B Plus Transport Layer, HMI pages, menus, articles and Find | |
| CIM: reading forums and Mail, library lists | CIM: sending mail, posting, downloads, CB |
The research behind all this, with sources, is in
The research for all of this, with sources, is in
[docs/cis](https://github.com/D-Modem/bbs/tree/main/docs/cis).
+139 -127
View File
@@ -1,167 +1,176 @@
The BBS reads its settings from one file, `bbs.conf`. This page explains
how the file is laid out, how to edit it in the configuration screens, and
which settings can change while callers are on.
The BBS reads its settings from one file, `bbs.conf`. This page tells
you the layout of the file, how to edit it in the configuration screens,
and which settings can change while callers are on.
[bbs.conf.sample](https://github.com/D-Modem/bbs/blob/HEAD/bbs.conf.sample)
has every option with comments, and the
[Configuration reference](Configuration-Reference) lists them all, section
by section.
has all options with comments. The
[Configuration reference](Configuration-Reference) lists all of them,
section by section.
## Listeners
`[general]` holds the system-wide settings (name, database, log, banner,
message of the day, timeouts and limits). Each `[listen NAME]` section is a
port or unix socket that callers come in on, and its `type` says what kind
of caller to expect:
`[general]` holds the settings for the full system (name, database, log,
banner, message of the day, timeouts and limits). Each `[listen NAME]`
section is a port or unix socket on which callers connect. Its `type`
tells the type of caller to expect:
| `type` | What comes in |
|---|---|
| `telnet` | a telnet client; with `tn3270 = yes` (the default) 3270s get 3270 screens |
| `raw` | bytes as they come: app_dmodem's `mode = tcp`, a modemmenu `tcp` or `unix` item |
| `rlogin` | RFC 1282, as modemmenu's `rlogin` items speak it |
| `ssh` | SSH: the text BBS, logged in by password or key ([SSH](SSH)) |
| `telnet` | a telnet client. With `tn3270 = yes` (the default), 3270s get 3270 screens |
| `raw` | bytes as they come: the `mode = tcp` of app_dmodem, a modemmenu `tcp` or `unix` item |
| `rlogin` | RFC 1282, as the `rlogin` items of modemmenu use it |
| `ssh` | SSH: the text BBS, with login by password or key ([SSH](SSH)) |
`address` is `host:port`, or a path for a unix socket (with
`socket_mode` and `socket_group`). Any listener except `ssh` can read a
session header first (`header = yes`), and with `trust_user = yes` it
treats the caller as already logged in; see
[Modem callers](Modem-Callers). (An `ssh` listener logs its callers in
itself.) `petscii` and `rip` say whether callers may be Commodores or
RIPscrip terminals (see [PETSCII and RIP](PETSCII-and-RIP)), and `vt` says
whether terminals are asked what they are (see
`socket_mode` and `socket_group`). All listeners except `ssh` can read a
session header first (`header = yes`). With `trust_user = yes`, the
listener accepts the caller as already logged in. Refer to
[Modem callers](Modem-Callers). (An `ssh` listener logs in its callers
itself.) `petscii` and `rip` tell if callers can be Commodores or
RIPscrip terminals (refer to [PETSCII and RIP](PETSCII-and-RIP)). `vt`
tells if the BBS asks terminals what they are (refer to
[Terminal identification](Terminal-Identification)).
## The sections
| Section | What it sets | Page |
|---|---|---|
| `[general]` | the system: name, sysop, database, log, banner, message of the day, logo, new users, limits, timeouts, file areas' directory and limits | here, [Security](Security) |
| `[listen NAME]` | a port or socket callers come in on | here, [Modem callers](Modem-Callers), [TN3270](TN3270) |
| `[general]` | the system: name, sysop, database, log, banner, message of the day, logo, new users, limits, timeouts, the directory and limits of the file areas | here, [Security](Security) |
| `[listen NAME]` | a port or socket on which callers connect | here, [Modem callers](Modem-Callers), [TN3270](TN3270) |
| `[ftp]` | the FTP server for the file areas | [Files and FTP](Files-and-FTP) |
| `[news]`, `[nntp]`, `[peer NAME]` | newsgroups, the NNTP server, news peers | [Newsgroups and NNTP](Newsgroups-and-NNTP) |
| `[fido]`, `[binkp]`, `[link NAME]` | FidoNet: our address, the binkp mailer, links | [FidoNet](FidoNet) |
| `qwk_id` (in `[general]`), `[qwknet NAME]` | QWK packets' name; QWK networks this is a node of | [Offline mail](Offline-Mail) |
| `qwk_id` (in `[general]`), `[qwknet NAME]` | the name of QWK packets. The QWK networks of which this BBS is a node | [Offline mail](Offline-Mail) |
| `[door NAME]` | a door program | [Doors](Doors) |
| `screens_dir` (in `[general]`), `[menu NAME]`, `[strings]` | the sysop's screens, menus and prompts | [Customization](Customization) |
| `scripts_dir` (in `[general]`) | the sysop's JavaScript | [Scripting](Scripting) |
| `screens_dir` (in `[general]`), `[menu NAME]`, `[strings]` | the screens, menus and prompts of the sysop | [Customization](Customization) |
| `scripts_dir` (in `[general]`) | the JavaScript of the sysop | [Scripting](Scripting) |
| `[security]` | deny lists, bans, the hack log | [Security](Security) |
| `[event NAME]` | scheduled programs | [Sysop tools](Sysop-Tools) |
| `[finger]`, `[gopher]`, `[gemini]` | the finger, gopher and Gemini servers | [Finger, gopher and Gemini](Finger-and-Gopher) |
| `[irc]` | the IRC server for the chat rooms | [IRC](IRC) |
| `[mrc]` | Multi Relay Chat | [MRC](MRC) |
| `database` (in `[general]`) | SQLite's file, or a PostgreSQL, MySQL or MariaDB server | [Databases](Databases) |
| `database` (in `[general]`) | the SQLite file, or a PostgreSQL, MySQL or MariaDB server | [Databases](Databases) |
| `[level N]`, `new_user_level`, `validated_level` (in `[general]`) | access levels | [Access levels](Access-Levels) |
| `[http]` | the HTTP API, its WebSockets, the web forum, the web terminal and metrics | [HTTP API](HTTP-API), [Web forum](Web-Forum) |
| `[chan]`, `chan` (in `[http]`) | the image boards | [Image boards](Image-Boards) |
| `page_command` (in `[general]`) | telling the sysop of a page when they are not on | [Chat and paging](Chat-and-Paging) |
| `geoip`, `geoip_credit`, `phone_country`, `geoip_users`, `geoip_prefill` (in `[general]`) | where callers are: a country database for addresses, the home country of caller IDs; users who share theirs with the sysops; new users' locations filled in | [Modem callers](Modem-Callers#where-callers-are), [Web forum](Web-Forum#flags) |
| `page_command` (in `[general]`) | tells the sysop about a page when the sysop is not on | [Chat and paging](Chat-and-Paging) |
| `geoip`, `geoip_credit`, `phone_country`, `geoip_users`, `geoip_prefill` (in `[general]`) | the locations of callers: a country database for addresses, the home country of caller IDs. Users who share their location with the sysops. The locations of new users filled in | [Modem callers](Modem-Callers#where-callers-are), [Web forum](Web-Forum#flags) |
`bbs check` reads the file and reports what it found. It warns about
anything risky, such as a password that may cross the network in the
clear, a socket that trusts whoever connects, or a link without a
password.
`bbs check` reads the file and reports what it found. It gives a warning
about risks, for example a password that can go across the network in
clear text, a socket that trusts all processes that connect, or a link
without a password.
## Editing it: the configuration screens
`bbs -config /etc/bbs/bbs.conf config` opens the setup screens on your
terminal for editing the file and the accounts, whether or not the BBS is
running. The same screens are in the [sysop tools](Sysop-Tools) (`F`,
Configuration). On an ANSI terminal they look like the BBS setup programs
of the 1990s: a menu bar of pull-down menus, a shaded blue desk, each menu
a window over the one it was opened from, the line's help in a box below,
and values changed in boxes that pop up. They use PF keys on a 3270, and
become numbered lines on a terminal with neither.
terminal. Use them to edit the file and the accounts, while the BBS runs
or not. The same screens are in the [sysop tools](Sysop-Tools) (`F`,
Configuration). On an ANSI terminal, they look like the BBS setup
programs of the 1990s:
- A menu bar of pull-down menus, and a shaded blue desk.
- Each menu is a window over the menu from which you opened it.
- The help of the line is in a box below.
- You change values in boxes that pop up.
On a 3270, they use PF keys. On a terminal with neither, they become
numbered lines.
<img src="https://raw.githubusercontent.com/D-Modem/bbs/main/.github/config-screens.png" alt="The setup screens: the Online pull-down menu over the main menu" width="100%">
| Menu | What is in it |
|---|---|
| Board configuration | the BBS's name, the sysop's, the location, postal address, dial-in numbers and internet addresses; the banner, message of the day, goodbye, logo; menus and prompts |
| System configuration | the user and group it runs as; the database and log; where files are kept and how large they may be; deny lists, the hack log, bans; scheduled events; every section of the file as it is |
| Connections and modems | modem lines and every listener; callers at once, logins, time-outs, lock-outs; passwords by modemmenu's auth socket ([Modem callers](Modem-Callers#the-same-password-for-telnet-ssh-and-the-web)); the caller ID country and GeoIP |
| Internet services | telnet, TN3270, SSH and RLogin listeners; finger, gopher, Gemini, FTP, news, the web (API, forum, image boards) |
| Board configuration | the name of the BBS, the name of the sysop, the location, postal address, dial-in numbers and internet addresses. The banner, message of the day, goodbye, logo. Menus and prompts |
| System configuration | the user and group that the BBS runs as. The database and log. The location of files and their maximum size. Deny lists, the hack log, bans. Scheduled events. All sections of the file as they are |
| Connections and modems | modem lines and all listeners. Callers at one time, logins, time-outs, lock-outs. Passwords by the auth socket of modemmenu ([Modem callers](Modem-Callers#the-same-password-for-telnet-ssh-and-the-web)). The caller ID country and GeoIP |
| Internet services | telnet, TN3270, SSH and RLogin listeners. Finger, gopher, Gemini, FTP, news, the web (API, forum, image boards) |
| Online services | [AOL](AOL), [CompuServe](CompuServe) (its listeners) and [The Microsoft Network](MSN-Classic) (its TCP host and dial-in listeners) |
| Messengers and chat | [AIM and ICQ](AIM-and-ICQ), [MSN Messenger](MSN-Messenger), [Yahoo! Messenger](Yahoo-Messenger), the [IRC](IRC) server, [IRC network links](IRC-Linking) and their peers, [MRC](MRC) |
| E-mail | [`[mail]`](E-mail), the smarthost, POP3, IMAP, SMTP submission, MX and LMTP |
| Networks and doors | [FidoNet](FidoNet) and binkp, QWK networks, doors |
| Time | the clock and its sources, and the NTP, NTS-KE and PTP servers ([Time](Time)) |
| Users and groups | the accounts (level, flags, sysop, locked, a new password; new ones; deleted ones) and the access levels |
| Maintenance | disk space; what message areas keep, old messages taken out; the image boards' archive; backups: one now, those made, `[backup]` ([Backups](Backups)) |
| Users and groups | the accounts (level, flags, sysop, locked, a new password. New accounts. Deleted accounts) and the access levels |
| Maintenance | disk space. The quantity of messages that message areas keep, and the removal of old messages. The archive of the image boards. Backups: one now, the backups made, `[backup]` ([Backups](Backups)) |
The menu bar's pull-down menus (`/`, F12, or Alt and the menu's red
letter) go straight to any of these from anywhere: File (review, check,
save, quit), Setup, Lines, Internet, Online (the online services and the
messengers), Mail, Networks, Time and Help.
The pull-down menus of the menu bar (`/`, F12, or Alt and the red
letter of the menu) go directly to these menus from all locations: File
(review, check, save, quit), Setup, Lines, Internet, Online (the online
services and the messengers), Mail, Networks, Time and Help.
System passwords (PAM, LDAP) are checked by modemmenu, which logs callers
in and hands them to the BBS (see [Modem callers](Modem-Callers)). Running
the BBS as a user of its own (System configuration's Run as user) is
covered in [Running](Running#running-as-a-user-of-its-own).
modemmenu checks system passwords (PAM, LDAP). It logs in callers and
gives them to the BBS (refer to [Modem callers](Modem-Callers)). For how
to run the BBS as its own user (Run as user in System configuration),
refer to [Running](Running#running-as-a-user-of-its-own).
| Key | What it does |
|---|---|
| arrows, PgUp, PgDn, Home, End | move (a letter goes to the next line beginning with it) |
| Enter | open a menu, change a value (typed in a box that pops up, or picked from a list of its choices), do an action |
| Space | turn a yes/no over, or go to the next choice (a list's: open it; in a list of some, turn one on or off) |
| Esc, left arrow | back a window |
| `/`, F12, Alt+letter | the menu bar's pull-down menus (arrows between them, Enter to go) |
| F1 or `?` | the whole help for the line (from bbs.conf.sample) |
| F9 | quit without saving (after a yes, if anything changed) |
| F10 | save and exit |
| `A`, `D` | add one (a listener, a door, a user ...), delete it |
| Ctrl-L | draw the screen again |
| arrows, PgUp, PgDn, Home, End | move (a letter goes to the next line that starts with it) |
| Enter | opens a menu, changes a value (typed in a box that pops up, or selected from a list of its values), does an action |
| Space | changes a yes/no value, or goes to the next value (for a list: opens it. In a list with more than one selection: selects or clears one item) |
| Esc, left arrow | goes back one window |
| `/`, F12, Alt+letter | the pull-down menus of the menu bar (arrows between them, Enter to go) |
| F1 or `?` | the full help for the line (from bbs.conf.sample) |
| F9 | quits without a save (after a yes, if you changed something) |
| F10 | saves and exits |
| `A`, `D` | adds one item (a listener, a door, a user ...), deletes it |
| Ctrl-L | draws the screen again |
### Values picked from what there is
Most settings are picked from a list (marked `↕`) rather than typed, the
list made from what the file and the machine have, a word beside each:
You select most settings from a list (marked `↕`). You do not type
them. The screens make the list from the items that the file and the
machine have, with a word adjacent to each item:
| Setting | Offered |
|---|---|
| a certificate (`tls_cert`, `cert_file`) | `acme` and each `acme:NAME` (with its names), `ca` where the BBS's own CA can sign it, and the certificate files other servers use |
| its key (`tls_key`, `key_file`) | the key that goes with the certificate chosen (from another server, or beside it on disk), and the others the file names; not asked for with `acme` or `ca` |
| an address a server listens on | every address, this machine only, and each of this machine's IPs, at the port it has (or the usual one); one another server is on is marked *taken by* |
| `[dns]` `answer` and `*_answer` | the IPs the services listen on, and this machine's |
| `[dnsrecord]` `type`, `value` (DNS for callers, DNS records) | the record types, each with what its value looks like; an A or AAAA record's address from this machine's and the services' |
| `[dns]` `primary`, `backup` | this host's servers, and the well-known public ones |
| `[dns]` `services`, `[feeds]` `catalog`, `[time]` `servers`, `[mx]` `dnsbl`, gopher's and Gemini's `areas` | some of them at once (Space on each) |
| levels (new users', validated users', a user's, `[mrc]` and `[menu]` `require`) | the `[level N]`s, with their names |
| a menu item (Add a menu item on a menu's page) | the BBS's own actions, each door, the other menus, the screens and scripts, the areas, each with a label to begin from |
| a certificate (`tls_cert`, `cert_file`) | `acme` and each `acme:NAME` (with its names), `ca` where the CA of the BBS can sign it, and the certificate files that other servers use |
| its key (`tls_key`, `key_file`) | the key for the selected certificate (from a different server, or adjacent to it on disk), and the other keys that the file names. The screens do not ask for it with `acme` or `ca` |
| an address on which a server listens | all addresses, this machine only, and each IP of this machine, at the port that it has (or the usual port). If a different server uses an address, the screens mark it *taken by* |
| `[dns]` `answer` and `*_answer` | the IPs on which the services listen, and the IPs of this machine |
| `[dnsrecord]` `type`, `value` (DNS for callers, DNS records) | the record types, each with the format of its value. The address of an A or AAAA record from the addresses of this machine and of the services |
| `[dns]` `primary`, `backup` | the servers of this host, and the well-known public servers |
| `[dns]` `services`, `[feeds]` `catalog`, `[time]` `servers`, `[mx]` `dnsbl`, the `areas` of gopher and Gemini | more than one at a time (Space on each) |
| levels (of new users, of validated users, of a user, `[mrc]` and `[menu]` `require`) | the `[level N]`s, with their names |
| a menu item (Add a menu item on the page of a menu) | the actions of the BBS, each door, the other menus, the screens and scripts, the areas, each with a label to start from |
| `[menu]` `screen` | the display files in `screens_dir` |
| `[link]` `aka` | `[fido]`'s addresses |
| `[feed]` `group`, `area` | the catalogue's groups and the other feeds'; the message areas |
| the user and groups it runs as | this machine's accounts and groups |
| ACME's CA, DNS provider, challenge and key type; the log; TLS modes; outbound mail; and the rest of the settings with a fixed set of values | those values, with what each one does |
| `[link]` `aka` | the addresses of `[fido]` |
| `[feed]` `group`, `area` | the groups of the catalogue and of the other feeds. The message areas |
| the user and groups that the BBS runs as | the accounts and groups of this machine |
| the CA, DNS provider, challenge and key type of ACME. The log. TLS modes. Outbound mail. The other settings with a fixed set of values | those values, with the function of each |
A list whose values are only suggestions ends with *Type another value*,
and on a 3270 the value can always be typed over; F1 lists the choices
with their notes. On a 3270, `S` beside such a line opens the list; on a
terminal without ANSI its number does, a number each to pick.
If the values of a list are only suggestions, the list ends with *Type
another value*. On a 3270, you can always type over the value. F1 lists
the values with their notes. On a 3270, `S` adjacent to such a line
opens the list. On a terminal without ANSI, its number opens the list,
with a number for each value.
In a box where a value is typed, the arrows, Home and End move, Ctrl-U
clears it, Enter keeps it and Esc leaves the value as it was. The screens
are sent a changed cell at a time, so moving the bar costs a modem caller
a few bytes, and a terminal without UTF-8 gets code page 437's lines and
shading.
In a box where you type a value, the arrows, Home and End move. Ctrl-U
clears the value. Enter keeps it. Esc does not change the value. The
screens send one changed cell at a time. Thus, a movement of the bar
uses only a few bytes for a modem caller. A terminal without UTF-8 gets
the lines and shading of code page 437.
On a 3270, type `S` beside a menu to open it, type over values and send
them with Enter; PF1 is help, PF3 goes back, and PF9 and PF10 work like F9
and F10. On a terminal without ANSI, type a line's number to open or change
it, `S` to save and exit, or `X` to leave without saving.
On a 3270, type `S` adjacent to a menu to open it. Type over values and
send them with Enter. PF1 is help, PF3 goes back, and PF9 and PF10
operate as F9 and F10. On a terminal without ANSI, type the number of a
line to open or change it. Type `S` to save and exit, or `X` to leave
without a save.
Nothing changes until you save. A changed line is marked `*`, and the
help box counts the unsaved changes. The main menu's Review changes
lists them all, and Check the configuration reads the file as the BBS
would.
Nothing changes until you save. A changed line has the mark `*`, and the
help box counts the changes that are not saved. Review changes on the
main menu lists all of them. Check the configuration reads the file as
the BBS reads it.
When you save, the file is checked first. It is not saved if the BBS would
not start with it, or if someone else changed it since it was read. It is
then written whole, keeping its permissions and owner, with the previous
version kept as `bbs.conf.bak`. Every comment stays where it was, and a new
key goes below the sample's commented example of it. After that, the
changes to accounts and areas are made. From the sysop's menu, settings
that can change while callers are on take effect at once, and the screen
says which ones wait for a restart. If there is no file yet, the screens
offer to start one from the sample.
When you save, the screens first check the file. They do not save it if
the BBS cannot start with it, or if a different person changed it after
the screens read it. Then they write the full file. They keep its
permissions and owner, and keep the previous version as `bbs.conf.bak`.
All comments stay where they were. A new key goes below the commented
example of it from the sample. After that, the screens make the changes
to accounts and areas. From the menu of the sysop, settings that can
change while callers are on apply immediately. The screen tells which
settings wait for a restart. If there is no file yet, the screens offer
to start one from the sample.
Scripts can read and change one key at a time:
@@ -170,39 +179,42 @@ Scripts can read and change one key at a time:
bbs -config /etc/bbs/bbs.conf config set "listen ssh" address :2222
bbs -config /etc/bbs/bbs.conf config unset general motd
Each change is checked as the BBS would read it before it is written,
and the command prints what changed and when it takes effect.
The command checks each change as the BBS reads it, before it writes the
change. Then it prints what changed and when the change applies.
## Changing it while callers are on
`systemctl reload bbs` (`ExecReload` in bbs.service.sample, which sends
SIGHUP) makes the BBS read the file again. If the BBS would not start with
the new file, nothing changes and the log says why. Otherwise the keys
below take effect at once, and the log lists the other changes, which wait
for a restart:
SIGHUP) makes the BBS read the file again. If the BBS cannot start with
the new file, nothing changes, and the log gives the reason. If it can,
the keys below apply immediately. The log lists the other changes, which
wait for a restart:
| Section | Keys that change at once |
|---|---|
| `[general]` | `name`, `sysop`, `location`, `postal_address`, `phone`, `addresses`, `banner`, `banner_file`, `motd`, `motd_file`, `goodbye`, `new_users`, `max_nodes`, `attempts`, `fail_delay`, `login_timeout`, `idle_timeout`, `throttle_failures`, `throttle_time`, `page_command`, `qwk_id`, `geoip`, `geoip_credit`, `geoip_credit_url`, `phone_country`, `geoip_users`, `geoip_prefill`, `new_user_level`, `validated_level` |
| `[level N]` | all, and levels added or taken out |
| `[level N]` | all, and the levels that you add or remove |
| `[backup]` | all ([Backups](Backups)) |
| `[menu NAME]`, `[strings]` | all (a caller in a menu has it until they leave it) |
| `[chan]` | all but `dir` |
| `[menu NAME]`, `[strings]` | all (a caller in a menu keeps the old menu until the caller leaves it) |
| `[chan]` | all except `dir` |
| `[http]` | `forum_guests`, `forum_theme`, `forum_flags` |
Listeners, servers (FTP, NNTP, IRC, the HTTP API and so on), networks,
doors, the database and the log are set up when the BBS starts, so changes
to them wait for a restart. So do settings a caller's session took when it
began, such as its idle timeout. The sysop's Configuration screen applies
the file itself when it writes it, and says which changes took effect and
which wait.
The BBS configures listeners, servers (FTP, NNTP, IRC, the HTTP API and
other servers), networks, doors, the database and the log when it
starts. Thus, changes to them wait for a restart. The same applies to
settings that the session of a caller took at its start, for example its
idle timeout. The Configuration screen of the sysop applies the file
itself when it writes it. It tells which changes applied and which
wait.
bbs.service.sample's `ProtectSystem=strict` stops the service from writing
to /etc. For the Configuration screen inside the BBS to save, give the
service `ReadWritePaths=/etc/bbs` and give the bbs user the file. `bbs
config` run as root works either way. Be aware that if the BBS can write
its configuration, any sysop can make it run commands (doors, events,
`page_command`). Keep the file read-only if not every sysop is trusted as
much as root.
The `ProtectSystem=strict` of bbs.service.sample stops the service from
writes to /etc. For the Configuration screen inside the BBS to save, give
the service `ReadWritePaths=/etc/bbs`, and give the file to the bbs
user. `bbs
config` run as root operates in both cases.
> **WARNING: IF THE BBS CAN WRITE ITS CONFIGURATION, ALL SYSOPS CAN MAKE
> IT RUN COMMANDS.** Doors, events and `page_command` run commands. If you
> do not trust all sysops as much as root, keep the file read-only.
**See also:** [Modem callers](Modem-Callers), [TN3270](TN3270), [Security](Security), [Sysop tools](Sysop-Tools)
+105 -98
View File
@@ -1,7 +1,7 @@
The sysop can change how the BBS looks: their own screens (ANSI art, text
and 3270 screens in colour), their own menus, and the wording of the
prompts. None of this is required; without it, the BBS uses its built-in
screens and menus.
The sysop can change the appearance of the BBS: their own screens (ANSI
art, text and 3270 screens in colour), their own menus, and the words of
the prompts. All of this is optional. Without it, the BBS uses its
built-in screens and menus.
## Screens
@@ -13,73 +13,76 @@ screens_dir = /etc/bbs/screens
```
A screen has a name (lower-case letters, digits, `_` and `-`) and one or
more files, one for each kind of terminal:
more files, one for each type of terminal:
| File | What it is | Shown to |
|---|---|---|
| `NAME.ans` | ANSI art in CP437, as ANSI editors (PabloDraw, Moebius, TheDraw) save it; a SAUCE record after ^Z is dropped | ANSI terminals |
| `NAME.asc` | text (UTF-8 or ASCII) with [tags](#tags) for colour, a page at a time | any text terminal; 3270s when there is no `.3270` |
| `NAME.ans` | ANSI art in CP437, as ANSI editors (PabloDraw, Moebius, TheDraw) save it. The BBS removes a SAUCE record after ^Z | ANSI terminals |
| `NAME.asc` | text (UTF-8 or ASCII) with [tags](#tags) for colour, one page at a time | all text terminals. 3270s when there is no `.3270` |
| `NAME.txt` | the same as `.asc` | the same |
| `NAME.3270` | text with colour tags (below) | 3270s |
| `NAME.rip` | RIPscrip (graphics and ANSI) in CP437; its buttons send keys to the menu showing it | [RIP terminals](PETSCII-and-RIP) |
| `NAME.rip` | RIPscrip (graphics and ANSI) in CP437. Its buttons send keys to the menu that shows it | [RIP terminals](PETSCII-and-RIP) |
| `NAME.seq` | PETSCII, as C64 editors save it, sent as it is (no @-codes) | [Commodores](PETSCII-and-RIP) |
Each terminal gets the first file it can show:
Each terminal gets the first file that it can show:
- an ANSI terminal: `.ans`, then `.asc`, then `.txt`
- a RIP terminal: `.rip`, then the same as ANSI
- a plain terminal: `.asc` or `.txt`
- a Commodore: `.seq`, then `.asc` or `.txt` (translated)
- a 3270: `.3270`, `.asc` or `.txt`
- An ANSI terminal: `.ans`, then `.asc`, then `.txt`.
- A RIP terminal: `.rip`, then the same as ANSI.
- A plain terminal: `.asc` or `.txt`.
- A Commodore: `.seq`, then `.asc` or `.txt` (translated).
- A 3270: `.3270`, `.asc` or `.txt`.
ANSI art is sent to a UTF-8 terminal as UTF-8, and to any other terminal
as its original CP437 bytes, which is what SyncTERM, NetRunner and DOS
terminal programs expect. Files are read each time they are shown, so you
can change them while the BBS runs. The largest file read is 256 KB.
The BBS sends ANSI art to a UTF-8 terminal as UTF-8. It sends it to all
other terminals as its original CP437 bytes, as SyncTERM, NetRunner and
DOS terminal programs expect. The BBS reads files each time that it
shows them. Thus, you can change them while the BBS runs. The largest
file that the BBS reads is 256 KB.
The BBS shows these screens by itself:
The BBS shows these screens automatically:
| Name | When | Replaces |
|---|---|---|
| `logon` | when a caller connects, before the name prompt (on a 3270, in the logon screen's upper part) | the system's name, banner and how they came |
| `newuser` | before a new user's questions | (added) |
| `welcome` | after the login | the welcome lines (the message of the day still follows) |
| `goodbye` | at a logoff | the `goodbye` line |
| `logon` | when a caller connects, before the name prompt (on a 3270, in the upper part of the logon screen) | the name of the system, the banner and the route of the caller |
| `newuser` | before the questions for a new user | (added) |
| `welcome` | after the login | the welcome lines (the message of the day still comes after it) |
| `goodbye` | at a logout | the `goodbye` line |
Menus show the others, with `screen = NAME` on a menu or a `screen:NAME`
item. [screens.sample](https://github.com/D-Modem/bbs/tree/HEAD/screens.sample)
has a set to start from.
Menus show the other screens, with `screen = NAME` on a menu or a
`screen:NAME` item.
[screens.sample](https://github.com/D-Modem/bbs/tree/HEAD/screens.sample)
has a set that you can use as a start.
### @-codes
Screens, menu titles, labels, prompts and strings can hold codes that are
filled in when they are shown:
Screens, menu titles, labels, prompts and strings can contain codes. The
BBS fills them in when it shows them:
| Code | Filled in with |
|---|---|
| `@BBS@` `@SYSOP@` `@LOCATION@` | the system |
| `@PHONE@` `@ADDRESSES@` `@POSTAL@` | how to reach it: `[general]`'s `phone`, `addresses`, `postal_address` |
| `@USER@` `@USERLOC@` | the caller's name, where they call from |
| `@CALLS@` `@POSTS@` `@LASTON@` `@SINCE@` | their calls, posts, last call, when they joined |
| `@NEWMAIL@` | their unread mail |
| `@NODE@` `@VIA@` `@BAUD@` | this call: node, how (telnet, modem, tn3270), a modem's rate |
| `@ONLINE@` | callers on now |
| `@PHONE@` `@ADDRESSES@` `@POSTAL@` | how to contact it: `phone`, `addresses`, `postal_address` of `[general]` |
| `@USER@` `@USERLOC@` | the name and the location of the caller |
| `@CALLS@` `@POSTS@` `@LASTON@` `@SINCE@` | the calls, posts, last call and join date of the caller |
| `@NEWMAIL@` | the unread mail of the caller |
| `@NODE@` `@VIA@` `@BAUD@` | this call: node, route (telnet, modem, tn3270), the rate of a modem |
| `@ONLINE@` | the callers that are on now |
| `@DATE@` `@TIME@` | now |
| `@CLS@` | clear the screen |
| `@PAUSE@` | wait for a key (on a 3270, a new page) |
| `@CLS@` | clears the screen |
| `@PAUSE@` | waits for a key (on a 3270, a new page) |
`@CODE:20@` pads or cuts the value to 20 characters, and `@CODE:-20@`
aligns it to the right, so art keeps its shape whatever the length of a
name. Anything else between two @ signs (such as an email address) is left
as it is. Values are cleaned like anything a caller writes, so no escape
sequences can get into art through a user's name.
`@CODE:20@` pads or cuts the value to 20 characters. `@CODE:-20@` aligns
it to the right. Thus, art keeps its shape for all lengths of a name.
The BBS does not change other text between two @ signs (for example, an
email address). The BBS cleans values as it cleans all text from
callers. Thus, no escape sequences can get into art through the name of
a user.
### Tags
Text screens (`.asc`, `.txt`), the [strings](#strings), and a
[menu's](#menus) title, labels and prompt can hold tags in braces. Tags
are shortcuts for ANSI escape sequences, like the tags `.3270` files use
for a 3270's colours.
Text screens (`.asc`, `.txt`), the [strings](#strings), and the title,
labels and prompt of a [menu](#menus) can contain tags in braces. Tags
are shortcuts for ANSI escape sequences, similar to the tags that
`.3270` files use for the colours of a 3270.
```
{clear}{cyan}{bright}*** @BBS@ ***{reset}
@@ -89,42 +92,43 @@ for a 3270's colours.
| Tag | What it does |
|---|---|
| `{clear}` `{cls}` | clear the screen (as `@CLS@`) |
| `{pause}` | wait for a key (as `@PAUSE@`; in a string, dropped) |
| `{home}` `{eol}` | the cursor to the top left; clear to the end of the line |
| `{black}` `{red}` `{green}` `{yellow}` `{blue}` `{magenta}` `{cyan}` `{white}` | the colour of the letters (`{pink}` and `{turquoise}`, the 3270's names, are magenta and cyan) |
| `{on black}` ... `{on white}` | the colour behind them |
| `{bright}` `{bold}` / `{normal}` | bright, or not |
| `{clear}` `{cls}` | clears the screen (as `@CLS@`) |
| `{pause}` | waits for a key (as `@PAUSE@`. In a string, the BBS removes it) |
| `{home}` `{eol}` | moves the cursor to the top left. Clears to the end of the line |
| `{black}` `{red}` `{green}` `{yellow}` `{blue}` `{magenta}` `{cyan}` `{white}` | the colour of the letters (`{pink}` and `{turquoise}`, the names of the 3270, are magenta and cyan) |
| `{on black}` ... `{on white}` | the colour behind the letters |
| `{bright}` `{bold}` / `{normal}` | bright, or not bright |
| `{blink}` `{underline}` `{reverse}` | |
| `{default}` `{reset}` | plain again |
Each terminal gets what it can show:
Each terminal gets the items that it can show:
- an ANSI terminal gets the escape sequences;
- a terminal without colour (`Mono`) gets bright, underline and the like,
but no colours;
- a Commodore gets its own colours (but no backgrounds, blink or
underline);
- a VT52 gets the clears and cursor moves;
- a plain terminal gets nothing (a `{clear}` becomes a new line).
- An ANSI terminal gets the escape sequences.
- A terminal without colour (`Mono`) gets bright, underline and similar
items, but no colours.
- A Commodore gets its own colours (but no backgrounds, blink or
underline).
- A VT52 gets the clears and cursor movements.
- A plain terminal gets nothing (a `{clear}` becomes a new line).
A screen always ends plain, whatever its last colour. On a 3270, a text
screen keeps its colours (each change takes a column, as explained below)
and the other tags are dropped. A menu's labels show their colours the
same way, while its title and prompt are plain. Where tags cannot be shown
at all (on a RIP terminal's buttons, or a menu's title in Who's online),
they are dropped too. A menu label stays in its column whatever its tags,
and ends plain. In a text screen, a line holding only `{clear}` or
`{pause}` (or `@CLS@` or `@PAUSE@`) leaves no blank line behind.
A screen always ends plain, for all values of its last colour. On a
3270, a text screen keeps its colours (each change uses a column, as the
text below tells), and the BBS removes the other tags. The labels of a
menu show their colours in the same way, but its title and prompt are
plain. Where the BBS cannot show tags (on the buttons of a RIP terminal,
or the title of a menu in Who's online), it also removes them. A menu
label stays in its column for all tags, and ends plain. In a text
screen, a line that contains only `{clear}` or `{pause}` (or `@CLS@` or
`@PAUSE@`) does not leave a blank line.
Tags work only in the sysop's text: a caller who names themselves
`{red}bob` is shown as `{red}bob`. ANSI art (`.ans`) keeps its braces
Tags operate only in the text of the sysop. If a caller uses the name
`{red}bob`, the BBS shows `{red}bob`. ANSI art (`.ans`) keeps its braces
as they are, because it has its own escape sequences.
### 3270 screens
A `.3270` file is lines of text with tags that change the colour for the
rest of the line:
A `.3270` file is lines of text with tags. A tag changes the colour for
the remainder of the line:
```
{turquoise}{bright}*** @BBS@ ***
@@ -132,16 +136,17 @@ rest of the line:
```
The tags are `{blue}` `{red}` `{pink}` `{green}` `{turquoise}` `{yellow}`
`{white}` `{default}`, `{bright}` and `{normal}`, plus `{clear}` and
`{pause}` for a new page. The text terminals' names (`{magenta}`, `{cyan}`,
`{reset}`) work too. On a 3270, each change of colour takes up a blank
column, because that is where the 3270 keeps the field's attribute byte.
`{white}` `{default}`, `{bright}` and `{normal}`, and also `{clear}` and
`{pause}` for a new page. The names of the text terminals (`{magenta}`,
`{cyan}`, `{reset}`) also operate. On a 3270, each change of colour uses
a blank column, because the 3270 keeps the attribute byte of the field
there.
## Menus
Each `[menu NAME]` section makes a menu. `[menu main]` replaces the
built-in main menu on text terminals and 3270s alike, and the other menus
are reached from it and from each other.
built-in main menu on text terminals and on 3270s. Users get to the
other menus from the main menu and from each other.
```
[menu main]
@@ -164,28 +169,30 @@ z = back Back
```
Each item is `KEY = ACTION Label`. The key is one character (not `;` or
`#`, which begin comments), and the action is what the item does:
`#`, which start comments). The action is what the item does:
| Action | What it does |
|---|---|
| `areas` `mail` `who` `users` `profile` `info` `files` `boards` `doors` `chat` `page` `callers` `feedback` `qwk` `sysop` | the built-in parts (`callers`: the last callers; `feedback`: mail to the sysop; `qwk`: [offline mail](Offline-Mail); `boards`: the [image boards](Image-Boards); `sysop`: the [sysop tools](Sysop-Tools), for sysops) |
| `terminal` | a 3270's terminal details |
| `logoff` | log off (asking first on a text terminal) |
| `back` | back to the menu before |
| `door:NAME` | straight into a door |
| `menu:NAME` | another menu |
| `screen:NAME` | show a screen |
| `area:NAME` | straight into a message area |
| `script:NAME` | run a script of `scripts_dir` ([Scripting](Scripting)) |
| `areas` `mail` `who` `users` `profile` `info` `files` `boards` `doors` `chat` `page` `callers` `feedback` `qwk` `sysop` | the built-in parts (`callers`: the last callers. `feedback`: mail to the sysop. `qwk`: [offline mail](Offline-Mail). `boards`: the [image boards](Image-Boards). `sysop`: the [sysop tools](Sysop-Tools), for sysops) |
| `terminal` | the terminal details of a 3270 |
| `logoff` | logs out (on a text terminal, it asks first) |
| `back` | goes back to the previous menu |
| `door:NAME` | goes directly into a door |
| `menu:NAME` | goes to a different menu |
| `screen:NAME` | shows a screen |
| `area:NAME` | goes directly into a message area |
| `script:NAME` | runs a script of `scripts_dir` ([Scripting](Scripting)) |
With `screen =`, a text terminal sees the screen, which shows the keys
itself. A 3270 sees the screen's `.3270` (or `.asc` or `.txt`) version if
there is one, or otherwise the list of items in a box, so a menu drawn
only as ANSI art still works on a 3270. On a 3270 the caller types the key
in the option field, and PF3 goes back (on the main menu, it logs off if
there is a `logoff` item). Doors are for text terminals only; on a 3270, a
door item says so. `bbs check` refuses a menu that names a menu, door or
screen that does not exist, and lists the menus it read.
With `screen =`, a text terminal shows the screen, which shows the keys
itself. A 3270 shows the `.3270` (or `.asc` or `.txt`) version of the
screen if there is one. If not, it shows the list of items in a box.
Thus, a menu that is drawn only as ANSI art still operates on a 3270.
On a 3270, the caller types the key in the option field. PF3 goes back
(on the main menu, it logs out if there is a `logoff` item). Doors are
only for text terminals. On a 3270, a door item tells this. `bbs check`
refuses a menu that names a menu, door or screen that does not exist. It
lists the menus that it read.
## Strings
@@ -200,9 +207,9 @@ logoff_confirm = "Leaving so soon, @USER@?"
welcome = "Hi @USER@, @NEWMAIL@ new letters."
```
Each string can hold @-codes and [tags](#tags). Put a value in quotes to
keep spaces at its end. `welcome` is also the greeting on the 3270 main
menu (shown there without its tags).
Each string can contain @-codes and [tags](#tags). To keep spaces at the
end of a value, put the value in quotes. `welcome` is also the greeting
on the 3270 main menu (there, without its tags).
```
command_prompt = "{yellow}@USER@{default} @ {cyan}@BBS@{default} > "
+137 -124
View File
@@ -1,7 +1,7 @@
The BBS can be a DNS server for its callers, dial-up users above all. It
answers the names of the old services' servers with the BBS's own
address, so the clients of the time find the BBS without any hosts file
or registry edits:
The BBS can be a DNS server for its callers, mainly for dial-up users. It
answers the names of the servers of the old services with the address of
the BBS. Thus, the clients of that time find the BBS with no hosts file
and no registry changes:
| Front end | Names answered |
|---|---|
@@ -12,9 +12,9 @@ or registry edits:
| [Yahoo! Messenger](Yahoo-Messenger) (`[ymsg]`) | `scs.msg.yahoo.com`, `scsa`/`scsb`/`scsc.msg.yahoo.com`, `cs.yahoo.com`, `vcs1`/`vcs2.msg.yahoo.com`, `insider.msg.yahoo.com`, `relay.msg.yahoo.com`, `relay.yahoo.com`, `filetransfer.msg.yahoo.com`, `login.yahoo.com` |
| [CompuServe](CompuServe) (a listener with `frontend = compuserve`) | `compuserve.com`, `cis.compuserve.com` |
Every other name is resolved: the BBS asks the host's DNS servers, or a
primary and backup server of the sysop's, and keeps each answer for as
long as its TTL says.
The BBS resolves all other names. It asks the DNS servers of the host,
or a primary and backup server that the sysop sets. It keeps each answer
for the time that its TTL gives.
```ini
[dns]
@@ -26,72 +26,76 @@ backup = 8.8.8.8
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:53` | where to listen, UDP and TCP |
| `primary`, `backup` | the host's | the servers other names are asked of, by IP address (`:port` if not 53); the backup is asked when the primary fails |
| `answer` | the BBS's address as the caller reaches it | the IPv4 address the services' names are given |
| `answer6` | likewise, for a caller that came by IPv6 | the IPv6 address they are given |
| `msn_answer`, `ymsg_answer`, `oscar_answer`, `aol_answer`, `marvel_answer`, `compuserve_answer` | the IP the service's HTTPS (TLS) server or port is given, when it has one of its own | that service's own address (an IPv4 and an IPv6 one at most), given for its names instead of `answer` |
| `services` | `auto` | whose names: `auto` (the front ends set up here), `none`, or some of `msn`, `marvel`, `oscar`, `aol`, `ymsg`, `compuserve` |
| `names` | none | more names answered with the BBS's address; `*.example.org` is every name under it |
| `allow` | this machine and private networks | the networks that may resolve other names |
| `cache_size` | `10000` | answers kept (0: none) |
| `max_ttl` | `86400` | the longest an answer is kept, in seconds |
| `negative_ttl` | `300` | the longest a "no such name" is kept |
| `ttl` | `60` | the TTL given with the services' names |
| `timeout` | `2` | seconds for a server to answer before the next is asked |
| `rate`, `burst` | `50`, `200` | UDP queries a second one address may make (0: no limit), and at once |
| `address` | `:53` | the address on which to listen, UDP and TCP |
| `primary`, `backup` | those of the host | the servers that the BBS asks for other names, by IP address (`:port` if not 53). The BBS asks the backup when the primary fails |
| `answer` | the address of the BBS at which the caller connects | the IPv4 address that the BBS gives for the names of the services |
| `answer6` | the same, for a caller that came by IPv6 | the IPv6 address that the BBS gives |
| `msn_answer`, `ymsg_answer`, `oscar_answer`, `aol_answer`, `marvel_answer`, `compuserve_answer` | the IP of the HTTPS (TLS) server or port of the service, if it has its own IP | the address of that service (a maximum of one IPv4 and one IPv6 address), which the BBS gives for its names in place of `answer` |
| `services` | `auto` | the services whose names the BBS answers: `auto` (the front ends configured here), `none`, or some of `msn`, `marvel`, `oscar`, `aol`, `ymsg`, `compuserve` |
| `names` | none | more names to answer with the address of the BBS. `*.example.org` is all names under it |
| `allow` | this machine and private networks | the networks that can resolve other names |
| `cache_size` | `10000` | the number of answers kept (0: none) |
| `max_ttl` | `86400` | the maximum time to keep an answer, in seconds |
| `negative_ttl` | `300` | the maximum time to keep a "no such name" |
| `ttl` | `60` | the TTL given with the names of the services |
| `timeout` | `2` | seconds for a server to answer before the BBS asks the next server |
| `rate`, `burst` | `50`, `200` | the UDP queries that one address can make each second (0: no limit), and at one time |
## Dial-up users
A PPP link gives the caller a DNS server. With pppd (D-Modem's `[ppp]`
profile), `ms-dns` names it; give it the BBS's address on the PPP side,
as D-Modem's `dmodem.conf.sample` does:
A PPP link gives the caller a DNS server. With pppd (the `[ppp]` profile
of D-Modem), `ms-dns` names it. Give it the address of the BBS on the PPP
side, as the `dmodem.conf.sample` of D-Modem does:
```
command = exec /usr/sbin/pppd nodetach noauth local lock passive 192.168.77.1:192.168.77.2 ms-dns 192.168.77.1
```
With the BBS on the same machine, the PPP side's address (192.168.77.1)
is the machine's own while a call is up, and `address = :53` answers it.
If the BBS is on the same machine, the address of the PPP side
(192.168.77.1) is the address of the machine while a call is up. Thus,
`address = :53` answers it.
Windows 95 to XP's Dial-Up Networking takes the server the link gives
when "Server assigned name server addresses" is on (the default). The
caller's machine then sends MSN Messenger, AIM, Yahoo! Messenger and the
rest to the BBS, and everything else to the internet as usual.
The Dial-Up Networking of Windows 95 to XP uses the server that the link
gives when "Server assigned name server addresses" is on (the default).
Then the machine of the caller sends MSN Messenger, AIM, Yahoo! Messenger
and the other services to the BBS. It sends all other traffic to the
internet as usual.
By default the services' names are answered with the address the caller
reached the DNS server at, so a dial-up user is given the PPP side's
address and a LAN user the LAN's. Set `answer` when that is not the one
to give (behind NAT, a public address).
By default, the BBS answers the names of the services with the address
at which the caller connected to the DNS server. Thus, a dial-up user
gets the address of the PPP side, and a LAN user gets the address of the
LAN. If that address is not the correct one (behind NAT, a public
address), set `answer`.
## Where the clients come
The clients come to the old services' ports, so each front end must be
on its service's port:
The clients come to the ports of the old services. Thus, each front end
must be on the port of its service:
| Front end | Ports |
|---|---|
| `[msn]` | `address` 1863; `https_address` 443 (Passport, for MSN 5.0 to 7.5) |
| `[ymsg]` | `address` 5050; `http_address` 80; `https_address` 443 (Y!M 9's login) |
| `[oscar]`, `[aol]` | `address` 5190 (they share it); `tls_address` 443 (AIM 6.2 and later, clientLogin) |
| `[msn]` | `address` 1863. `https_address` 443 (Passport, for MSN 5.0 to 7.5) |
| `[ymsg]` | `address` 5050. `http_address` 80. `https_address` 443 (the login of Y!M 9) |
| `[oscar]`, `[aol]` | `address` 5190 (they share it). `tls_address` 443 (AIM 6.2 and later, clientLogin) |
| `[marvel]` | `address` 569 |
| CompuServe | a listener with `frontend = compuserve` on 23 (terminals); CIM's `HostIPAddress` names the host, its port the connector's |
| CompuServe | a listener with `frontend = compuserve` on 23 (terminals). The `HostIPAddress` of CIM names the host, and its port is the port of the connector |
`bbs check` warns of a front end elsewhere. Ports under 1024 (53, 80,
443, 569) need root: the BBS binds them all before it becomes
`[general]`'s user.
`bbs check` gives a warning about a front end on a different port. Ports
below 1024 (53, 80, 443, 569) must have root. The BBS binds all of them
before it becomes the user of `[general]`.
### Shared ports
MSN's Passport, Yahoo!'s login and AIM's TLS logins all want port 443,
and Yahoo!'s web half wants 80. When two or more front ends are given the
same address, they share it: the BBS takes the connections there and
hands each to its front end by the name the client asked for, its TLS
server name (SNI) and then its HTTP `Host`. A client that was given the
BBS's address rather than a name is told apart by the path it asks for
(`/RST.srf` is MSN's, `/config/pwtoken_get` Yahoo!'s, `/auth/clientLogin`
AIM's). A TLS connection that is not HTTP (OSCAR over TLS, AIM 6.2's SSL
2.0-format hello) goes to AIM.
The Passport of MSN, the login of Yahoo! and the TLS logins of AIM all
use port 443. The web part of Yahoo! uses 80. If you give the same
address to two or more front ends, they share it. The BBS accepts the
connections there. It gives each connection to its front end by the name
that the client asked for: first its TLS server name (SNI), then its
HTTP `Host`. If a client got the address of the BBS and not a name, the
BBS uses the path that it asks for (`/RST.srf` is for MSN,
`/config/pwtoken_get` for Yahoo!, `/auth/clientLogin` for AIM). A TLS
connection that is not HTTP (OSCAR over TLS, the SSL 2.0-format hello of
AIM 6.2) goes to AIM.
```ini
[msn]
@@ -111,16 +115,17 @@ tls_cert = /etc/bbs/legacy.crt
tls_key = /etc/bbs/legacy.key
```
The BBS can sign these certificates itself, with a certificate authority
of its own and a package that installs it on callers' machines: see
[Certificates](Certificates#the-bbss-own-certificate-authority)
The BBS can sign these certificates itself, with its own certificate
authority and a package that installs it on the machines of callers.
Refer to [Certificates](Certificates#the-bbss-own-certificate-authority)
(`tls_cert = ca`).
Windows XP's clients send no server name, so a TLS client there gets the
first front end's certificate (MSN's, then Yahoo!'s, then AIM's). Give
the front ends one certificate with all their names, an RSA one (AIM 6.2
to 7.5 take only RSA), from a small certificate authority of your own
that the callers' machines trust:
The clients of Windows XP send no server name. Thus, a TLS client there
gets the certificate of the first front end (MSN, then Yahoo!, then
AIM). Give the front ends one certificate with all their names. It must
be an RSA certificate (AIM 6.2 to 7.5 accept only RSA), from a small
certificate authority of your own that the machines of the callers
trust:
```sh
openssl req -x509 -newkey rsa:2048 -nodes -days 3650 -keyout ca.key \
@@ -135,17 +140,17 @@ openssl x509 -req -in legacy.csr -CA ca.crt -CAkey ca.key -CAcreateserial \
-days 3650 -sha256 -extfile san.txt -out legacy.crt
```
`bbs check` warns when front ends sharing a TLS port have certificates
of their own. A port that is TLS for one front end and plain for another
can't be shared, and is refused.
`bbs check` gives a warning when front ends that share a TLS port have
different certificates. Front ends cannot share a port that is TLS for
one front end and plain for a different one. The BBS refuses this.
### An IP for each HTTPS service
When each service needs a self-signed certificate of its own (an old
client that checks only the certificate's common name, not a SAN list),
give each its own IP instead of sharing one. Put the addresses on the
BBS machine (a dummy interface, or more addresses on the LAN one), and
give each front end's HTTPS server one:
If each service must have its own self-signed certificate (an old client
that checks only the common name of the certificate, not a SAN list),
give each service its own IP. Do not share one IP. Put the addresses on
the BBS machine (a dummy interface, or more addresses on the LAN
interface). Give one to the HTTPS server of each front end:
```ini
[msn]
@@ -170,29 +175,32 @@ tls_key = /etc/bbs/aim.key
[dns]
```
`[dns]` then gives each service's names its own address (MSN's names
192.168.77.11, Yahoo!'s 192.168.77.12, AIM's 192.168.77.13), with no
more settings: a front end's HTTPS (or TLS) address, when it names an IP,
is the one its names get. `msn_answer` and the like set it otherwise (an
address behind NAT, say). Keep the plain ports (`address`, `http_address`)
on every address, as above, so a client reaches them at the service's IP
too. Dial-up callers reach the extra addresses through the BBS machine,
which is their PPP link's far end.
Then `[dns]` gives the names of each service its own address (the names
of MSN get 192.168.77.11, those of Yahoo! get 192.168.77.12, those of AIM
get 192.168.77.13), with no more settings. If the HTTPS (or TLS) address
of a front end names an IP, its names get that IP. `msn_answer` and the
similar settings set a different value (for example, an address behind
NAT). Keep the plain ports (`address`, `http_address`) on all addresses,
as above. Thus, a client also gets to them at the IP of the service.
Dial-up callers get to the extra addresses through the BBS machine,
which is the far end of their PPP link.
One port can't be both on every address and on an IP of its own: with
`https_address = 192.168.77.11:443` for one front end, give the others an
IP of their own too (not `:443`). `bbs check` refuses the mix, and the
configuration editor (`bbs config`, and the sysop's menu) won't take an
edit that makes it: the old value is put back and the reason shown. The
editor has the DNS server under Internet services, "DNS for callers".
One port cannot be on all addresses and also on its own IP. If one front
end has `https_address = 192.168.77.11:443`, give the other front ends
their own IP also (not `:443`). `bbs check` refuses the mix. The
configuration editor (`bbs config`, and the menu of the sysop) does not
accept an edit that makes it: it puts back the old value and shows the
reason. The editor has the DNS server under Internet services, "DNS for
callers".
## Records of your own
A `[dnsrecord NAME]` section is one DNS record, answered as written. These
records are answered to anyone, before the services' names, and nothing
about the name is asked upstream. Use them for a machine on your network,
a game server, or a mail server for your dial-up users. Give a name more
than one section for more than one record:
A `[dnsrecord NAME]` section is one DNS record. The BBS answers it as you
write it. The BBS gives these records to all users, before the names of
the services. It does not ask upstream servers about the name. Use them
for a machine on your network, a game server, or a mail server for your
dial-up users. For more than one record, give a name more than one
section:
```ini
[dnsrecord games.bbs.example.org]
@@ -216,54 +224,59 @@ ttl = 300
| key | what it is |
|---|---|
| `name` | the name (default: the section's NAME); `*.domain` is every name under it |
| `type` | A, AAAA, CNAME, TXT, MX, SRV, NS, PTR, CAA, or any other type (default: A or AAAA, from the value's address) |
| `value` | as a zone file writes it: an address, a CNAME's target, a TXT's text, an MX's preference and host, an SRV's priority, weight, port and host |
| `name` | the name (default: the NAME of the section). `*.domain` is all names under it |
| `type` | A, AAAA, CNAME, TXT, MX, SRV, NS, PTR, CAA, or a different type (default: A or AAAA, from the address in the value) |
| `value` | as a zone file writes it: an address, the target of a CNAME, the text of a TXT, the preference and host of an MX, the priority, weight, port and host of an SRV |
| `ttl` | seconds (default: `[dns]` `ttl`) |
Reverse lookups work too. Each A or AAAA record's address answers a PTR
query (`20.77.168.192.in-addr.arpa`, or its `ip6.arpa` name) with the
record's name, so `192.168.77.20` gives back `games.bbs.example.org`.
Wildcards don't make PTRs. To give an address another name, write its PTR
yourself (`name = 20.77.168.192.in-addr.arpa`, `type = PTR`,
`value = arcade.bbs.example.org`). Your own PTR replaces the automatic one.
Reverse lookups also operate. The address of each A or AAAA record
answers a PTR query (`20.77.168.192.in-addr.arpa`, or its `ip6.arpa`
name) with the name of the record. Thus, `192.168.77.20` gives back
`games.bbs.example.org`. Wildcards do not make PTRs. To give an address
a different name, write its PTR yourself
(`name = 20.77.168.192.in-addr.arpa`, `type = PTR`,
`value = arcade.bbs.example.org`). Your own PTR replaces the automatic
PTR.
A query for a type the name has no record of gets an empty answer, and is
not asked upstream. A CNAME is followed to its target when the target has
records here too. A record for one of the old services' names takes the
place of the BBS's answer for that type; the other types still get the
BBS's answer. `bbs check` refuses a record it cannot read. In the
configuration screens these records are under Internet services, DNS for
callers, DNS records, with the type picked from a list and an address
picked from this machine's.
A query for a type for which the name has no record gets an empty
answer. The BBS does not ask upstream servers about it. The BBS follows a
CNAME to its target when the target also has records here. A record for
one of the names of the old services replaces the answer of the BBS for
that type. The other types still get the answer of the BBS. `bbs check`
refuses a record that it cannot read. In the configuration screens,
these records are under Internet services, DNS for callers, DNS
records. You select the type from a list, and an address from the
addresses of this machine.
## Who may use it
The services' names are answered to anyone who asks. Other names are
resolved only for `allow`'s networks (by default this machine and the
private ranges, 10/8, 172.16/12, 192.168/16, 100.64/10 and their IPv6
kin), so the BBS is not an open resolver for the internet; others are
refused. Each address may send `rate` queries a second by UDP.
The BBS answers the names of the services to all users who ask. It
resolves other names only for the networks of `allow`. By default, these
are this machine and the private ranges, 10/8, 172.16/12, 192.168/16,
100.64/10 and the equivalent IPv6 ranges. Thus, the BBS is not an open
resolver for the internet. It refuses other users. Each address can send
`rate` queries each second by UDP.
## Running beside the system's resolver
The BBS reads the host's servers from `/etc/resolv.conf` (again when it
changes). When that lists only systemd-resolved's stub (127.0.0.53), the
servers resolved follows itself are read instead, from
`/run/systemd/resolve/resolv.conf`. The BBS never asks itself: an
address that is its own is left out.
The BBS reads the servers of the host from `/etc/resolv.conf` (again
when it changes). If that file lists only the stub of systemd-resolved
(127.0.0.53), the BBS reads the servers that resolved follows, from
`/run/systemd/resolve/resolv.conf`. The BBS never asks itself: it
ignores addresses that are its own.
systemd-resolved listens on 127.0.0.53:53, so `address = :53` may be
refused. Give `address` the address dial-up users reach, the PPP side's
(`192.168.77.1:53`), or turn off resolved's stub listener
(`DNSStubListener=no` in `/etc/systemd/resolved.conf`).
systemd-resolved listens on 127.0.0.53:53. Thus, the system can refuse
`address = :53`. Give `address` the address at which dial-up users
connect, the address of the PPP side (`192.168.77.1:53`). Or disable the
stub listener of resolved (`DNSStubListener=no` in
`/etc/systemd/resolved.conf`).
## What is not done
- No DNSSEC checking of its own: answers are passed on as the upstream
servers give them (the DO and CD bits are kept, and kept apart in the
cache).
- Only A and AAAA records are given for the services' names; any other
type (HTTPS, MX ...) is answered with none.
- None of this has been tried with the real clients on a dial-up line
- The BBS does no DNSSEC checks of its own. It passes on answers as the
upstream servers give them (it keeps the DO and CD bits, and keeps them
separate in the cache).
- The BBS gives only A and AAAA records for the names of the services.
It answers all other types (HTTPS, MX ...) with no records.
- We did not try any of this with the real clients on a dial-up line
yet.
+54 -50
View File
@@ -1,15 +1,16 @@
The BBS keeps its users, messages, mail, file records, FidoNet and news
state, tokens and keys in one database. It can be:
The BBS keeps these items in one database: its users, messages, mail,
file records, the state of FidoNet and news, tokens and keys. The
database can be:
- **SQLite**, the default: one file, with nothing else to run
- **PostgreSQL** 12 or later
- **MySQL** 8.0 or later
- **MariaDB** 10.11 or later (10.6 works with one difference, described
below)
- **SQLite**, the default: one file, with no other program to run.
- **PostgreSQL** 12 or later.
- **MySQL** 8.0 or later.
- **MariaDB** 10.11 or later (10.6 also operates, with one difference.
Refer to the text below).
The files in the file areas are always kept on disk (in `files_dir`), not
in the database. The BBS is tested with PostgreSQL 16, MySQL 8.4, and
MariaDB 11.4, 10.11 and 10.6.
The BBS always keeps the files of the file areas on disk (in
`files_dir`), not in the database. We test the BBS with PostgreSQL 16,
MySQL 8.4, and MariaDB 11.4, 10.11 and 10.6.
```ini
[general]
@@ -21,44 +22,46 @@ database = /var/lib/bbs/bbs.db ; SQLite
| `database` | Engine |
|---|---|
| a path (or `sqlite:PATH`) | SQLite: the file is made (0600) if it is not there |
| `postgres://` or `postgresql://` | PostgreSQL, in pgx's form: `?sslmode=require`, `?search_path=bbs` and the like after it |
| `mysql://user:password@host:port/db` | MySQL; `?tls=true` and go-sql-driver's other options after it |
| `mariadb://...`, `mariadb:DSN` | MariaDB, the same way (the BBS finds MariaDB behind a `mysql://` too) |
| `mysql:DSN` | MySQL in go-sql-driver's own form, for a unix socket: `mysql:bbs:PASSWORD@unix(/run/mysqld/mysqld.sock)/bbs` |
| a path (or `sqlite:PATH`) | SQLite. If the file is not there, the BBS makes it (0600) |
| `postgres://` or `postgresql://` | PostgreSQL, in the form of pgx. Put `?sslmode=require`, `?search_path=bbs` and other options after it |
| `mysql://user:password@host:port/db` | MySQL. Put `?tls=true` and the other options of go-sql-driver after it |
| `mariadb://...`, `mariadb:DSN` | MariaDB, in the same way (the BBS also finds MariaDB behind a `mysql://`) |
| `mysql:DSN` | MySQL in the form of go-sql-driver, for a unix socket: `mysql:bbs:PASSWORD@unix(/run/mysqld/mysqld.sock)/bbs` |
The BBS creates its tables when it starts, or with `bbs init`, and adds
any columns that later versions bring. On PostgreSQL, MySQL and MariaDB the
database itself must already exist, and the BBS's user must own it or have
`CREATE` in it. On PostgreSQL the BBS also creates a collation, `nocase`,
so that names match in any case.
The BBS creates its tables when it starts, or with `bbs init`. It adds
the columns of later versions. On PostgreSQL, MySQL and MariaDB, the
database must already exist. The user of the BBS must own it or have
`CREATE` in it. On PostgreSQL, the BBS also creates a collation,
`nocase`. Thus, names match with upper or lower case.
Logs and `bbs check` show the address with its password replaced by
`xxxxx`. The configuration file holds the password in the clear, so keep
the file at mode 0640, owned by the BBS's group.
Logs and `bbs check` show the address, with `xxxxx` in place of the
password. The configuration file contains the password in clear text.
Thus, keep the file at mode 0640, with the group of the BBS as the owner.
## What differs
Very little, by design. The BBS writes its SQL once, and each engine gets
its own form of the parts that differ (ids, placeholders, upserts,
booleans, and what counts as a duplicate).
The differences are very small, by design. The BBS has one version of
its SQL. Each engine gets its own form of the parts that are different
(ids, placeholders, upserts, booleans, and the rules for duplicates).
- **Names** (users, areas, files) match in any case on all three; letters
with accents are not their plain letters (René is not Rene). SQLite
folds the case of ASCII letters only: `RENÉ` finds René on PostgreSQL
and MySQL, not on SQLite.
- **Names** (users, areas, files) match with upper or lower case on all
three engines. Letters with accents are not the same as their plain
letters (René is not Rene). SQLite folds the case of ASCII letters
only: `RENÉ` finds René on PostgreSQL and MySQL, but not on SQLite.
- **MySQL** keeps names, Message-IDs and other indexed text in
`VARCHAR(255)`, descriptions and the like in `VARCHAR(1024)`, messages
in `MEDIUMTEXT` (16 MB). The BBS's connection sets the SQL mode it
needs (`ANSI_QUOTES`, strict), whatever the server's default.
- **MariaDB** is a MySQL to the BBS, but for its collations, which the
BBS chooses when it connects: UCA 14.0's (`utf8mb4_uca1400_as_ci`,
10.10 and later), which match names as MySQL's do. MariaDB 10.6 (out of
support since July 2026) has no collation that ignores case but not
accents: there names ignore both (René *is* Rene, and only one of them
can be a user). `bbs check` and the log say which.
- **SQLite** uses one connection (it takes one writer at a time); the
servers up to ten.
`VARCHAR(255)`, descriptions and similar text in `VARCHAR(1024)`, and
messages in `MEDIUMTEXT` (16 MB). The connection of the BBS sets the
necessary SQL mode (`ANSI_QUOTES`, strict). It does not use the default
of the server.
- **MariaDB** is the same as MySQL for the BBS, but its collations are
different. The BBS selects the collation when it connects: the
collations of UCA 14.0 (`utf8mb4_uca1400_as_ci`, 10.10 and later).
These match names as MySQL does. MariaDB 10.6 (out of support since
July 2026) has no collation that ignores case but not accents. On 10.6,
names ignore both (René *is* Rene, and only one of them can be a
user). `bbs check` and the log tell you which collation the BBS uses.
- **SQLite** uses one connection (it accepts one writer at a time). The
servers use up to ten.
## Moving to another engine
@@ -66,17 +69,18 @@ booleans, and what counts as a duplicate).
bbs db copy postgres://bbs:PASSWORD@db.example.org/bbs
```
This copies every table of the configured database into a new, empty one
(set up as `bbs init` would), keeping the ids. When it is done, set
`database =` to the new one. Stop the BBS while it copies. It works in any
direction: SQLite to PostgreSQL, MySQL to SQLite, PostgreSQL to MySQL, and
so on.
This command copies all tables of the configured database into a new,
empty database (prepared as `bbs init` does). It keeps the ids. When the
copy is complete, set `database =` to the new database. Stop the BBS
while it copies. The copy operates in all directions: SQLite to
PostgreSQL, MySQL to SQLite, PostgreSQL to MySQL, and other directions.
## Backups
`bbs backup` (or a daily backup set with `[backup]`'s `at`) copies the
whole database while callers are on, along with the configuration and the
files: see [Backups](Backups). A database server's own tools work as well,
such as `pg_dump` or `mysqldump --single-transaction`.
`bbs backup` (or a daily backup that you set with `at` in `[backup]`)
copies the full database while callers are on. It also copies the
configuration and the files. Refer to [Backups](Backups). The tools of a
database server also operate, for example `pg_dump` or
`mysqldump --single-transaction`.
**See also:** [Configuration](Configuration), [Running](Running), [Development](Development)
+275 -219
View File
@@ -1,92 +1,98 @@
This page is for people working on the BBS's code: how the source is laid
out, how the screens are shared between terminals, and what the tests
cover.
This page is for persons who work on the code of the BBS. It gives the
layout of the source, how the terminals share the screens, and what the
tests cover.
## Layout
| Path | What it holds |
|---|---|
| `cmd/bbs` | the command: serve, check, init, user and area administration |
| `internal/server` | listeners, session headers, rlogin, SSH, telling 3270s from the rest |
| `internal/server` | listeners, session headers, rlogin, SSH, identification of 3270s and other terminals |
| `internal/telnet` | the server side of telnet: options, terminal type, window size, the handoff to go3270 |
| `internal/confedit` | bbs.conf edited as a sysop would by hand, comments kept; the catalog of keys read from bbs.conf.sample (embedded by the root package), and which take effect at a reload |
| `internal/sockets` | ports bound as root and handed down: the BBS becomes its user, the same process |
| `internal/backup` | backups: the configuration, a database snapshot and the files in one tar.gz; listing, pruning, restoring |
| `internal/confui` | the configuration menus (sheets of internal/view), for `bbs config` and the sysop's tools: changes held until saved |
| `internal/view` | what the screens show, described once: menus, tables, messages, forms, panels, drafts |
| `internal/script` | the sysop's JavaScript (goja): screens of internal/view, the BBS as the caller, data kept, the time a script may compute |
| `internal/confedit` | edits bbs.conf as a sysop does by hand, and keeps the comments; the catalog of keys read from bbs.conf.sample (embedded by the root package), and the keys that a reload applies |
| `internal/sockets` | ports bound as root and given to the BBS: the BBS changes to its user, in the same process |
| `internal/backup` | backups: the configuration, a database snapshot and the files in one tar.gz; list, prune, restore |
| `internal/confui` | the configuration menus (sheets of internal/view), for `bbs config` and the sysop's tools: changes are kept until you save them |
| `internal/view` | the description of what the screens show, written one time: menus, tables, messages, forms, panels, drafts |
| `internal/script` | the sysop's JavaScript (goja): screens of internal/view, the BBS as the caller, kept data, the time limit for computation by a script |
| `internal/guard` | deny lists, bans, the name filter, the hack log |
| `internal/geoip` | country databases: MaxMind DB files and CSVs of ranges, read itself; a file kept up to date |
| `internal/phone` | caller IDs, by libphonenumber's numbering plans and places (and NANPA's area codes (generated by `internal/phone/gen`: `make phone-data`) |
| `internal/geoip` | country databases: MaxMind DB files and CSVs of ranges, with its own reader; a file that it keeps up to date |
| `internal/phone` | caller IDs, from the numbering plans and places of libphonenumber (and NANPA's area codes (generated by `internal/phone/gen`: `make phone-data`) |
| `internal/events` | the sysop's scheduled events |
| `internal/app` | the screens after the login, for every front end: menus, areas, mail, files, who's online, the profile, validation, paging the sysop |
| `internal/app` | the screens after the login, for all front ends: menus, areas, mail, files, who is online, the profile, validation, a page to the sysop |
| `internal/textui` | the text front end: the login, line editing, ANSI detection, paging, RIP menus; the screens as prompts and keys; chat, doors, transfers |
| `internal/ui3270` | the 3270 front end: the logon, the screens as fields and PF keys on go3270; chat, IND$FILE, its graphics |
| `internal/sixel` | the sixel encoder |
| `internal/petscii` | the Commodore's character set: translating ANSI and UTF-8 out, keys in |
| `internal/petscii` | the character set of the Commodore: translation of ANSI and UTF-8 output, and of keys input |
| `internal/rip` | RIPscrip: MegaNums, commands, menu scenes |
| `internal/vt` | terminal identification (DA1, DA2, XTVERSION, CTerm, answerback, VT52); DEC graphics and VT52 output |
| `internal/files` | file areas' storage: names, uploads, limits |
| `internal/files` | the storage of the file areas: names, uploads, limits |
| `internal/ftp` | the FTP server: the file areas as a file system |
| `internal/news` | articles: parsing, checking, making, decoding; wildmats |
| `internal/nntp` | the NNTP server and the peers' client |
| `internal/news` | articles: parse, check, make, decode; wildmats |
| `internal/nntp` | the NNTP server and the client for the peers |
| `internal/ircd` | the IRC server: channels as chat rooms; ergo's irc-go, numerics and ISUPPORT list |
| `internal/mrc` | Multi Relay Chat: the BBS as its own connector, MRC's rooms as chat rooms |
| `internal/qwknet` | a QWK network's node: calling the hub by FTP, REPs up, packets down |
| `internal/qwk` | QWK packets and REPs: MESSAGES.DAT's blocks, CONTROL.DAT, indexes (MBF floats), QWKE kludges, CP437 |
| `internal/ftn` | FidoNet's formats: addresses, Type 2+ packets, messages, kludges, character sets |
| `internal/qwknet` | the node of a QWK network: it calls the hub by FTP, sends REPs and receives packets |
| `internal/qwk` | QWK packets and REPs: the blocks of MESSAGES.DAT, CONTROL.DAT, indexes (MBF floats), QWKE kludges, CP437 |
| `internal/ftn` | the formats of FidoNet: addresses, Type 2+ packets, messages, kludges, character sets |
| `internal/fido` | the BBS on FidoNet: tosser, scanner, netmail, the binkp mailer |
| `internal/door` | doors: drop files, running a door on the caller's line |
| `doors/dosemu2` | the Docker image DOS doors run in: dosemu2, its FOSSIL on COM1 |
| `internal/door` | doors: drop files, a door that runs on the caller's line |
| `doors/dosemu2` | the Docker image in which DOS doors run: dosemu2, its FOSSIL on COM1 |
| `internal/finger` | the finger server |
| `internal/gopher` | the gopher server |
| `internal/gemini` | the Gemini server: gopher's capsule and finger's users, over TLS |
| `internal/forum` | the web forum: its pages (html/template; `themes/NAME/` a theme's own, over its parent's and `templates/`), the themes' CSS (`static/`), sessions by the API's tokens |
| `internal/gemini` | the Gemini server: the capsule of gopher and the users of finger, over TLS |
| `internal/forum` | the web forum: its pages (html/template; `themes/NAME/` holds the templates of one theme, which go over those of its parent and `templates/`), the CSS of the themes (`static/`), sessions by the tokens of the API |
| `internal/api` | the HTTP API: REST, server-sent events, WebSockets, metrics, OpenAPI; the web terminal page (`web/`: xterm.js, the page) |
| `proto` | the WebSocket protocol, `bbs.v1` (`make proto` regenerates `internal/api/pb`) |
| `internal/tcpserv` | what finger, gopher and Gemini share: limits, timeouts |
| `internal/screens` | the sysop's display files: finding them, @-codes, 3270 colour tags |
| `internal/xfer` | XMODEM, YMODEM, ZMODEM and Kermit, both ways |
| `proto` | the WebSocket protocol, `bbs.v1` (`make proto` generates `internal/api/pb` again) |
| `internal/tcpserv` | the parts that finger, gopher and Gemini share: limits, timeouts |
| `internal/screens` | the sysop's display files: how to find them, @-codes, 3270 color tags |
| `internal/xfer` | XMODEM, YMODEM, ZMODEM and Kermit, in the two directions |
| `internal/logo` | the logo: a PNG, or the name in a pixel font |
| `internal/bbs` | the BBS itself: nodes, logins, new users, posting, cleaning text |
| `internal/store` | the database: SQLite, PostgreSQL, MySQL or MariaDB (`dialect.go` what differs, `schema.go` the tables), copying between them |
| `internal/bbs` | the BBS: nodes, logins, new users, posts, text cleaning |
| `internal/store` | the database: SQLite, PostgreSQL, MySQL or MariaDB (`dialect.go` holds the differences, `schema.go` the tables), copies between them |
| `internal/config` | the configuration file |
## Screens
The screens after the login are written once, in `internal/app`, and
each front end draws them. A screen is a description in `internal/view`'s
terms. It is handed to the front end, which shows it, waits for the
caller, and reports what they chose:
The screens after the login are written one time, in `internal/app`. Each
front end draws them. A screen is a description in the terms of
`internal/view`. The BBS gives the screen to the front end. The front end
shows it, waits for the caller, and reports the selection of the caller:
| View | Text terminal | 3270 |
|---|---|---|
| `Menu` | `[K] Label` in two columns (one under 60 columns), RIP buttons, the command prompt | a box of keys, `Option ===>` |
| `Table` | numbered rows a page at a time; `Area number, [N]ew scan, [Q]uit: ` | `S` by a row; PF keys; PF7/PF8 |
| `Message` | headers, the body paged; `[N]ext, [R]eply, ...` | headers, the body scrolled; PF10/PF11, PF4 ... |
| `Form` | a question a field | one screen of fields |
| `Menu` | `[K] Label` in two columns (one column below 60 columns), RIP buttons, the command prompt | a box of keys, `Option ===>` |
| `Table` | numbered rows, one page at a time; `Area number, [N]ew scan, [Q]uit: ` | `S` adjacent to a row; PF keys; PF7/PF8 |
| `Message` | headers, the body in pages; `[N]ext, [R]eply, ...` | headers, the body with scroll; PF10/PF11, PF4 ... |
| `Form` | one question for each field | one screen of fields |
| `Panel` | lines, then `[L]ocation, [P]assword, ...` | lines, PF keys |
| `Draft` | `To`, `Subject`, the full-screen editor (ANSI) or the line editor | the editor screen |
| `Confirm`, `Say`, `Show` | `[Y/n]`, a line, lines and a pause | a Y/N field, the message line, a page |
An action has a key for text terminals and a PF key for 3270s (plus a
short label for the 3270's key line). Whatever only a front end can do is
in its `app.Frontend`: the sysop's display files, chat, doors (text only),
file transfers (protocols on text, IND$FILE on a 3270), the terminal line
in the profile and the settings that can be switched there, and the
goodbye. Logins stay with the front ends, because they decide what the
terminal is.
An action has a key for text terminals and a PF key for 3270s. It also
has a short label for the key line of the 3270. Functions that only one
front end can do are in its `app.Frontend`:
- The sysop's display files.
- Chat.
- Doors (text only).
- File transfers (protocols on text, IND$FILE on a 3270).
- The terminal line in the profile, and the settings that you can change
there.
- The goodbye.
The front ends keep the logins, because they identify the terminal.
To add a screen, write a function in `internal/app` that builds views. To
add a front end, implement `app.Frontend`. `internal/app`'s tests drive
the screens with a scripted front end, with no terminal at all.
add a front end, implement `app.Frontend`. The tests of `internal/app`
operate the screens with a scripted front end, without a terminal.
## Tests
With `BBS_TEST_DATABASE` set to a PostgreSQL, MySQL or MariaDB server,
each test gets a database of its own there (a schema on PostgreSQL, a
database on MySQL, dropped afterwards), so the whole suite runs on that
engine:
You can set `BBS_TEST_DATABASE` to a PostgreSQL, MySQL or MariaDB server.
Then each test gets its own database on that server (a schema on
PostgreSQL, a database on MySQL). The test drops it after it is complete.
Thus, the full suite runs on that engine:
```
BBS_TEST_DATABASE='postgres://bbs:PASSWORD@127.0.0.1/bbs?sslmode=disable' go test ./...
@@ -94,175 +100,225 @@ BBS_TEST_DATABASE='mysql://bbs:PASSWORD@127.0.0.1:3306/bbs' go test ./...
BBS_TEST_DATABASE='mariadb://bbs:PASSWORD@127.0.0.1:3306/bbs' go test ./...
```
The user must be allowed to `CREATE SCHEMA` (or `CREATE DATABASE`). The
store's own tests check the things the engines do differently: names in
any case, ids, upserts, booleans, bytes, long text, cascades, and copying
from SQLite.
The user must have permission to `CREATE SCHEMA` (or `CREATE DATABASE`).
The tests of the store check the items that are different between the
engines: names in all cases, ids, upserts, booleans, bytes, long text,
cascades, and copies from SQLite.
### What the tests cover
`make test` runs the unit tests (text cleaning, names and passwords, the
configuration, telnet negotiation and the 3270 handoff) and whole sessions
against a running server on unix sockets: a modem caller with a trusted
modemmenu header, one whose header is not trusted, a login and a post, a
new user, rlogin with a right and a wrong password and trusted, throttling
by caller ID, all lines busy, a telnet ANSI client, a TN3270 client
taken through go3270's negotiation to the logon screen and out with PF3,
the transfer protocols against lrzsz (`sx`/`rx`, `sb`/`rb`, `sz`/`rz`) and
C-Kermit both ways, and ZMODEM over a line that damages bytes; uploads and
downloads through the BBS by ZMODEM, Kermit, YMODEM and XMODEM-1K;
IND$FILE with a real s3270 (upload, download, a file that is not there);
the file store (names, limits, the daily allowance, sysop-only areas),
the FTP server with a real FTP client (uploads, downloads and their
count, every refused operation, path traversal, wrong logins, anonymous
access, TLS required and explicit TLS, the size limit, the per-address
limit), telnet terminals with and without sixel, the sixel encoder checked by
decoding its output with ImageMagick (when installed), and TN3270
clients that report programmed symbols (the logo is loaded and
shown), vector graphics (the logo is drawn) or neither (nothing is sent),
articles (parsing, limits, decoding, wildmats), the NNTP server with
Python's nntplib as a newsreader (login, reading, overview, posting), its
refusals (posting without a login, AUTHINFO before STARTTLS, forged
headers, control messages, oversized articles, IHAVE from a stranger), two
BBSes peered both ways, and IHAVE. With `BBS_TEST_INN=host:port` it also
syncs with a running INN. FidoNet: packets and messages, a hub with two
nodes exchanging echomail by binkp (SEEN-BY, PATH, threads, forwarding),
netmail and replies, wrong passwords, unknown addresses and impostors,
dupes, loops, bad and foreign packets, the echo-newsgroup gateway, and,
when binkd and CrashMail are installed, a hub run by them: echomail and
netmail both ways, calling it and called by it. Doors: the drop files,
the runner (CP437 and UTF-8, time limit, hanging up, idle, single-caller
doors, a pseudo-terminal), a caller opening a door from the menu, and,
when the bbs-dosemu2 image is built, a real DOS door talking by FOSSIL in
it. Chat: rooms, history, private rooms, flooding, node messages, paging
and answering, the page command (and that it runs no shell); two callers
chatting and paging on the text BBS; a 3270 (s3270) chatting with a text
caller and getting a node message on its message line. Finger,
gopher and Gemini: their answers and refusals, with the finger program and
curl as clients, and `bbs gemini cert` asking before it makes a certificate. Customization: finding display files by terminal, SAUCE,
@-codes and widths, colour tags; menus and strings in the configuration
and what it refuses; a text caller through an ANSI logon (CP437 as it
is), the strings, a welcome screen, the sysop's menus and submenus, a
screen with a pause and a goodbye screen; and a 3270 (s3270) through a
coloured logon screen, welcome, the sysop's main menu and a screen.
The shared screens: `internal/app` driven by a scripted front end
(posting, reading on and back, a new scan and reply, a number not on the
page, mail to no one and to the sysop, a node message, deleting, the
profile, a password that differs, validating with a bad level first);
the column layout; the text prompts' keys; and a 3270 (s3270) through
the areas, a post from the editor, reading it, the profile, with a text
caller reading the 3270's post.
The full-screen editor: its text (wrapping as typed and as given, a word
too long for a line, joining lines by Backspace and Delete, moving over
line ends, quoting, the line limit), and an SSH caller writing a post
with the cursor keys, replying with lines from the quote window and
`/S`, then choosing the line editor; the message base (threads from any
message, votes, polls and their answers, aliases (taken names refused),
signatures, groups, keeping by count and by age; through internal/app and
the API); the sysop's tools (a sysop watching
a caller's screen as it is sent, calling them into chat at their next
menu, being away when they page; the user editor, statistics, bans, the
hack log and events through internal/app; events run, failing, timed
out and not run twice; their configuration and the API); the last callers, feedback to the
sysop, a user's details (more of them to a sysop) and mail from there, a
line about oneself, expert menus and `?` on a text terminal; keeping callers out (the deny file
read again as it changes, networks and IPv6, bans after the throttle and
their end, name patterns, the hack log's lines; telnet over TLS with a
login, a plain client on the TLS port getting nothing, a denied address
closed at once, the API's bans and log); scripts (screens, data kept for all
and for a user, posting with refusals caught, a runaway loop stopped and a
slow caller not, failures told to the sysop alone, a hang-up the script
cannot catch, exit, the sample poll, the configuration's checks, and the
sample one-liners on a text terminal and on a 3270 by s3270); the file base (FILE_ID.DIZ in CP437
with colours, a ZIP's and a tar.gz's listings, new files, finding by the
DIZ's words, tagging by numbers, a batch of two by YMODEM, ratios and the day's limit together, the API's
search and listings); MRC (a fake MRC server: the handshake, arrivals, NEWROOM, lines and
actions both ways, colours taken out, our own lines not shown twice,
private messages and server answers to one user, PING and IAMHERE,
!commands and !!, a user in two rooms, LOGOFF, the line dropped and
those here put back, rooms not MRC's not sent, require; on IRC, an MRC
user's hostmask and the room's notices); doors elsewhere (a telnet server's negotiation answered and kept from
the caller, doubled IACs; RLogin's start and a refusal; BBSLink's token,
its MD5s and a wrong code; DoorParty through an SSH server's tunnel, a
wrong password and a wrong host key refused; a caller on the BBS going
through one and back; their configuration); the IRC server (logins by PASS and SASL PLAIN, and refused; a nick
made of a name with a space; lines both ways between an IRC client and
a telnet caller, /me, node messages, the room's history with
server-time, WHO, WHOIS, LIST, a page answered by joining its room,
parting, the node gone with QUIT, TLS, bad nicks; irc-go's own client
with SASL and echo-message; BBSServ (help, info, each of the settings and
their refusals, the new scan, SSH keys added with the password and
deleted, tokens revoked, the password, by /msg and by /BS, CTCP, WHOIS,
notices unanswered); permanent rooms (open when empty, their topics shown
on coming in and told when set, by /topic, TOPIC and BBSServ, refused to
those not the sysop, kept across a restart, let go; @BBSServ in NAMES,
WHO, WHOIS and LIST, on every database engine); the configuration's checks); QWK offline mail (packets and REPs read back
as a reader would, long subjects as QWKE kludges, CP437, another BBS's REP
refused, the indexes' MBF floats; a packet's messages read only once it
has gone, the REP's replies posted and mailed as the caller, a REP twice
posting once; by ZMODEM on a text line, by IND$FILE from s3270, by FTP
and the API); QWK networks (a hub serving FTP and two nodes: what was
there before joining kept back, posts going up under their writers'
names, a node's own not coming back, a reply threaded at the hub, nothing
twice; the configuration's checks); the new scan's areas, messages to
you and finding (the scan kept, LIKE's wildcards taken as text, areas
not read left out), through internal/app and in the store on every
engine; settings kept from call to call
(UTF-8 off over SSH, a Commodore's width) and through the API.
The HTTP API: logins, tokens and scopes, every REST endpoint and its
refusals, rate limits, the OpenAPI document against the routes, server-sent
events and node messages, both WebSockets (auth by header and by first
message, chat between them, paging and answering, mail events, bad
frames, refused origins and tokens) and the metrics. And a terminal caller and
a web caller (the JSON WebSocket) together: chatting in one room both
ways, `/who`, node messages each way, and the web caller paging the
sysop, who answers at the terminal. SSH: logging in by password,
keyboard-interactive and key (and not by a wrong one, someone else's, or
into a locked account), `new` to the BBS's prompt, the pty's terminal
type and size, refused commands, SFTP and forwarding, a user adding and
deleting a key in their profile, host keys made and kept (ed25519, RSA,
ECDSA) and refused when readable, the configuration, legacy ciphers only
when asked for, and the OpenSSH client logging in by key with a pty.
PETSCII: the translation (letters, colours, reverse, CR and LF, cursor
movement, box drawing, accents, runes split across writes, wrapping) and
the keys back; a Commodore logging in with DEL editing, its one column
menus, a .seq screen as it is, the profile's width, no escape ever sent;
a Commodore found while logging in: by DEL typed in the name, by a shifted letter (and not by UTF-8), by a name in capitals and the DEL question (or not, with a backspace), and no question for a name in lower case. RIP: MegaNums, the
commands and their escaping, the menu scene; a RIP terminal found by its
answer, given a .rip screen, menus as buttons, the scene cleared on a
choice and a pause before the next; an ANSI terminal without RIP given
none of it. Access levels: requirements read and written back, met and
not (flags, !flags, sysop, locked users), flag edits; levels found for a
user; areas hidden and posting refused by level and by flags, mail only to
the sysop, chat and paging refused, the day's downloads counted and
limited, doors, validation; the day's time running out (warned, hung up,
counted); a new user waiting and validated by the sysop on the BBS; the
API (no user raises their own level, levels and flags seen only by
sysops and the user, area requirements); the configuration. Terminal identification: the answers of DEC's terminals and
of emulators (VT100 to VT525, xterm old and new, VTE, tmux, SyncTERM,
PuTTY, the Linux console, a VT52) read into names, levels, sixel and
monochrome; DEC Special Graphics and Latin-1 output, escapes passing
through it; VT52 output; a VT220 given DEC graphics, Latin-1 and bold,
shown as a VT220; a VT52 given its escapes and its cursor keys ignored;
a terminal answering nothing left plain. The web terminal: the page, its
headers and files (and no others), WebSockets refused from another
origin or without the subprotocol, and a caller logging in through it,
its size taken, shown as a web terminal, logging off. The web forum:
guests reading (and not what needs a level), logging in and out by the
API's session tokens (and not by an API key), signing up; topics and
replies, forms refused without their token, posts' HTML escaped and links
made links, long lines wrapped and not cut, quotes, polls, likes, unread
topics and areas, aliases hiding the writer, deleting (the writer's own,
the sysop's any), news-only areas, search and who's online; in the store,
topics threaded across areas, read marks, a topic mended when its first
post or its replies' parent goes, and threads found for messages from
before. Every page in each theme, for a guest and a member; choosing a
theme (a member's form needing its token, an unknown theme refused, no
going back off the forum), and the forum's own theme until a caller
chooses. Updating xterm.js:
`npm pack @xterm/xterm @xterm/addon-fit @xterm/addon-image`, and copy
`lib/xterm.js`, `css/xterm.css`, `lib/addon-fit.js`, `lib/addon-image.js`
and the license into `internal/api/web` (without their source map lines);
the image addon's version must be the one for that xterm.js (0.8 for 5.5).
`make test` runs the unit tests and full sessions against a running
server on unix sockets. The list that follows gives what the tests cover.
**See also:** [Building](Building)
- **Unit tests:** text cleaning, names and passwords, the configuration,
telnet negotiation and the 3270 handoff.
- **Sessions and lines:** a modem caller with a trusted modemmenu header,
and one with a header that is not trusted; a login and a post; a new
user; rlogin with a correct password, a wrong password, and trusted;
limits by caller ID; all lines busy; a telnet ANSI client; a TN3270
client through go3270's negotiation to the logon screen and out with
PF3.
- **Transfers:** the transfer protocols against lrzsz (`sx`/`rx`,
`sb`/`rb`, `sz`/`rz`) and C-Kermit in the two directions, and ZMODEM
over a line that causes damage to bytes; uploads and downloads through
the BBS by ZMODEM, Kermit, YMODEM and XMODEM-1K; IND$FILE with a real
s3270 (upload, download, a file that does not exist).
- **File store and FTP:** the file store (names, limits, the daily
allowance, areas for the sysop only); the FTP server with a real FTP
client (uploads, downloads and their count, all refused operations,
path traversal, wrong logins, anonymous access, TLS required and
explicit TLS, the size limit, the limit for each address).
- **Graphics:** telnet terminals with and without sixel; the sixel
encoder, checked when ImageMagick (if installed) decodes its output;
TN3270 clients that report programmed symbols (the BBS loads and shows
the logo), vector graphics (the BBS draws the logo) or neither (the BBS
sends nothing).
- **News:** articles (parse, limits, decode, wildmats); the NNTP server
with Python's nntplib as a newsreader (login, reading, overview,
posting); its refusals (a post without a login, AUTHINFO before
STARTTLS, forged headers, control messages, oversized articles, IHAVE
from an unknown peer); two BBSes that are peers in the two directions,
and IHAVE. With `BBS_TEST_INN=host:port`, it also synchronizes with a
running INN.
- **FidoNet:** packets and messages; a hub with two nodes that exchange
echomail by binkp (SEEN-BY, PATH, threads, forwarding); netmail and
replies; wrong passwords, unknown addresses and impostors; dupes,
loops, bad and foreign packets; the echo-newsgroup gateway. When binkd
and CrashMail are installed, a hub that they operate: echomail and
netmail in the two directions, calls to it and calls from it.
- **Doors:** the drop files; the runner (CP437 and UTF-8, time limit,
hang-up, idle, single-caller doors, a pseudo-terminal); a caller who
opens a door from the menu. When the bbs-dosemu2 image is built, a real
DOS door in it that communicates by FOSSIL.
- **Chat:** rooms, history, private rooms, flooding, node messages, pages
and answers, the page command (and a check that it runs no shell); two
callers who chat and page on the text BBS; a 3270 (s3270) that chats
with a text caller and gets a node message on its message line.
- **Finger, gopher and Gemini:** their answers and refusals, with the
finger program and curl as clients, and a check that
`bbs gemini cert` asks before it makes a certificate.
- **Customization:** how the BBS finds display files by terminal, SAUCE,
@-codes and widths, color tags; menus and strings in the configuration
and what it refuses; a text caller through an ANSI logon (CP437
unchanged), the strings, a welcome screen, the sysop's menus and
submenus, a screen with a pause and a goodbye screen; a 3270 (s3270)
through a colored logon screen, welcome, the sysop's main menu and a
screen.
- **The shared screens:** `internal/app` with a scripted front end
(posting, reading forward and back, a new scan and reply, a number
that is not on the page, mail to no user and to the sysop, a node
message, deleting, the profile, a password that is different, a
validation with a bad level first); the column layout; the keys of the
text prompts; a 3270 (s3270) through the areas, a post from the
editor, reading it, the profile, with a text caller who reads the post
of the 3270.
- **The full-screen editor:** its text (wrap as you type and as given, a
word that is too long for a line, join lines with Backspace and Delete,
move over line ends, quotes, the line limit); an SSH caller who writes
a post with the cursor keys, replies with lines from the quote window
and `/S`, then selects the line editor.
- **The message base:** threads from all messages, votes, polls and their
answers, aliases (names that are in use are refused), signatures,
groups, keep by count and by age; through internal/app and the API.
- **The sysop's tools:** a sysop who monitors the screen of a caller as
the BBS sends it, calls the caller into chat at the next menu, and is
away when the caller pages; the user editor, statistics, bans, the hack
log and events through internal/app; events that run, fail, time out,
and do not run two times; their configuration and the API.
- **Users:** the last callers, feedback to the sysop, the details of a
user (more details to a sysop) and mail from there, a line about the
user, expert menus and `?` on a text terminal.
- **Callers kept out:** the deny file, read again when it changes;
networks and IPv6; bans after the throttle, and the end of the bans;
name patterns; the lines of the hack log; telnet over TLS with a login;
a plain client on the TLS port that gets nothing; a denied address,
closed immediately; the bans and the log of the API.
- **Scripts:** screens; data kept for all users and for one user; posts
with refusals caught; a runaway loop that the BBS stops, and a slow
caller that it does not stop; failures told only to the sysop; a
hang-up that the script cannot catch; exit; the sample poll; the
checks of the configuration; the sample one-liners on a text terminal
and on a 3270 by s3270.
- **The file base:** FILE_ID.DIZ in CP437 with colors; the listings of a
ZIP and a tar.gz; new files; search by the words of the DIZ; tags by
numbers; a batch of two by YMODEM; ratios and the limit for the day
together; the search and listings of the API.
- **MRC:** a fake MRC server: the handshake, arrivals, NEWROOM, lines and
actions in the two directions, colors removed, our own lines not shown
two times, private messages and server answers to one user, PING and
IAMHERE, !commands and !!, a user in two rooms, LOGOFF, the line
dropped and the users put back, rooms that are not MRC rooms not sent,
require. On IRC: the hostmask of an MRC user and the notices of the
room.
- **Doors at other locations:** the negotiation of a telnet server,
answered and kept from the caller, doubled IACs; the start of RLogin
and a refusal; the token of BBSLink, its MD5s and a wrong code;
DoorParty through the tunnel of an SSH server, a wrong password and a
wrong host key refused; a caller on the BBS who goes through one and
comes back; their configuration.
- **The IRC server:** logins by PASS and SASL PLAIN, and refused logins;
a nick made from a name with a space; lines in the two directions
between an IRC client and a telnet caller, /me, node messages, the
history of the room with server-time, WHO, WHOIS, LIST, a page that the
user answers when the user joins its room, parting, the node removed
with QUIT, TLS, bad nicks; the client of irc-go with SASL and
echo-message.
- **BBSServ:** help, info, each of the settings and their refusals, the
new scan, SSH keys added with the password and deleted, tokens revoked,
the password, by /msg and by /BS, CTCP, WHOIS, notices without an
answer.
- **Permanent rooms:** open when empty; their topics shown when a user
comes in and told when set, by /topic, TOPIC and BBSServ; refused to
users who are not the sysop; kept across a restart; released;
@BBSServ in NAMES, WHO, WHOIS and LIST, on all database engines; the
checks of the configuration.
- **QWK offline mail:** packets and REPs read back as a reader does, long
subjects as QWKE kludges, CP437, the REP of a different BBS refused,
the MBF floats of the indexes; the messages of a packet marked as read
only after it has gone; the replies of the REP posted and mailed as the
caller; a REP sent two times that posts one time; by ZMODEM on a text
line, by IND$FILE from s3270, by FTP and the API.
- **QWK networks:** a hub that serves FTP and two nodes: the messages
from before the join are kept back, posts go up under the names of
their writers, the posts of a node do not come back to it, a reply is
threaded at the hub, nothing comes two times; the checks of the
configuration.
- **The new scan:** the areas of the new scan, messages to you and search
(the scan kept, LIKE's wildcards used as text, areas that are not read
left out), through internal/app and in the store on all engines;
settings kept from call to call (UTF-8 off over SSH, the width of a
Commodore) and through the API.
- **The HTTP API:** logins, tokens and scopes, all REST endpoints and
their refusals, rate limits, the OpenAPI document against the routes,
server-sent events and node messages, the two WebSockets
(authentication by header and by first message, chat between them,
pages and answers, mail events, bad frames, refused origins and
tokens) and the metrics.
- **Terminal and web callers together:** a terminal caller and a web
caller (the JSON WebSocket) that chat in one room in the two
directions, `/who`, node messages in each direction, and the web caller
who pages the sysop, who answers at the terminal.
- **SSH:** login by password, keyboard-interactive and key (and no login
by a wrong key, the key of a different user, or into a locked
account); `new` at the prompt of the BBS; the terminal type and size of
the pty; refused commands, SFTP and forwarding; a user who adds and
deletes a key in the profile; host keys made and kept (ed25519, RSA,
ECDSA) and refused when they are readable; the configuration; legacy
ciphers only when you ask for them; the OpenSSH client that logs in by
key with a pty.
- **PETSCII:** the translation (letters, colors, reverse, CR and LF,
cursor movement, box drawing, accents, runes split across writes,
wrapping) and the keys back; a Commodore that logs in with DEL editing,
its one-column menus, a .seq screen unchanged, the width in the
profile, no escape sent at any time; a Commodore found during the
login: by DEL typed in the name, by a shifted letter (and not by
UTF-8), by a name in capitals and the DEL question (or not, with a
backspace), and no question for a name in lower case.
- **RIP:** MegaNums, the commands and their escapes, the menu scene; a
RIP terminal found by its answer, given a .rip screen, menus as
buttons, the scene cleared on a selection and a pause before the next;
an ANSI terminal without RIP that gets none of it.
- **Access levels:** requirements read and written back, met and not met
(flags, !flags, sysop, locked users), flag edits; the levels found for
a user; areas hidden and posts refused by level and by flags, mail only
to the sysop, chat and pages refused, the downloads of the day counted
and limited, doors, validation; the time of the day at its end (a
warning, a hang-up, the count); a new user who waits and that the
sysop validates on the BBS; the API (no user can increase their own
level, only sysops and the user can see the levels and flags, area
requirements); the configuration.
- **Terminal identification:** the answers of DEC's terminals and of
emulators (VT100 to VT525, old and new xterm, VTE, tmux, SyncTERM,
PuTTY, the Linux console, a VT52) read into names, levels, sixel and
monochrome; DEC Special Graphics and Latin-1 output, with escapes that
go through it; VT52 output; a VT220 given DEC graphics, Latin-1 and
bold, shown as a VT220; a VT52 given its escapes, with its cursor keys
ignored; a terminal that answers nothing, left plain.
- **The web terminal:** the page, its headers and files (and no other
files), WebSockets refused from a different origin or without the
subprotocol, and a caller who logs in through it, its size used, shown
as a web terminal, and logs off.
- **The web forum:** guests who read (and cannot read what needs a
level); login and logout by the session tokens of the API (and not by
an API key); sign-up; topics and replies; forms refused without their
token; the HTML of posts escaped and links made into links; long lines
wrapped and not cut; quotes, polls, likes, unread topics and areas;
aliases that hide the writer; deletion (the writer deletes own posts,
the sysop deletes all posts); news-only areas; search and who is
online. In the store: topics threaded across areas, read marks, a topic
repaired when its first post or the parent of its replies goes, and
threads found for old messages. All pages in each theme, for a guest
and a member; the selection of a theme (the form of a member needs its
token, an unknown theme is refused, the selection cannot go to a page
off the forum); and the theme of the forum until a caller selects one.
**Updating xterm.js:** do these steps:
1. Run `npm pack @xterm/xterm @xterm/addon-fit @xterm/addon-image`.
2. Copy `lib/xterm.js`, `css/xterm.css`, `lib/addon-fit.js`,
`lib/addon-image.js` and the license into `internal/api/web`. Remove
their source map lines.
3. Make sure that the version of the image addon is the version for that
xterm.js (0.8 for 5.5).
**Refer to:** [Building](Building)
+88 -66
View File
@@ -1,36 +1,41 @@
A door is a program, often a game, that the BBS hands the caller's line
to. Text callers (telnet, modem, rlogin) open doors with *D* on the main
menu. This page covers DOS doors, Linux doors, and doors on other
systems.
A door is a program, often a game, to which the BBS gives the line of
the caller. Text callers (telnet, modem, rlogin) open doors with *D* on
the main menu. This page tells about DOS doors, Linux doors, and doors
on other systems.
When a caller opens a door, the BBS writes the drop files that doors read
(DOOR.SYS, DORINFO1.DEF, DOOR32.SYS and CHAIN.TXT, in the node's own
directory), runs the door, and connects the caller to it. The door runs
until it ends, the caller hangs up (which stops the door), the door's time
limit runs out, or the caller types nothing for the idle time. A door's
CP437 output is shown as UTF-8 on UTF-8 terminals, and what those callers
type goes back as CP437. A CP437 terminal (SyncTERM, NetRunner, a modem
caller) gets the bytes unchanged. 3270 callers do not see doors, because
doors are ANSI programs.
When a caller opens a door, the BBS does these steps:
1. It writes the drop files that doors read (DOOR.SYS, DORINFO1.DEF,
DOOR32.SYS and CHAIN.TXT), in the directory of the node.
2. It runs the door.
3. It connects the caller to the door.
The door runs until one of these events occurs: the door ends, the
caller hangs up (this stops the door), the time limit of the door ends,
or the caller types nothing for the idle time. The BBS shows the CP437
output of a door as UTF-8 on UTF-8 terminals. The text that these
callers type goes back as CP437. A CP437 terminal (SyncTERM, NetRunner,
a modem caller) gets the bytes with no change. 3270 callers do not see
doors, because doors are ANSI programs.
## DOS doors
DOS doors run in dosemu2, in Docker. `doors/dosemu2` builds the image:
dosemu2 with its fdpp kernel and comcom64 shell, built from source on
Ubuntu (no PPA needed):
DOS doors run in dosemu2, in Docker. `doors/dosemu2` builds the image.
The image contains dosemu2 with its fdpp kernel and comcom64 shell,
built from source on Ubuntu (no PPA is necessary):
```
make doors-image ; docker build -t bbs-dosemu2 doors/dosemu2
```
In the container, the door's drive is F: (`/doors`; mount your doors
there) and the node's drop files are on G: (`/node`). The caller is on
COM1, behind dosemu2's own FOSSIL driver, which is what DOS doors talk to.
The image's `rundoor DOSDIR COMMAND` loads the FOSSIL driver, changes to
the door's directory and runs it. Anything the door shows on its own
screen (rather than COM1), and dosemu2's messages, go to `dosemu.out` in
the node's directory; errors from the command itself (Docker's) go to
`door.log` there.
In the container, the drive of the door is F: (`/doors`. Mount your
doors there). The drop files of the node are on G: (`/node`). The caller
is on COM1, behind the FOSSIL driver of dosemu2. DOS doors use this
driver. The `rundoor DOSDIR COMMAND` of the image loads the FOSSIL
driver, goes to the directory of the door and runs it. The door can show
text on its own screen (not on COM1). This text, and the messages of
dosemu2, go to `dosemu.out` in the directory of the node. Errors from
the command (from Docker) go to `door.log` in the same directory.
```
[door lord]
@@ -41,49 +46,63 @@ time_limit = 60
cleanup = docker rm -f bbs-door{node}
```
The BBS fills in `{node}`, `{dir}` (the node's directory), `{uid}` and
`{gid}` (the BBS's own, so the door writes the node's files as the BBS),
`{userid}`, `{minutes}`, `{rows}`, `{cols}` and `{baud}`. Most doors are
told where the drop file is on their command line or in their own
configuration; here that is `G:\DOOR.SYS` (or `G:\DORINFO1.DEF`, and so
on). Each node has its own directory, so multi-node doors work, and
`single = yes` lets only one caller at a time into a door that is not
multi-node. dosemu2 runs the door under its CPU emulator unless the host
gives the container `/dev/kvm` (`--device /dev/kvm`, not yet tried). Under
The BBS fills in these values:
- `{node}`.
- `{dir}` (the directory of the node).
- `{uid}` and `{gid}` (those of the BBS. Thus, the door writes the files
of the node as the BBS).
- `{userid}`, `{minutes}`, `{rows}`, `{cols}` and `{baud}`.
Most doors get the location of the drop file on their command line or
in their own configuration. Here, the location is `G:\DOOR.SYS` (or
`G:\DORINFO1.DEF`, and other files). Each node has its own directory.
Thus, multi-node doors operate. `single = yes` lets only one caller at a
time into a door that is not multi-node.
dosemu2 runs the door under its CPU emulator, unless the host gives
`/dev/kvm` to the container (`--device /dev/kvm`, not tried yet). Under
the emulator, a door starts in about a second.
The BBS runs `docker` itself, so its user must be allowed to. That means
the `docker` group (which is as powerful as root, so think twice), or
rootless Docker or Podman (`command = podman run ...`). The door's
container has no network (`--network none`), runs as the BBS's user rather
than root, and is removed when the door ends or the caller hangs up.
The BBS runs `docker` itself. Thus, its user must have the permission to
run it. That means the `docker` group, or rootless Docker or Podman
(`command = podman run ...`).
This was tested with a FOSSIL door written for the purpose
(`doors/dosemu2/testdoor`, which reads DOOR.SYS, writes CP437 and ANSI,
and echoes keys) through the whole BBS: the caller types, the door
answers, and when the caller hangs up inside it, the container goes.
> **CAUTION: THE `docker` GROUP HAS THE SAME POWER AS ROOT.** Think
> carefully before you add the user of the BBS to it.
The container of the door has no network (`--network none`). It runs as
the user of the BBS, not as root. The BBS removes it when the door ends
or the caller hangs up.
We tested this with a FOSSIL door that we wrote for this purpose
(`doors/dosemu2/testdoor`). This door reads DOOR.SYS, writes CP437 and
ANSI, and echoes keys. We tested it through the full BBS: the caller
types, the door answers, and when the caller hangs up inside it, the
container stops.
## Linux doors
A Linux door is any program that talks to a terminal on its standard
input and output. Set `pty = yes` for a program that wants a terminal
(most do), and `charset = utf-8` for one that writes UTF-8. DOOR32.SYS
tells these doors `door32_comm = local`.
A Linux door is a program that uses a terminal on its standard input
and output. Set `pty = yes` for a program that must have a terminal
(most programs). Set `charset = utf-8` for a program that writes UTF-8.
DOOR32.SYS gives these doors `door32_comm = local`.
## Doors elsewhere
A door can also be on another system, with the caller's line connected to
it over the network instead of to a program here. Such a door has a
`type` and no command or drop files. It is listed and opened like any
other door, with the same time limit, idle time, `require`, `sysop_only`
and character set (CP437 by default, translated for UTF-8 terminals).
A door can also be on a different system. Then the BBS connects the line
of the caller to it over the network, not to a program here. This type
of door has a `type`, and no command or drop files. The BBS lists and
opens it as all other doors, with the same time limit, idle time,
`require`, `sysop_only` and character set (CP437 by default, translated
for UTF-8 terminals).
| `type` | What it is | Settings |
|---|---|---|
| `telnet` | a telnet door server | `address` (host:port) |
| `rlogin` | an RLogin door server (RFC 1282) | `address`; `client_user`, `server_user` (default `{user}`, the caller's name), `terminal` (`ansi`) |
| `bbslink` | [BBSLink](http://www.bbslink.net) | `syscode`, `authcode`, `schemecode` (the codes BBSLink gave you), `door` (a door's code); `address` (`games.bbslink.net:23`), `url` (`http://games.bbslink.net`) |
| `doorparty` | [DoorParty](http://wiki.throwbackbbs.com/) | `ssh_user`, `ssh_password` (its SSH account), `tag` (your system tag), `door` (a door's code; none: its menu), `host_key`; `address` (`dp.throwbackbbs.com:2022`), `rlogin_address` (`dp.throwbackbbs.com:513`) |
| `rlogin` | an RLogin door server (RFC 1282) | `address`. `client_user`, `server_user` (default `{user}`, the name of the caller), `terminal` (`ansi`) |
| `bbslink` | [BBSLink](http://www.bbslink.net) | `syscode`, `authcode`, `schemecode` (the codes that BBSLink gave you), `door` (the code of a door). `address` (`games.bbslink.net:23`), `url` (`http://games.bbslink.net`) |
| `doorparty` | [DoorParty](http://wiki.throwbackbbs.com/) | `ssh_user`, `ssh_password` (its SSH account), `tag` (your system tag), `door` (the code of a door. None: its menu), `host_key`. `address` (`dp.throwbackbbs.com:2022`), `rlogin_address` (`dp.throwbackbbs.com:513`) |
```ini
[door bbslink-lord]
@@ -103,20 +122,23 @@ tag = XB
host_key = SHA256:...
```
How the BBS connects to each:
How the BBS connects to each type:
- **Telnet**: the BBS answers the server's negotiation itself, presenting
a binary ANSI terminal of the caller's size (`TERMINAL-TYPE`, `NAWS`),
and lets the server echo. None of this reaches the caller.
- **Telnet**: the BBS answers the negotiation of the server itself. It
shows itself as a binary ANSI terminal with the size of the terminal
of the caller (`TERMINAL-TYPE`, `NAWS`). It lets the server echo. None
of this data goes to the caller.
- **RLogin**: the BBS sends the client and server user names and the
terminal (with the line's speed), then starts the session.
- **BBSLink**: the BBS gets a token from BBSLink's web server, which then
authenticates the caller with your codes (sent as MD5s with the token),
and connects by telnet. BBSLink knows the caller by their user number.
terminal (with the speed of the line). Then it starts the session.
- **BBSLink**: the BBS gets a token from the web server of BBSLink. Then
BBSLink authenticates the caller with your codes (sent as MD5s with the
token). The BBS then connects by telnet. BBSLink knows the caller by
the user number.
- **DoorParty**: the BBS opens an SSH tunnel with its account (no
doorparty-connector is needed), then connects through it by RLogin as
`[TAG]name`, with the door's code as the terminal type. Without
`host_key`, the server's key is not checked; `bbs check` warns about
this, and each call logs the key's fingerprint so you can add it.
doorparty-connector is necessary). Then it connects through the tunnel
by RLogin as `[TAG]name`, with the code of the door as the terminal
type. Without `host_key`, the BBS does not check the key of the
server. `bbs check` gives a warning about this. Each call logs the
fingerprint of the key, so that you can add it.
**See also:** [Security](Security), [Future work](https://github.com/D-Modem/bbs/blob/HEAD/TODO.md)
+113 -87
View File
@@ -1,9 +1,10 @@
With a `[mail]` section each user has an e-mail address, and their BBS
mail is their e-mail. A letter written on a 3270, a modem or the web goes
out to the internet, and mail from the internet arrives in the same inbox
the CompuServe and BBS mail commands read. Mail programs (Thunderbird,
Apple Mail, mutt, K-9) read it over IMAP or POP3 and send over SMTP, logged
in with the BBS name and password.
With a `[mail]` section, each user has an e-mail address, and the BBS
mail of the user is the e-mail of the user. A letter written on a 3270,
a modem or the web goes out to the internet. Mail from the internet
arrives in the same inbox that the CompuServe and BBS mail commands
read. Mail programs (Thunderbird, Apple Mail, mutt, K-9) read it over
IMAP or POP3 and send over SMTP. They log in with the BBS name and
password.
```
; bbs.conf
@@ -30,64 +31,75 @@ tls = required
address = :25
```
Every server runs only if its section is there. All of them use the BBS's
guard (bans, throttling), and each has `max_clients`, `max_per_ip` and
`idle_timeout`. `tls` is `no`, `optional` (STARTTLS offered), `required`
(no login before STARTTLS) or `implicit` (TLS from the first byte). Ports
below 1024 are bound before the BBS drops root, as the others are.
Each server runs only if its section is there. All of them use the guard
of the BBS (bans, throttling). Each has `max_clients`, `max_per_ip` and
`idle_timeout`. `tls` has these values:
- `no`.
- `optional` (the server offers STARTTLS).
- `required` (no login before STARTTLS).
- `implicit` (TLS from the first byte).
The BBS binds ports below 1024 before it stops its root access, as it
does for the other ports.
## Addresses
A user's address is their name in lower case, with spaces as dots, at the
domain: `Alice Smith` is `alice.smith@example.org`. `bbs mail address
NAME` prints it. `+tags` are ignored (`alice.smith+lists@` reaches Alice).
`postmaster@`, `abuse@`, `hostmaster@` and `webmaster@` go to `[mail]
postmaster`, or the first sysop.
The address of a user is the name in lower case, with dots in place of
spaces, at the domain: `Alice Smith` is `alice.smith@example.org`.
`bbs mail address
NAME` prints it. The BBS ignores `+tags` (`alice.smith+lists@` goes to
Alice). `postmaster@`, `abuse@`, `hostmaster@` and `webmaster@` go to
`[mail]
postmaster`, or to the first sysop.
When writing mail on the BBS, the recipient can be a user's name, a FidoNet
address (`Name@1:234/5`) or an internet address (`bob@example.net`). In
CompuServe Mail, `>INTERNET:bob@example.net` works as it did there. Mail to
FidoNet's internet form (`john.doe@f5.n234.z1.fidonet.org`) goes as
netmail.
When you write mail on the BBS, the recipient can be the name of a user,
a FidoNet address (`Name@1:234/5`) or an internet address
(`bob@example.net`). In CompuServe Mail, `>INTERNET:bob@example.net`
operates as it did on CompuServe. Mail to the internet form of FidoNet
(`john.doe@f5.n234.z1.fidonet.org`) goes as netmail.
## Folders
Mail is kept once. Each user has their own entry for it, with its read and
starred marks, so the same mail sent to five users is stored once. Every
mail program sees the same folders:
The BBS keeps each mail one time. Each user has an entry for it, with
its read and starred marks. Thus, if you send the same mail to five
users, the BBS stores it one time. All mail programs see the same
folders:
| Folder | Holds | Special-use |
|---|---|---|
| INBOX | mail received, not deleted | |
| Sent | mail sent | `\Sent` |
| Drafts | drafts saved by a mail program | `\Drafts` |
| Drafts | drafts that a mail program saved | `\Drafts` |
| Starred | starred mail (`\Flagged`) | `\Flagged` |
| Unread | unread mail received | |
| All Mail | everything not deleted | `\All` |
| All Mail | all mail that is not deleted | `\All` |
| Trash | deleted mail | `\Trash` |
Starred, Unread and All Mail are views: starring a mail in the inbox puts
it in Starred, and taking it out of Starred unstars it. Deleting moves mail
to the Trash, where a mail program can restore it (by moving it out) or
expunge it. Mail in the trash longer than `trash_days` (30) is removed for
good. Folders cannot be created or renamed.
Starred, Unread and All Mail are views. If you star a mail in the inbox,
it shows in Starred. If you remove it from Starred, its star is removed.
When you delete mail, the BBS moves it to the Trash. There, a mail
program can restore it (it moves it out) or expunge it. The BBS
permanently removes mail that is in the trash for longer than
`trash_days` (30). You cannot create folders or change their names.
POP3 sees the inbox. Mail retrieved is marked read, and `DELE` puts it in
the trash.
POP3 sees the inbox. The BBS marks retrieved mail as read. `DELE` puts
mail in the trash.
## Sending to the internet
`[mail] outbound` says how mail for other domains leaves:
`[mail] outbound` sets how mail for other domains goes out:
- `direct` (the default): the BBS looks up each domain's MX and delivers
on port 25, with STARTTLS when the other side offers it. Many home and
cloud networks block port 25 out, and receivers want SPF, DKIM and a
reverse DNS name for the host, so this needs some DNS work (below).
- `smarthost`: everything goes through another mail server (your
provider's, a relay such as Postfix, or a service like Mailgun), given in
`[smarthost]`. That server does the delivering. This is the easy route
when one is at hand.
- `none`: only mail between users here, and FidoNet.
- `direct` (the default): the BBS looks up the MX of each domain and
delivers on port 25. It uses STARTTLS when the other server offers it.
Many home and cloud networks block outgoing port 25. Also, receivers
want SPF, DKIM and a reverse DNS name for the host. Thus, this method
needs some DNS work (refer to the text below).
- `smarthost`: all mail goes through a different mail server (that of
your provider, a relay such as Postfix, or a service like Mailgun),
that you give in `[smarthost]`. That server does the delivery. If you
have such a server, this is the easy method.
- `none`: only mail between users on this BBS, and FidoNet.
```
[mail]
@@ -101,15 +113,16 @@ username = bbs@example.org
password = secret
```
Mail out waits in a queue, tried again with longer gaps (five minutes, then
up to four hours) for `queue_days` (5). When a server refuses a recipient for
good, or the days run out, the sender gets a note in their inbox saying
why. `bbs mail queue` lists what is waiting, and `bbs mail send` tries it
all now.
Outgoing mail waits in a queue. The BBS tries it again with longer
intervals (five minutes, then up to four hours) for `queue_days` (5).
When a server permanently refuses a recipient, or when the days end, the
sender gets a note in the inbox with the reason. `bbs mail queue` lists
the mail that waits. `bbs mail send` tries all of it now.
## DNS for a domain of its own
For mail to arrive, and to be believed when sent directly:
These records are necessary for mail to arrive, and for receivers to
trust mail that the BBS sends directly:
```
example.org. MX 10 mail.example.org.
@@ -119,23 +132,28 @@ bbs._domainkey.example.org. TXT "v=DKIM1; k=rsa; p=..."
_dmarc.example.org. TXT "v=DMARC1; p=quarantine"
```
and a reverse DNS (PTR) name for 203.0.113.5 of `mail.example.org`, which
the hosting provider sets. `bbs mail dkim /etc/bbs/dkim.pem` makes the DKIM
key and prints its record. With a smarthost, use the SPF and DKIM its
provider gives instead.
Also, a reverse DNS (PTR) name of `mail.example.org` for 203.0.113.5 is
necessary. The hosting provider sets it.
`bbs mail dkim /etc/bbs/dkim.pem` makes the DKIM key and prints its
record. With a
smarthost, use the SPF and DKIM that its provider gives.
## Mail from the internet
`[mx]` takes mail for the domain on port 25, without a login, and only for
users here: it is never an open relay. With `checks = yes` (the default) it
checks SPF, DKIM and DMARC, and adds an `Authentication-Results` header. A
mail is refused when it fails a DMARC policy of `p=reject`, or, for a domain
with no DMARC record, when SPF fails and no signature of that domain holds.
`[mx]` accepts mail for the domain on port 25, without a login, and only
for users on this BBS. It is never an open relay. With `checks = yes`
(the default), it checks SPF, DKIM and DMARC, and adds an
`Authentication-Results` header. It refuses a mail in these conditions:
- The mail fails a DMARC policy of `p=reject`.
- For a domain with no DMARC record: SPF fails and no signature of that
domain is valid.
### Spam: DNS blocklists
A DNSBL is a list of addresses known to send spam, asked by DNS. `[mx]
dnsbl` names the lists to ask; none are asked unless it is set:
A DNSBL is a list of addresses that send spam. You ask it by DNS. `[mx]
dnsbl` names the lists to ask. If you do not set it, the BBS asks no
lists:
```
[mx]
@@ -143,32 +161,39 @@ address = :25
dnsbl = zen.spamhaus.org, bl.spamcop.net
```
The connecting address is looked up in every list at once, at the first
`MAIL FROM`. If any list has it, the mail is refused with `554 5.7.1` and
the list's reason (its TXT record, often a link where the sender can ask to
be taken off), and the refusal is logged. A list that does not answer in
ten seconds, or answers with an error, refuses no one: mail is not lost
because a list is down. Addresses on this machine and private networks are
never looked up, and nor are users sending through `[smtp]`, who log in:
a user on a listed home connection can still send.
At the first `MAIL FROM`, the BBS looks up the address of the connection
in all the lists at the same time. If a list has it, the BBS refuses the
mail with `554 5.7.1` and the reason of the list. The reason is the TXT
record of the list, which often has a link where the sender can ask for
removal. The BBS logs the refusal.
Spamhaus answers nothing useful to queries through public resolvers
(8.8.8.8, 1.1.1.1, a cloud provider's): the BBS logs `refused the query`
when that happens. Run a resolver of your own (unbound, or the system's
with no forwarders) on the mail host, and see Spamhaus's terms: heavy or
commercial use needs their paid feed. Lists to consider: `zen.spamhaus.org`
(Spamhaus SBL, XBL and PBL in one), `bl.spamcop.net`, `b.barracudacentral.org`
(free, after registering the resolver's address with them).
If a list does not answer in ten seconds, or answers with an error, the
BBS refuses no mail because of that list. Thus, mail is not lost when a
list does not operate. The BBS never looks up addresses on this machine
and on private networks. It also does not look up users who send
through `[smtp]`, because they log in. Thus, a user on a listed home
connection can still send.
DNSBLs only look at the sending address. SPF, DKIM and DMARC (above) check
that mail claiming a domain comes from it. Together they keep out most
spam; for content filtering (SpamAssassin, rspamd) put Postfix in front
and hand mail in by LMTP, below.
Spamhaus gives no useful answer to queries through public resolvers
(8.8.8.8, 1.1.1.1, the resolvers of a cloud provider). When this occurs,
the BBS logs `refused the query`. Run your own resolver (unbound, or the
resolver of the system with no forwarders) on the mail host. Read the
terms of Spamhaus: heavy or commercial use must have their paid feed.
Some lists that you can use: `zen.spamhaus.org` (Spamhaus SBL, XBL and
PBL in one), `bl.spamcop.net`, `b.barracudacentral.org` (free, after you
register the address of the resolver with them).
DNSBLs look only at the address of the sender. SPF, DKIM and DMARC
(above) check that mail which claims a domain comes from that domain.
Together, they stop most spam. For content filters (SpamAssassin,
rspamd), put Postfix in front and give mail to the BBS by LMTP (refer to
the text below).
### LMTP
If another mail server already takes the domain's mail (Postfix, with its
own spam filtering), it can hand mail to the BBS by LMTP instead:
If a different mail server already accepts the mail of the domain
(Postfix, with its own spam filters), it can give mail to the BBS by
LMTP:
```
[lmtp]
@@ -183,12 +208,13 @@ virtual_transport = lmtp:unix:/run/bbs/lmtp.sock
## On the terminal
Mail from the internet is shown as text: HTML mail is turned into plain
text, and attachments are listed by name and size (they stay whole for
mail programs). Messages larger than `max_message` (10M) are refused.
The BBS shows mail from the internet as text. It changes HTML mail into
plain text. It lists attachments by name and size (they stay complete
for mail programs). The BBS refuses messages larger than `max_message`
(10M).
## Databases
Mail lives in the BBS's database, whichever it is: SQLite, PostgreSQL,
MySQL or MariaDB. `bbs db copy` carries the mail, the folders and the
queue along with the rest.
Mail is in the database of the BBS, for all engines: SQLite, PostgreSQL,
MySQL or MariaDB. `bbs db copy` copies the mail, the folders and the
queue with the other data.
+109 -89
View File
@@ -1,9 +1,13 @@
The BBS can be a node (or point) of FidoNet or any other FTN network
(fsxNet, AgoraNet, or a network of your own). A message area becomes an
echo when it is given an echo tag, users send netmail by addressing mail
to `Name@zone:net/node`, and the BBS exchanges packets with its links over
binkp, both calling them and answering their calls. The BBS is its own
tosser, scanner and mailer, so no other FTN software is needed.
The BBS can be a node (or point) of FidoNet or a different FTN network
(fsxNet, AgoraNet, or your own network). It has these functions:
- If you give an echo tag to a message area, the area becomes an echo.
- Users send netmail when they address mail to `Name@zone:net/node`.
- The BBS exchanges packets with its links over binkp. It calls them and
it answers their calls.
The BBS is its own tosser, scanner and mailer. Thus, no other FTN
software is necessary.
```
bbs area echo General FSX_GEN ; General is the echo FSX_GEN
@@ -56,88 +60,99 @@ areafix_password = FIXIT2
## Echomail
Messages users post in an echo are packed for each link that carries it
(with MSGID, REPLY for threads, PID, TZUTC, CHRS, tear and origin lines,
SEEN-BY and PATH). Messages that links send are tossed into the echo,
decoded from their character set according to their CHRS kludge (CP437
and the other DOS code pages, Latin-1, KOI8, Windows code pages, UTF-8),
and cleaned like anything else a caller writes. With more than one link,
the BBS passes echomail on between them by SEEN-BY, as a hub does. Each
message is taken only once (by its MSGID, or by a digest for messages
without one), and never if this system is already in its PATH.
The BBS packs the messages that users post in an echo for each link
that carries the echo. The packed messages have MSGID, REPLY for
threads, PID, TZUTC, CHRS, tear and origin lines, SEEN-BY and PATH. The
BBS tosses the messages from links into the echo. It decodes them from
their character set, according to their CHRS kludge (CP437 and the
other DOS code pages, Latin-1, KOI8, Windows code pages, UTF-8). It
cleans them as it cleans all other text from callers.
With more than one link, the BBS passes echomail between them by
SEEN-BY, as a hub does. The BBS takes each message only one time (by its
MSGID, or by a digest for messages without a MSGID). It never takes a
message if this system is already in its PATH.
## Netmail
On the text BBS and on a 3270, mail to `Name@1:2/3` (or `Name@1:2/3.4`) is
netmail. It is sent through the link with that address, or the link of
that point's node, or otherwise the link with `route = yes`. Netmail for
this system goes to the user of that name (or to the sysop), from
`Name@zone:net/node`, so *Reply* answers it as netmail (with a REPLY
kludge). The BBS does not route anyone else's netmail: it is a leaf.
On the text BBS and on a 3270, mail to `Name@1:2/3` (or `Name@1:2/3.4`)
is netmail. The BBS sends it through the link with that address, or
through the link of the node of that point. If neither exists, it uses
the link with `route = yes`. Netmail for this system goes to the user of
that name (or to the sysop), from `Name@zone:net/node`. Thus, *Reply*
answers it as netmail (with a REPLY kludge). The BBS does not route the
netmail of other systems: it is a leaf.
## binkp
The mailer speaks binkp (FTS-1026) with CRAM-MD5 passwords (FTS-1027).
Links are recognised by their address and password, and other systems are
turned away. A password is never sent in the clear unless
`plain_password = yes`.
The mailer uses binkp (FTS-1026) with CRAM-MD5 passwords (FTS-1027). It
knows links by their address and password, and refuses other systems.
It never sends a password in clear text unless `plain_password = yes`.
Packets are Type 2+, sent as ARCmail bundles (`packer = zip`, the default,
or `arc`, `arj`, `lha`) or as bare packets (`none`). Received bundles of
any of the four kinds (whatever they are called; the BBS reads their
contents to tell) and bare packets are tossed, and broken packets go to
`dir/bad`. Files without a TIC that are a day old (such as file requests,
or a file a sysop sent by hand) are set aside in `dir/in/LINK/files`.
Packets are Type 2+. The BBS sends them as ARCmail bundles
(`packer = zip`, the default, or `arc`, `arj`, `lha`) or as bare packets
(`none`). The BBS tosses received bundles of the four types and bare
packets. It does not use the names of the bundles: it reads their
contents to find the type. Broken packets go to `dir/bad`. Files that
have no TIC and are one day old (for example, file requests, or a file
that a sysop sent manually) go into `dir/in/LINK/files`.
New mail is packed within a minute (netmail at once). A link with a host
is called when mail is waiting for it (and again every five minutes while
calls fail), and every `poll` seconds. The first scan for a new link only
marks where to start, so the link is not sent the whole history.
The BBS packs new mail in one minute (netmail immediately). The BBS
calls a link with a host when mail waits for it (and again every five
minutes while calls fail), and every `poll` seconds. The first scan for
a new link only records the start point. Thus, the BBS does not send the
full history to the link.
## Gateways to newsgroups
An area that is both an echo and a newsgroup is a gateway. Echomail is
served to newsreaders as articles (From `Name <Name@f1.n2.z3.fidonet.org>`,
with the Message-ID made from the MSGID as other gateways do), and
articles from news peers go out as echomail. Most FidoNet echoes do not
want gated traffic, so ask first.
An area that is an echo and also a newsgroup is a gateway. The BBS
serves echomail to newsreaders as articles (From
`Name <Name@f1.n2.z3.fidonet.org>`, with the Message-ID made from the
MSGID, as other gateways do). Articles from news peers go out as
echomail. Most FidoNet echoes do not want gated traffic. Thus, ask
first.
## Bundles
Nearly every hub sends ARCmail as ZIP, but older systems send ARC, ARJ or
LHA. The BBS reads all four itself, so there are no archivers to install:
ZIP's stored and deflated methods; ARC's stored, packed, squeezed,
crunched and squashed; ARJ's methods 1 to 4; and LHA's `-lh0-` and
`-lh4-` to `-lh7-`, with header levels 0 to 2. Bundles it writes with
`packer = arc`, `arj` or `lha` are stored uncompressed, so every unpacker
can read them. The same readers list archives in the file areas and find
their FILE_ID.DIZ.
Almost all hubs send ARCmail as ZIP, but older systems send ARC, ARJ or
LHA. The BBS reads all four types itself. Thus, you do not have to
install archivers. The BBS reads these methods:
- ZIP: stored and deflated.
- ARC: stored, packed, squeezed, crunched and squashed.
- ARJ: methods 1 to 4.
- LHA: `-lh0-` and `-lh4-` to `-lh7-`, with header levels 0 to 2.
The BBS stores the bundles that it writes with `packer = arc`, `arj` or
`lha` without compression. Thus, all unpackers can read them. The same
readers list archives in the file areas and find their FILE_ID.DIZ.
## Nodelists
`nodelist` in `[fido]` names nodelists (FTS-5000) by path or pattern, or
as `area:NAME` for the file area that the NODELIST file echo fills. The
BBS reads the newest file of each, plain or in an archive, and reads it
again when a newer one arrives. With a nodelist:
BBS reads the newest file of each, plain or in an archive. It reads it
again when a newer file arrives. With a nodelist:
- netmail to a node it lacks, or has as down, is refused as it is
written, and the writer is told the system's name and place when it is
sent;
- `host = nodelist` has a link called where its nodelist entry says (its
IBN flag's host, or its INA);
- `bbs fido node` and `bbs fido nodes` look systems up, and callers can
too: **N** (PF5 on a 3270) in their mailbox searches the nodelist.
- The BBS refuses netmail to a node that is not in the nodelist, or that
the nodelist shows as down, when the user writes it. When the user
sends netmail, the BBS tells the user the name and place of the
system.
- `host = nodelist` makes the BBS call a link at the address in its
nodelist entry (the host of its IBN flag, or its INA).
- `bbs fido node` and `bbs fido nodes` look up systems. Callers can also
do this: **N** (PF5 on a 3270) in their mailbox searches the nodelist.
Only zones that the nodelists cover are checked. Netmail for other zones,
and for links, is sent without a check.
The BBS checks only the zones that the nodelists cover. It sends netmail
for other zones, and for links, without a check.
## AreaFix and FileFix
A link with `areafix = yes` manages its own echoes. Out of the echoes
that `echoes` (and `fileechoes`) allow, it gets the ones it asks for, by
sending netmail to AreaFix (or AreaMgr) and FileFix (or FileMgr, AllFix,
Raid, TicFix) with its `areafix_password` as the subject and one command
per line:
A link with `areafix = yes` manages its own echoes. From the echoes that
`echoes` (and `fileechoes`) permit, it gets the echoes that it asks for.
To ask, it sends netmail to AreaFix (or AreaMgr) and FileFix (or
FileMgr, AllFix, Raid, TicFix) with its `areafix_password` as the
subject and one command on each line:
```
+FSX_GEN link it (a pattern too: +FSX_*)
@@ -149,42 +164,47 @@ per line:
```
The answer comes back by netmail. The sysop can do the same from the
command line (`bbs fido link`, `unlink`, `filelink`, `fileunlink`) and see
what a link has (`bbs fido subs`). A link without `areafix` gets every
echo that `echoes` allows.
command line (`bbs fido link`, `unlink`, `filelink`, `fileunlink`), and
see the echoes of a link (`bbs fido subs`). A link without `areafix`
gets all echoes that `echoes` permits.
In the other direction, `bbs fido areafix hub COMMAND...` (or `filefix`)
writes to a link's robot with `areafix_password`. With `create = yes` on
that link, the echoes and file echoes it then sends are created here (as
a message area, or a sysop-upload file area, named by the tag) instead of
being dropped.
writes to the robot of a link with `areafix_password`. With
`create = yes` on that link, the BBS creates the echoes and file echoes
that the link then sends (as a message area, or a sysop-upload file
area, with the tag as the name). It does not discard them.
## File echoes
A file area becomes a file echo with `bbs filearea echo AREA TAG`. Files
arrive with TICs (FTS-5006). Each file is checked (that it came from the
link with its `tic_password`, its size and CRC-32, that it is not a
duplicate, and that it has not already passed this system), put in the
area with its description, and passed on with its own TIC to the other
links that carry the echo and are not in its SEEN-BY. A TIC's `Replaces`
removes the older files it names, among those that came by a file echo.
Files uploaded here (by callers, by FTP or with `bbs file add`) are
hatched, which means sent to every link that carries the echo. A file
that does not match its TIC goes to `dir/bad`, and a TIC waits a day for
its file. As with echomail, the first scan for a link only marks where to
start.
arrive with TICs (FTS-5006). The BBS does these steps for each file:
1. It checks the file: that it came from the link with its
`tic_password`, its size and CRC-32, that it is not a duplicate, and
that it did not already go through this system.
2. It puts the file in the area with its description.
3. It sends the file with its own TIC to the other links that carry the
echo and are not in its SEEN-BY.
The `Replaces` of a TIC removes the older files that it names, from the
files that came by a file echo. The BBS hatches files that are uploaded
here (by callers, by FTP or with `bbs file add`). This means that it
sends them to all links that carry the echo. If a file does not agree
with its TIC, it goes to `dir/bad`. A TIC waits one day for its file. As
with echomail, the first scan for a link only records the start point.
## Testing
The BBS was tested against binkd 1.1a and CrashMail II 1.7, with echomail
and netmail in both directions, both calling binkd and being called by it,
with ZIP bundles and CRAM-MD5. Bundles made by the real `arc`, `arj` and
`jlha` are tossed correctly, and those tools unpack what the BBS writes.
We tested the BBS against binkd 1.1a and CrashMail II 1.7, with
echomail and netmail in the two directions. The BBS called binkd, and
binkd called the BBS, with ZIP bundles and CRAM-MD5. The BBS tosses
bundles from the real `arc`, `arj` and `jlha` correctly, and those tools
unpack the bundles that the BBS writes.
## Not supported
File requests (FREQ), routing other systems' netmail, binkp's NR mode,
CRYPT and multiple batches (the BBS speaks binkp/1.0, which every mailer
accepts), and EMSI for mailers calling by modem.
File requests (FREQ), the routing of netmail from other systems, the NR
mode of binkp, CRYPT and multiple batches (the BBS uses binkp/1.0, which
all mailers accept), and EMSI for mailers that call by modem.
**See also:** [Newsgroups and NNTP](Newsgroups-and-NNTP), [Security](Security)
+36 -26
View File
@@ -1,43 +1,53 @@
As well as using FTP, callers can move files over their own connection to
the BBS. This page covers the transfer protocols for text callers and
Callers can use FTP. They can also move files over their own connection
to the BBS. This page gives the transfer protocols for text callers, and
IND$FILE for 3270 callers.
## Text callers
Text callers (telnet, modem, rlogin) open a file's details and press *D*
to download it, or press *U* in an area to upload, and then choose a
protocol:
Text callers (telnet, modem, rlogin) use this procedure:
1. To download a file, open the details of the file and push *D*.
2. To upload a file, push *U* in an area.
3. Select a protocol:
| Key | Protocol | Notes |
|---|---|---|
| X | XMODEM | CRC, or checksum if the terminal program asks; 128-byte blocks |
| X | XMODEM | CRC, or checksum if the terminal program asks for it. 128-byte blocks |
| 1 | XMODEM-1K | 1K blocks |
| Y | YMODEM | batch: names and exact sizes |
| Z | ZMODEM | batch, CRC-32, error recovery; most terminal programs start it by themselves |
| K | Kermit | for 7-bit lines and anything else that fails |
| Z | ZMODEM | batch, CRC-32, error recovery. Most terminal programs start it automatically |
| K | Kermit | for 7-bit lines, and for all other cases where the other protocols fail |
XMODEM does not send a file name, so the BBS asks for one. Names that a
terminal program sends lose any path (`C:\DOS\GAME.ZIP` becomes
`GAME.ZIP`) and any characters the file areas do not accept. An upload
goes through the same checks, size limit and daily allowance as an FTP
upload, and is kept only if it arrived complete. XMODEM, YMODEM and ZMODEM
need an 8-bit clean line: a modem, rlogin, or telnet in binary mode (the
BBS asks for binary mode, and warns a client that refuses).
XMODEM does not send a file name. Thus, the BBS asks for a name. The BBS
removes the path from names that a terminal program sends
(`C:\DOS\GAME.ZIP` becomes `GAME.ZIP`). It also removes the characters
that the file areas do not accept. An upload goes through the same
checks, size limit and daily allowance as an FTP upload. The BBS keeps the
upload only if it is complete.
XMODEM, YMODEM and ZMODEM must have an 8-bit clean line: a modem, rlogin,
or telnet in binary mode. The BBS asks for binary mode. If a client does
not accept binary mode, the BBS shows a warning to the client.
## 3270 callers
3270 callers use their emulator's file transfer, IND$FILE. In a file area
(8 on the main menu, then S beside an area), with the cursor on the
command line, start a transfer: *send* to upload into the area, or
*receive* to download one of its files, with the file's name as the host
file name. The emulator types `IND$FILE PUT name` or `IND$FILE GET name`,
and the BBS plays the host's part in DFT mode (structured fields), as
TSO's IND$FILE does.
3270 callers use the file transfer of their emulator, IND$FILE. Use this
procedure:
1. Go to a file area (8 on the main menu, then S adjacent to an area).
2. Put the cursor on the command line.
3. Start a transfer. Use *send* to upload into the area, or *receive* to
download one of its files. Use the name of the file as the host file
name.
The emulator types `IND$FILE PUT name` or `IND$FILE GET name`. The BBS
does the work of the host in DFT mode (structured fields), as the
IND$FILE of TSO does.
Binary mode keeps a file exactly as it is. ASCII with CR/LF stores text
with CR LF line ends and gives it back the way the PC expects. Both the
TSO and VM/CMS host types work. The emulator must support DFT (x3270,
c3270, wc3270 and PCOMM do; *Your terminal* shows reply 95, Distributed
Data Management).
with CR LF line ends, and gives it back in the format that the PC
expects. Both the TSO and VM/CMS host types operate. The emulator must
support DFT. x3270, c3270, wc3270 and PCOMM support it. *Your terminal*
shows reply 95, Distributed Data Management.
**See also:** [Files and FTP](Files-and-FTP), [TN3270](TN3270)
+57 -51
View File
@@ -1,39 +1,40 @@
File areas hold files for callers to download and upload. Callers browse
them on the BBS (*F* on the main menu), and can also use an FTP client,
logging in with their BBS name and password; each area is a directory
there.
File areas contain files that callers can download and upload. Callers
look at the file areas on the BBS (*F* on the main menu). They can also
use an FTP client, and log in with their BBS name and password. On FTP,
each area is a directory.
## On the BBS
| Action | Key | PF | What it does |
|---|---|---|---|
| an area | its number | `S` by it | its files, by name |
| new files | `N` | PF5 | the files added since your last call (the last 30 days on a first call), in every area, newest first |
| find | `F` | PF10 | files whose name or descriptions have the words (in any case) |
| batch | `B` | | the files tagged, to download together (text terminals) |
| an area | its number | `S` adjacent to it | shows its files, by name |
| new files | `N` | PF5 | shows the files that came after your last call (the last 30 days on a first call), in all areas, newest first |
| find | `F` | PF10 | shows the files that have the words in their name or descriptions (with upper or lower case) |
| batch | `B` | | shows the tagged files, to download them together (text terminals) |
A file's details show its description and, for an archive, a longer
description. If an archive is uploaded with a `FILE_ID.DIZ` at its top
level, that file becomes the long description, and its first meaningful
line becomes the description unless the uploader gave one. (CP437 art is
decoded, colours and control characters are removed, and at most 20
lines are kept.) From the details, a caller can:
The details of a file show its description. For an archive, they also
show a longer description. If an uploaded archive has a `FILE_ID.DIZ` at
its top level, that file becomes the long description. If the uploader
did not give a description, the first line of that file with useful text
becomes the description. (The BBS decodes CP437 art, removes colours and
control characters, and keeps a maximum of 20 lines.) From the details,
a caller can do these actions:
| Action | Key | PF | Notes |
|---|---|---|---|
| download | `D` | | by a transfer protocol ([File transfers](File-Transfers)) |
| tag | `T` | | into the batch, or out of it |
| view | `V` | PF6 | what is in a ZIP, tar or tar.gz: names, sizes, dates |
| describe, remove | `E`, `R` | PF5, PF9 | its uploader's or a sysop's |
| download | `D` | | with a transfer protocol ([File transfers](File-Transfers)) |
| tag | `T` | | puts the file into the batch, or removes it |
| view | `V` | PF6 | shows the contents of a ZIP, tar or tar.gz: names, sizes, dates |
| describe, remove | `E`, `R` | PF5, PF9 | for the uploader or a sysop |
In an area, `T` tags files by number (`1 3 5-7`), and `*` marks the
tagged ones. The batch is sent all at once by YMODEM, ZMODEM or Kermit
(XMODEM sends only one file). A file counts as downloaded, and leaves the
batch, once the protocol has moved on to the next file or the transfer
has ended successfully. The day's downloads and the
[ratio](Access-Levels) are checked for the whole batch before it starts.
On a 3270, files are uploaded and downloaded with IND$FILE on the area's
command line (see [TN3270](TN3270)).
In an area, `T` tags files by number (`1 3 5-7`). A `*` shows the tagged
files. The BBS sends the full batch together with YMODEM, ZMODEM or
Kermit (XMODEM sends only one file). A file counts as downloaded, and
leaves the batch, when the protocol starts the next file or when the
transfer ends correctly. Before the batch starts, the BBS checks the
downloads of the day and the [ratio](Access-Levels) for the full batch.
On a 3270, callers upload and download files with IND$FILE on the
command line of the area (refer to [TN3270](TN3270)).
```
; bbs.conf
@@ -61,35 +62,40 @@ bbs file list Games
## The FTP server
The FTP server is built on
[ftpserverlib](https://github.com/fclairamb/ftpserverlib) with the BBS's
own file system: `/` lists the areas, each area lists its files, and
nothing else on the server's disk can be reached. Files are stored under
their record's number (`files_dir/1`, `files_dir/2` and so on), so a name a
user gives never becomes a path. Users can:
The FTP server uses
[ftpserverlib](https://github.com/fclairamb/ftpserverlib) with the file
system of the BBS. `/` lists the areas, and each area lists its files.
Users cannot get to other items on the disk of the server. The BBS
stores each file with the number of its record (`files_dir/1`,
`files_dir/2` and other numbers). Thus, a name from a user never becomes
a path. Users can do these actions:
- download anything (resuming too);
- upload a new file into an area (not a sysop-only one), whose name is
letters, digits and a few marks (no dots in front, no slashes, nothing a
shell or Windows minds), up to `max_file_size` and what is left of
`upload_quota`; an upload is written to a temporary file, hashed, and
only then recorded and put in place;
- delete their own files (sysops any).
- Download all files (also with resume).
- Upload a new file into an area (but not into an area for the sysop
only). The name must contain only letters, digits and some marks (no
dots at the start, no slashes, no characters that cause problems for a
shell or Windows). The maximum size is `max_file_size` and the
remainder of `upload_quota`. The BBS writes an upload to a temporary
file and calculates its hash. Only then does it record the file and
put it in its location.
- Delete their own files (sysops can delete all files).
Everything else (overwriting, appending, resuming uploads, renaming,
directories, SITE, MFMT, CHMOD) is refused. Active mode is off, to prevent
FTP bounce attacks, and data connections must come from the same address
as the control connection. Logins are checked like any BBS login, with
its failure delay and throttling by address.
The server refuses all other actions (overwrite, append, resume of
uploads, rename, directories, SITE, MFMT, CHMOD). Active mode is
disabled, to prevent FTP bounce attacks. Data connections must come from
the same address as the control connection. The BBS checks logins in the
same way as all BBS logins, with the failure delay and the throttling by
address.
`tls = required` (the default) refuses `USER` before TLS, so no password
crosses the network in the clear. `implicit` uses TLS from the first byte.
`optional` and `no` are there for old clients, and `bbs check` warns about
them. `anonymous = yes` lets `anonymous` and `ftp` log in to download
only.
`tls = required` (the default) refuses `USER` before TLS. Thus, no
password goes across the network in clear text. `implicit` uses TLS from
the first byte. `optional` and `no` are for old clients, and `bbs check`
gives a warning about them. `anonymous = yes` lets `anonymous` and `ftp`
log in, to download only.
Open the FTP port and the passive port range in the firewall. An FTP
session is not a node: it does not appear in Who's online or count against
`max_nodes`. `[ftp] max_clients` and `max_per_ip` limit FTP sessions.
session is not a node. It does not show in Who's online, and it does not
count against `max_nodes`. `[ftp] max_clients` and `max_per_ip` set the
limits of FTP sessions.
**See also:** [File transfers](File-Transfers), [Security](Security)
+64 -50
View File
@@ -1,13 +1,16 @@
Three small servers tell the world about the BBS. Finger shows who is on
and who a user is. Gopher serves the system's own gopherspace, with the
message and file areas the sysop opens to it. Gemini serves the same
capsule, and finger's users, over TLS. Each is off unless its section is
in the configuration.
Three small servers give the world data about the BBS:
Finger's and gopher's usual ports are below 1024, so either run the BBS with
`AmbientCapabilities=CAP_NET_BIND_SERVICE` (see
- Finger shows the users who are on, and data about a user.
- Gopher serves the gopherspace of the system, with the message and file
areas that the sysop opens to it.
- Gemini serves the same capsule, and the users of finger, over TLS.
Each server is disabled until you put its section in the configuration.
The usual ports of finger and gopher are below 1024. Thus, run the BBS
with `AmbientCapabilities=CAP_NET_BIND_SERVICE` (refer to
[bbs.service.sample](https://github.com/D-Modem/bbs/blob/HEAD/bbs.service.sample)),
or use another port.
or use a different port.
## Finger
@@ -37,9 +40,9 @@ Calls: 14
Posts: 5
```
Finger never shows addresses, caller IDs or anything about locked
accounts, and it forwards nothing (`user@otherhost` is refused).
`online = no` and `users = no` turn off its two halves.
Finger never shows addresses, caller IDs or data about locked accounts.
It forwards nothing (it refuses `user@otherhost`). `online = no` and
`users = no` disable its two parts.
## Gopher
@@ -55,17 +58,19 @@ max_per_ip = 8
```
The root menu has *About this system* (name, location, sysop, number of
users and the message of the day), *Who's online*, and, if the sysop has
opened them, *Message areas* and *File areas*. An area lists its messages
50 at a time (oldest first, with *More...*). A message is served as text,
and a file as it is (type 9, or as an image for GIF, PNG and JPEG).
users and the message of the day) and *Who's online*. If the sysop
opened them, it also has *Message areas* and *File areas*. An area lists
its messages 50 at a time (oldest first, with *More...*). The server
sends a message as text. It sends a file as it is (type 9, or as an
image for GIF, PNG and JPEG).
Gopher has no login, so everything it shows, it shows to anyone. That is
why it shows no message areas and no files by default, and `bbs check`
warns when `areas` or `files` is set. `areas` matches area names in any
case (`*` matches all of them), and an area that does not match cannot be
reached, whatever is asked. Selectors are not paths: they name records in
the BBS's database, and nothing on the server's disk can be reached.
Gopher has no login. Thus, it shows all its data to all users. For this
reason, it shows no message areas and no files by default, and `bbs
check` gives a warning when you set `areas` or `files`. `areas` matches
area names with upper or lower case (`*` matches all of them). Users
cannot get to an area that does not match, for all requests. Selectors
are not paths. They name records in the database of the BBS. Users
cannot get to items on the disk of the server.
```
$ curl gopher://bbs.example.org/1/areas
@@ -87,22 +92,26 @@ max_clients = 32
max_per_ip = 8
```
[Gemini](https://geminiprotocol.net/) is gopher's younger cousin: one
request a connection, always over TLS, pages in gemtext. The capsule is
gopher's: the home page links *About this system*, *Who's online*, *Look
up a user* (it asks for a name and shows what finger would) and, if the
sysop opened them, *Message areas* and *File areas*. `gemini://host/~alice`
goes straight to a user. A message is a gemtext page with its headers
first; its lines are shown as text, so a line in a message cannot become
a link or a heading. A file goes as it is, typed by its name
(`application/octet-stream` if the name says nothing).
[Gemini](https://geminiprotocol.net/) is a newer protocol that is
similar to gopher. It uses one request for each connection, always over
TLS, with pages in gemtext. The capsule is the same as the capsule of
gopher. The home page has links to *About this system*, *Who's online*
and *Look up a user* (it asks for a name and shows the same data as
finger). If the sysop opened them, it also has links to *Message areas*
and *File areas*. `gemini://host/~alice` goes directly to a user.
Gemini clients trust a capsule's certificate the first time they see it
and warn if it ever changes, so self-signed certificates are the usual
thing. The BBS never makes one by itself: with no `cert_file` and
`key_file`, make one with `bbs gemini cert` before starting it. It asks
what goes in the certificate, shows it, and makes it only when you say
yes:
A message is a gemtext page with its headers first. The server shows its
lines as text. Thus, a line in a message cannot become a link or a
heading. The server sends a file as it is, with a type from its name
(`application/octet-stream` if the name does not give a type).
Gemini clients trust the certificate of a capsule the first time that
they see it. They give a warning if it changes. Thus, self-signed
certificates are usual. The BBS never makes a certificate automatically.
If there is no `cert_file` and `key_file`, make one with
`bbs gemini cert` before you start the BBS. The command asks for the
contents of the certificate and shows them. It makes the certificate
only when you say yes:
```
$ bbs -config /etc/bbs/bbs.conf gemini cert
@@ -121,21 +130,26 @@ Make it? (yes/no) [no]: yes
Made: bbs.example.org, gemini.example.org until 2046-11-09, SHA-256 3F2A...
```
The first host name is the certificate's common name; addresses (IPv4 or
IPv6) can be listed too. The files go beside the database
(`gemini-cert.pem`, `gemini-key.pem`). Keep them with your backups: a new
certificate makes every client that has been before warn, which is why
`bbs gemini cert` will not replace one without `-force` (and then keeps
the old one as `.old`). `bbs check` shows the certificate's names, expiry
and SHA-256 fingerprint, or that there is none yet; without one, `bbs
serve` stops and says to make it. A certificate from a certificate
authority (Let's Encrypt's, say) works too: set `cert_file` and
`key_file`.
The first host name is the common name of the certificate. You can also
list addresses (IPv4 or IPv6). The files go adjacent to the database
(`gemini-cert.pem`, `gemini-key.pem`). Keep them with your backups. A
new certificate causes a warning on all clients that connected before.
For this reason, `bbs gemini cert` does not replace a certificate
without `-force` (and with `-force`, it keeps the old certificate as
`.old`).
What gopher shows anyone, Gemini shows anyone: no areas and no files by
default, `bbs check` warns when `areas` or `files` is set, and file areas
with a download requirement are never shown. `users = no` turns off the
user lookup. Port 1965 is above 1024 and needs no privilege.
`bbs check` shows the names, the expiry date and the SHA-256 fingerprint
of the certificate, or it tells you that there is no certificate yet. If
there is no certificate, `bbs
serve` stops and tells you to make one. A certificate from a certificate
authority (for example, Let's Encrypt) also operates: set `cert_file`
and `key_file`.
Gemini shows all users the same data that gopher shows all users. By
default, it shows no areas and no files. `bbs check` gives a warning
when you set `areas` or `files`. Gemini never shows file areas that have
a download requirement. `users = no` disables the user lookup. Port 1965
is above 1024 and does not need a privilege.
```
$ amfora gemini://bbs.example.org
+147 -134
View File
@@ -1,10 +1,10 @@
The BBS has an HTTP API for programs and web front ends: REST for
accounts, message areas, mail and files; server-sent events; and
WebSockets for chat, in JSON or protobuf. A web client is a node like
any other: it shows in *Who's online*, chats with terminal callers, gets
node messages and can page the sysop.
The BBS has an HTTP API for programs and web front ends. It has REST for
accounts, message areas, mail and files, server-sent events, and
WebSockets for chat, in JSON or protobuf. A web client is a node, as all
other clients are. It shows in *Who's online*, chats with terminal
callers, gets node messages and can page the sysop.
It is on when `bbs.conf` has an `[http]` section:
The API is enabled when `bbs.conf` has an `[http]` section:
```ini
[http]
@@ -17,29 +17,29 @@ key_file = /etc/bbs/tls/key.pem
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:8443` | where it listens |
| `tls` | `yes` | TLS needs `cert_file` and `key_file`. `tls = no` is for `127.0.0.1` behind a proxy that has TLS; `bbs check` warns about it on any other address |
| `trusted_proxies` | (none) | reverse proxies in front (addresses or CIDR ranges, by spaces or commas), believed when they say whose a request is: [below](#behind-a-proxy) |
| `secure_cookies` | as `tls` | the forum's and image boards' login cookies go over HTTPS only; say `yes` when a proxy in front has the TLS |
| `address` | `:8443` | the address on which it listens |
| `tls` | `yes` | TLS must have `cert_file` and `key_file`. `tls = no` is for `127.0.0.1` behind a proxy that has TLS. `bbs check` gives a warning about it on all other addresses |
| `trusted_proxies` | (none) | reverse proxies in front (addresses or CIDR ranges, with spaces or commas between them). The server believes them when they tell the source of a request: [below](#behind-a-proxy) |
| `secure_cookies` | as `tls` | the login cookies of the forum and image boards go over HTTPS only. Set `yes` when a proxy in front has the TLS |
| `anonymous` | `yes` | `/system` and `/who` without a token |
| `cors` | (none) | one browser origin allowed to call the API (no `*`); WebSockets are accepted only from it and the API's own host |
| `cors` | (none) | one browser origin that can call the API (no `*`). The API accepts WebSockets only from this origin and from its own host |
| `metrics` | (none) | an address for Prometheus metrics, `/metrics` (keep it private) |
| `max_per_ip` | `20` | connections at once from one address |
| `rate`, `burst` | `10`, `20` | requests a second per token (per address without one), and how many may come at once |
| `session_hours` | `24` | how long a login's token lasts |
| `max_per_ip` | `20` | the maximum number of connections at one time from one address |
| `rate`, `burst` | `10`, `20` | requests each second for each token (for each address without a token), and the number that can come at one time |
| `session_hours` | `24` | the validity of the token of a login |
| `terminal` | `yes` | the web terminal page (below) |
| `forum`, `forum_guests`, `forum_theme`, `forum_flags` | `yes`, `yes`, `ipb3`, `yes` | the [web forum](Web-Forum), guests reading it, and its theme (`ipb3`, `ipb5`, `ipb4`, `ipb2`, `ipb1`, `ikon`, `vb6`, `vb5`, `vb4`, `vb3`, `vb2`, `vblite`, `xf23`, `xf2`, `xf1`, `mybb18`, `mybb16`, `mybb12`, `pun14`, `flux15`, `pun12`, `yabb25`, `yabb2`, `yabb1`, `smf30`, `smf21`, `smf20`, `smf1`, `phpbb33`, `phpbb32`, `phpbb31`, `phpbb30`, `phpbb2` or `phpbb1`) |
| `chan` | `yes` | the [image boards](Image-Boards) at `/chan/` (set up in `[chan]`) |
| `forum`, `forum_guests`, `forum_theme`, `forum_flags` | `yes`, `yes`, `ipb3`, `yes` | the [web forum](Web-Forum), guest access to it, and its theme (`ipb3`, `ipb5`, `ipb4`, `ipb2`, `ipb1`, `ikon`, `vb6`, `vb5`, `vb4`, `vb3`, `vb2`, `vblite`, `xf23`, `xf2`, `xf1`, `mybb18`, `mybb16`, `mybb12`, `pun14`, `flux15`, `pun12`, `yabb25`, `yabb2`, `yabb1`, `smf30`, `smf21`, `smf20`, `smf1`, `phpbb33`, `phpbb32`, `phpbb31`, `phpbb30`, `phpbb2` or `phpbb1`) |
| `chan` | `yes` | the [image boards](Image-Boards) at `/chan/` (configured in `[chan]`) |
The OpenAPI 3.1 description is at `/api/v1/openapi.json`.
## Behind a proxy
The server can sit behind a reverse proxy (nginx, Caddy, HAProxy, a load
balancer) that handles TLS. Every request then comes from the proxy's
address, so list the proxy in `trusted_proxies`, and the server will
trust it to say which caller each request is from:
The server can be behind a reverse proxy (nginx, Caddy, HAProxy, a load
balancer) that does the TLS. Then all requests come from the address of
the proxy. Thus, put the proxy in `trusted_proxies`. Then the server
trusts the proxy to tell the caller of each request:
```ini
[http]
@@ -60,89 +60,91 @@ location / {
}
```
The caller's address is the last address in `X-Forwarded-For` (or else
`Forwarded`'s `for=`, or else `X-Real-IP`) that is not a trusted proxy.
Any addresses before it are whatever the caller sent, and are not
trusted. That address is then used for the request everywhere: rate
limits, logins and the logs, the forum, the web terminal's throttling, the
[image boards](Image-Boards)' flood control and bans, and the
`[security]` deny lists and bans (a refused caller gets 403). Connections
from a trusted proxy are not held to `max_per_ip`, because they carry
many callers. Requests from anywhere else are taken as they come, and
their forwarding headers are ignored.
The address of the caller is the last address in `X-Forwarded-For` (or
the `for=` of `Forwarded`, or `X-Real-IP`) that is not a trusted proxy.
The caller sent the addresses before it, and the server does not trust
them. The server then uses that address for the request in all
functions: rate limits, logins and the logs, the forum, the throttling
of the web terminal, the flood control and bans of the
[image boards](Image-Boards), and the `[security]` deny lists and bans
(a refused caller gets 403). Connections from a trusted proxy do not
count against `max_per_ip`, because they carry many callers. The server
accepts requests from all other sources as they come, and ignores their
forwarding headers.
## Tokens and scopes
Every request but `/login`, `/openapi.json` and (when `anonymous = yes`)
`/system` and `/who` needs a token: `Authorization: Bearer bbs_...`.
All requests except `/login`, `/openapi.json` and (when
`anonymous = yes`) `/system` and `/who` must have a token:
`Authorization: Bearer bbs_...`.
- A **session**: `POST /api/v1/login` with `{"name": ..., "password": ...}`
(and `"scopes"`, to have fewer) returns `{"token": ..., "expires": ...}`.
(and `"scopes"`, for fewer scopes) gives `{"token": ..., "expires": ...}`.
`POST /api/v1/logout` ends it.
- An **API key**, for a program: `bbs token add alice -scope read,post
-expires 90 -name "my bot"` prints it once. `bbs token list [USER]` and
`bbs token revoke ID` manage them, and users see and revoke their own at
`/api/v1/me/tokens`.
-expires 90 -name "my bot"` prints it one time. `bbs token list [USER]`
and `bbs token revoke ID` manage them. Users see and revoke their own
keys at `/api/v1/me/tokens`.
Only a hash of a token is kept. A locked user's tokens stop working.
The BBS keeps only a hash of a token. The tokens of a locked user stop.
| Scope | Allows |
|---|---|
| `read` | the account, users, message areas and messages, last read |
| `post` | posting |
| `mail` | reading, sending and deleting mail |
| `chat` | the event stream, WebSockets, node messages, paging |
| `files` | file areas, uploading and downloading |
| `sysop` | `/admin/...` (only for a sysop's tokens) |
| `post` | posts |
| `mail` | read, send and delete mail |
| `chat` | the event stream, WebSockets, node messages, pages |
| `files` | file areas, uploads and downloads |
| `sysop` | `/admin/...` (only for the tokens of a sysop) |
## REST
Every endpoint is under `/api/v1` and takes and returns JSON (except
All endpoints are under `/api/v1`. They accept and give JSON (except
uploads and downloads).
Errors are `{"error": "...", "code": "..."}`.
| Request | What it does | Scope |
|---|---|---|
| `POST /login`, `POST /logout` | a session token; ending it | (none), any |
| `POST /login`, `POST /logout` | gives a session token. Ends it | (none), any |
| `GET /system` | the name, sysop, counts, features | anonymous |
| `GET /who` | who is online (with each `terminal`, as it said what it is, and `country`, ISO 3166, where it is known) | anonymous |
| `GET /who` | the users who are online (with each `terminal`, as it identified itself, and `country`, ISO 3166, if known) | anonymous |
| `GET /callers?limit=` | the last callers, newest first | read |
| `GET`, `PATCH /me` | your account, access and settings; change your location, a line about yourself (`about`), password or settings (`{"prefs": {"ansi": "off"}}`; `""` forgets one) | read |
| `GET /me/tokens`, `DELETE /me/tokens/{id}` | your tokens; revoke one | any |
| `GET`, `PATCH /me` | your account, access and settings. Change your location, a line about yourself (`about`), password or settings (`{"prefs": {"ansi": "off"}}`. `""` removes one) | read |
| `GET /me/tokens`, `DELETE /me/tokens/{id}` | your tokens. Revokes one | any |
| `GET /me/keys` | your SSH keys | read |
| `POST /me/keys`, `DELETE /me/keys/{id}` | add an SSH key (`{"key": "ssh-ed25519 ..."}`, from a login's session only); delete one | any |
| `POST /me/keys`, `DELETE /me/keys/{id}` | adds an SSH key (`{"key": "ssh-ed25519 ..."}`, from the session of a login only). Deletes one | any |
| `GET /users`, `/users/{name}` | users | read |
| `GET /areas`, `/areas/{id}` | message areas, with your unread | read |
| `GET /areas/{id}/messages?after=&limit=&body=no` | messages after an id (200 at most) | read |
| `POST /areas/{id}/messages` | post: `{"subject", "body", "reply_to", "alias": true, "poll": ["answer", ...]}` | post |
| `PUT /areas/{id}/lastread` | mark read up to a message | read |
| `GET /areas`, `/areas/{id}` | message areas, with your unread messages | read |
| `GET /areas/{id}/messages?after=&limit=&body=no` | messages after an id (a maximum of 200) | read |
| `POST /areas/{id}/messages` | posts: `{"subject", "body", "reply_to", "alias": true, "poll": ["answer", ...]}` | post |
| `PUT /areas/{id}/lastread` | marks the area as read up to a message | read |
| `GET /messages/{id}` | a message | read |
| `GET /mail`, `GET`, `DELETE /mail/{id}` | your inbox; a mail (marked read); delete it | mail |
| `POST /mail` | send: to a user, or `Name@zone:net/node` as netmail | mail |
| `GET /qwk?mark=no` | your [QWK packet](Offline-Mail) (`X-QWK-Messages`: how many); its messages then count as read, unless `mark=no` | mail |
| `GET /mail`, `GET`, `DELETE /mail/{id}` | your inbox. A mail (marked as read). Deletes it | mail |
| `POST /mail` | sends: to a user, or `Name@zone:net/node` as netmail | mail |
| `GET /qwk?mark=no` | your [QWK packet](Offline-Mail) (`X-QWK-Messages`: the number of messages). Its messages then count as read, unless `mark=no` | mail |
| `POST /qwk/rep` | a REP packet (the body): `{"posted", "mailed", "duplicates", "errors"}` | mail and post |
| `GET /fileareas`, `/fileareas/{id}/files`, `/files/{id}` | file areas and files | files |
| `POST /fileareas/{id}/files?name=&description=` | upload: the body is the file | files |
| `GET /files/{id}/content` | download (ranges work) | files |
| `GET /messages/{id}/thread` | the message's thread from its start, with each one's depth | read |
| `POST /messages/{id}/vote`, `POST /messages/{id}/answer` | vote (`{"value": 1}`, -1, 0); answer a poll (`{"answer": 0}`) | post |
| `POST /fileareas/{id}/files?name=&description=` | uploads: the body is the file | files |
| `GET /files/{id}/content` | downloads (ranges operate) | files |
| `GET /messages/{id}/thread` | the thread of the message from its start, with the depth of each message | read |
| `POST /messages/{id}/vote`, `POST /messages/{id}/answer` | votes (`{"value": 1}`, -1, 0). Answers a poll (`{"answer": 0}`) | post |
| `GET /files?q=` or `?since=` | files by words in their names and descriptions, or added since a time (RFC 3339), newest first | files |
| `GET /admin/bans`, `DELETE /admin/bans/{ip}` | addresses banned for failed logins; lift a ban | sysop |
| `GET /admin/hacklog?lines=` | the hack log's last lines | sysop |
| `GET /admin/events`, `POST /admin/events/{name}/run` | the scheduled events; run one now | sysop |
| `PUT /admin/available` | `{"available": false}`: pages reach no sysop | sysop |
| `GET /files/{id}/listing` | what is in an archive (ZIP, tar, tar.gz); 422 for another file | files |
| `GET /admin/bans`, `DELETE /admin/bans/{ip}` | addresses banned for failed logins. Removes a ban | sysop |
| `GET /admin/hacklog?lines=` | the last lines of the hack log | sysop |
| `GET /admin/events`, `POST /admin/events/{name}/run` | the scheduled events. Runs one now | sysop |
| `PUT /admin/available` | `{"available": false}`: pages go to no sysop | sysop |
| `GET /files/{id}/listing` | the contents of an archive (ZIP, tar, tar.gz). 422 for other files | files |
| `GET /chat/rooms` | chat rooms in use | chat |
| `POST /nodes/{n}/message`, `POST /page` | a line to a node; page the sysop (both need an open stream) | chat |
| `POST /nodes/{n}/message`, `POST /page` | a line to a node. Pages the sysop (the two must have an open stream) | chat |
| `GET /events` | server-sent events | chat or read |
| `GET /ws`, `GET /ws/proto` | WebSockets | chat |
| `GET /admin/pages`, `POST /admin/pages/{node}/answer` | pages waiting; answer one (node 0: the longest waiting) | sysop |
| `POST /admin/users`, `PATCH /admin/users/{name}` | add a user; lock, unlock, make sysop, set password, `level`, `flags`, `qwk_node` | sysop |
| `POST /admin/areas`, `PATCH /admin/areas/{id}` | add an area; set its newsgroup, echo tag, `read_require`, `post_require` | sysop |
| `POST /admin/nodes/{n}/kick` | throw a caller off | sysop |
| `GET /admin/fido`, `POST /admin/fido/poll` | FidoNet links and outbound; call them now | sysop |
| `GET /admin/news`, `POST /admin/news/sync` | news peers; sync now | sysop |
| `GET /admin/qwknet`, `POST /admin/qwknet/call?net=` | [QWK networks](Offline-Mail#qwk-networks); call their hubs now | sysop |
| `GET /admin/pages`, `POST /admin/pages/{node}/answer` | the pages that wait. Answers one (node 0: the page that waited longest) | sysop |
| `POST /admin/users`, `PATCH /admin/users/{name}` | adds a user. Lock, unlock, make sysop, set password, `level`, `flags`, `qwk_node` | sysop |
| `POST /admin/areas`, `PATCH /admin/areas/{id}` | adds an area. Sets its newsgroup, echo tag, `read_require`, `post_require` | sysop |
| `POST /admin/nodes/{n}/kick` | disconnects a caller | sysop |
| `GET /admin/fido`, `POST /admin/fido/poll` | FidoNet links and outbound. Calls them now | sysop |
| `GET /admin/news`, `POST /admin/news/sync` | news peers. Syncs now | sysop |
| `GET /admin/qwknet`, `POST /admin/qwknet/call?net=` | [QWK networks](Offline-Mail#qwk-networks). Calls their hubs now | sysop |
```sh
TOKEN=$(curl -s https://bbs.example.org:8443/api/v1/login \
@@ -154,51 +156,52 @@ curl -s -H "Authorization: Bearer $TOKEN" https://bbs.example.org:8443/api/v1/ar
## Streams and nodes
The event stream and each WebSocket take a node, just as a caller does
(`Via` is `web`). The node counts against `max_nodes`, shows in *Who's
online*, and receives the node's events: lines said in its chat room,
node messages, pages (for sysops), new mail and notices. The node ends
when the connection does. `POST /nodes/{n}/message`, `/page` and answering a
page are done from the token's open stream (409 without one). A page
that reaches no sysop is 503 (`unavailable`), as the WebSocket's Page
request answers it, and is not left waiting.
The event stream and each WebSocket take a node, as a caller does (`Via`
is `web`). The node counts against `max_nodes`, shows in *Who's online*,
and gets the events of the node: lines in its chat room, node messages,
pages (for sysops), new mail and notices. The node ends when the
connection ends. You must send `POST /nodes/{n}/message`, `/page` and
the answer to a page from the open stream of the token (409 without
one). A page that gets to no sysop gives 503 (`unavailable`), as the
Page request of the WebSocket answers it. The page does not wait.
### Server-sent events
`GET /api/v1/events` (with the `Authorization` header; a browser does
this with `fetch`, as `EventSource` cannot send headers) starts with
`event: welcome` (its node and user), then sends each event as
`GET /api/v1/events` (with the `Authorization` header. A browser does
this with `fetch`, because `EventSource` cannot send headers) starts
with `event: welcome` (its node and user). Then it sends each event as
`event: said` (`emoted`, `joined`, `left`, `private`, `paged`, `notice`,
`mail`) with the event as JSON in `data:`, and a comment every 25
seconds to keep it open.
`mail`), with the event as JSON in `data:`. It sends a comment every 25
seconds to keep the connection open.
## WebSockets
Two endpoints speak the same protocol, `bbs.v1`, defined in
Two endpoints use the same protocol, `bbs.v1`, defined in
[`proto/bbs.proto`](https://github.com/D-Modem/bbs/blob/HEAD/proto/bbs.proto):
| Endpoint | Subprotocol | Frames |
|---|---|---|
| `/api/v1/ws` | `bbs.v1.json` | text: protobuf's JSON mapping (lowerCamelCase fields, enums by name, RFC 3339 times) |
| `/api/v1/ws` | `bbs.v1.json` | text: the JSON mapping of protobuf (lowerCamelCase fields, enums by name, RFC 3339 times) |
| `/api/v1/ws/proto` | `bbs.v1.proto` | binary: protobuf |
The client sends `ClientMessage`s with an `id` of its choosing; each is
answered by `ServerMessage`s with that `id`: `ok` (with `room` when the
client's room changed), `error` (`code` and `message`), or what was asked
for. Events and the welcome come with id 0.
The client sends `ClientMessage`s with an `id` that it selects. The
server answers each with `ServerMessage`s with that `id`: `ok` (with
`room` when the room of the client changed), `error` (`code` and
`message`), or the requested data. Events and the welcome come with id
0.
A browser cannot set headers on a WebSocket, so unless the upgrade had an
`Authorization` header the first message must be `auth`, within 10
seconds. The token needs the `chat` scope.
A browser cannot set headers on a WebSocket. Thus, unless the upgrade
had an `Authorization` header, the first message must be `auth`, within
10 seconds. The token must have the `chat` scope.
| Request | Answer |
|---|---|
| `auth {token}` | `welcome {bbs, user, node, scopes}` |
| `join {room}` | `lines` (the room's last lines), then `ok {room}` |
| `join {room}` | `lines` (the last lines of the room), then `ok {room}` |
| `leave {}` | `ok` |
| `say {text, emote}` | `ok`; the room gets the line |
| `say {text, emote}` | `ok`. The room gets the line |
| `nodeMessage {node, text}` | `ok` |
| `page {reason}` | `ok {room}`: the private room to wait in (the client is put in it) |
| `page {reason}` | `ok {room}`: the private room in which to wait (the server puts the client in it) |
| `answer {node}` | sysops: `lines`, `ok {room}` |
| `command {line}` | a line as typed in chat (`/who`, `/rooms`, `/msg`, `/join` ...): `lines`, `ok` |
| `who {}` | `nodes {nodes: [{node, user, via, since, doing}]}` |
@@ -220,7 +223,8 @@ A session in JSON (`>` from the client):
```
Clients of the protobuf endpoint generate code from `proto/bbs.proto`
(`protoc --go_out=...`, `--python_out=...` and so on). In JavaScript:
(`protoc --go_out=...`, `--python_out=...` and other options). In
JavaScript:
```js
const ws = new WebSocket("wss://bbs.example.org:8443/api/v1/ws", "bbs.v1.json");
@@ -232,57 +236,66 @@ ws.onmessage = (m) => {
};
```
The server pings every 30 seconds. Frames are at most 16 KB; a frame
that does not read is answered by an error, and the same limits as on a
terminal apply (200 characters a line, 8 lines in 10 seconds).
The server pings every 30 seconds. Frames have a maximum of 16 KB. The
server answers a frame that it cannot read with an error. The same limits
as on a terminal apply (200 characters for each line, 8 lines in 10
seconds).
## The web terminal
`/terminal` (and `/`, which goes there when the [web forum](Web-Forum) is off) is the BBS in a browser: a page
with [xterm.js](https://xtermjs.org/) (5.5, MIT licensed, built into the
`bbs` binary: nothing is loaded from elsewhere) whose terminal is joined
to the text BBS by a WebSocket, `/terminal/ws`. The caller is a node like
a telnet caller (*Who's online* says `web terminal`) and logs in at the
BBS's own prompt, as on telnet: no token. They get ANSI colour and UTF-8
(ANSI art's CP437 shown as Unicode), menus, messages, mail, chat, paging
and doors; not file transfers (download files by the API or FTP). Its
xterm.js has the image addon, so the [image boards](Image-Boards)'
pictures (sixel) show in it.
`/terminal` is the BBS in a browser. (`/` goes there when the
[web forum](Web-Forum) is disabled.) It is a page with
[xterm.js](https://xtermjs.org/) (5.5, MIT licensed, part of the `bbs`
binary: the page loads nothing from other locations). A WebSocket,
`/terminal/ws`, connects its terminal to the text BBS. The caller is a
node, as a telnet caller is (*Who's online* says `web terminal`). The
caller logs in at the prompt of the BBS, as on telnet: no token is
necessary.
The caller gets ANSI colour and UTF-8 (the CP437 of ANSI art shows as
Unicode), menus, messages, mail, chat, paging and doors. The caller does
not get file transfers (download files by the API or FTP). Its xterm.js
has the image addon. Thus, the pictures (sixel) of the
[image boards](Image-Boards) show in it.
| Path | What it serves |
|---|---|
| `GET /terminal` | the page |
| `GET /terminal/xterm.js`, `addon-fit.js`, `addon-image.js`, `terminal.js`, `xterm.css`, `terminal.css`, `LICENSE.xterm` | its files |
| `GET /terminal/ws?cols=&rows=` | the WebSocket, subprotocol `bbs.terminal`: binary frames, the terminal's bytes both ways; the size the page fits its window to (40-255 columns, 10-200 rows), kept for the call |
| `GET /terminal/ws?cols=&rows=` | the WebSocket, subprotocol `bbs.terminal`: binary frames, the bytes of the terminal in the two directions. The size to which the page fits its window (40-255 columns, 10-200 rows), kept for the call |
The page allows scripts only from the BBS itself, cannot be framed, and
The page permits scripts only from the BBS, cannot be in a frame, and
accepts WebSockets only from its own host (and the `cors` origin).
Connections count against `max_per_ip` and `rate`, and logins count
against the throttle as a terminal's do. Behind a proxy on 127.0.0.1
without `trusted_proxies`, throttling is up to the proxy, because the BBS
sees every caller as the proxy. `terminal = no` turns the page off.
Connections count against `max_per_ip` and `rate`. Logins count against
the throttle, as the logins of a terminal do. Behind a proxy on
127.0.0.1 without `trusted_proxies`, the proxy must do the throttling,
because the BBS sees all callers as the proxy. `terminal = no` disables
the page.
## Metrics
With `metrics = 127.0.0.1:9100`, `/metrics` there has, in Prometheus's
text format: `bbs_nodes`, `bbs_nodes_by_via{via}`, `bbs_max_nodes`,
`bbs_users`, `bbs_messages`, `bbs_logins_total`,
`bbs_login_failures_total`, `bbs_posts_total`, `bbs_mail_total`,
`bbs_pages_total`, `bbs_chat_lines_total`, `bbs_pages_waiting` and
`bbs_fido_outbound_files{link}`.
With `metrics = 127.0.0.1:9100`, `/metrics` at that address has these
items, in the text format of Prometheus: `bbs_nodes`,
`bbs_nodes_by_via{via}`, `bbs_max_nodes`, `bbs_users`, `bbs_messages`,
`bbs_logins_total`, `bbs_login_failures_total`, `bbs_posts_total`,
`bbs_mail_total`, `bbs_pages_total`, `bbs_chat_lines_total`,
`bbs_pages_waiting` and `bbs_fido_outbound_files{link}`.
## Security
- TLS by default; tokens never go in URLs (only in the `Authorization`
header or a WebSocket's first message).
- Tokens are 32 random bytes; only their SHA-256 is stored. A wrong
token waits as a wrong password does, and failed logins are logged and
counted like a terminal's.
- Rate limits per token (per address without one), connections per
address, JSON bodies at most 64 KB with unknown fields refused,
uploads limited as on the BBS.
- No CORS unless one origin is named; WebSockets from origins other than
it and the API's own host are refused. Responses carry `nosniff` and `no-store`.
- What web clients say and post is cleaned as a terminal caller's is.
- TLS by default. Tokens never go in URLs (only in the `Authorization`
header or the first message of a WebSocket).
- Tokens are 32 random bytes. The BBS stores only their SHA-256. After
an incorrect token, the server waits as it does after an incorrect
password. The BBS logs and counts failed logins as for a terminal.
- Rate limits for each token (for each address without a token),
connections for each address, JSON bodies of a maximum of 64 KB with
unknown fields refused, and uploads with the same limits as on the
BBS.
- No CORS unless you name one origin. The server refuses WebSockets from
origins other than that origin and its own host. Responses have
`nosniff` and `no-store`.
- The BBS cleans the text that web clients send and post, as it cleans
the text of a terminal caller.
**See also:** [Chat and paging](Chat-and-Paging), [Security](Security), [Configuration](Configuration)
+69 -68
View File
@@ -1,16 +1,16 @@
<img src="https://raw.githubusercontent.com/D-Modem/bbs/main/.github/banner.png" alt="D-Modem/bbs: A bulletin board for every caller" width="100%">
bbs is a bulletin board system in Go for telnet, SSH, TN3270 and modem
callers, and part of the [D-Modem suite](https://github.com/D-Modem/D-Modem).
This is its documentation: how to set it up, how to run it, and how to use
everything it does.
callers. It is part of the [D-Modem suite](https://github.com/D-Modem/D-Modem).
This is its documentation: how to configure it, how to run it, and how to
use all its functions.
One telnet port serves every kind of terminal. A TN3270 client (x3270,
One telnet port serves all types of terminal. A TN3270 client (x3270,
c3270, wc3270, Vista, PCOMM) gets full 3270 screens with PF keys, through
[go3270](https://github.com/D-Modem/go3270). Any other client gets a text
BBS with ANSI colour where the terminal has it. Modem callers come in
through the D-Modem suite: [app_dmodem](https://github.com/D-Modem/D-Modem)
straight from Asterisk, or [modemmenu](https://github.com/D-Modem/menu)
[go3270](https://github.com/D-Modem/go3270). All other clients get a text
BBS, with ANSI colour if the terminal has it. Modem callers connect
through the D-Modem suite: through [app_dmodem](https://github.com/D-Modem/D-Modem)
directly from Asterisk, or through [modemmenu](https://github.com/D-Modem/menu)
after its login.
```
@@ -34,105 +34,106 @@ Main menu
| If you want to | Read |
|---|---|
| Try it out in a few minutes | [Building](Building), then [Running](Running) |
| Set up a board for real | [Running](Running), [Configuration](Configuration), [Databases](Databases), [Backups](Backups) |
| Look after a running board | [Administration](Administration), [Sysop tools](Sysop-Tools), [Access levels](Access-Levels) |
| Make it look like your own | [Customization](Customization), [Scripting](Scripting) |
| Try it in a few minutes | [Building](Building), then [Running](Running) |
| Configure a board for real use | [Running](Running), [Configuration](Configuration), [Databases](Databases), [Backups](Backups) |
| Manage a board that runs | [Administration](Administration), [Sysop tools](Sysop-Tools), [Access levels](Access-Levels) |
| Give it your own appearance | [Customization](Customization), [Scripting](Scripting) |
| Take calls by modem | [Modem callers](Modem-Callers) |
| Join FidoNet, QWK networks or Usenet | [FidoNet](FidoNet), [Offline mail](Offline-Mail#qwk-networks), [Newsgroups and NNTP](Newsgroups-and-NNTP) |
| Give users e-mail addresses | [E-mail](E-mail) |
| Put the board on the web | [Web forum](Web-Forum), [Image boards](Image-Boards), [HTTP API](HTTP-API) |
| Work on the code | [Development](Development) |
Every setting is listed in the [Configuration reference](Configuration-Reference),
which is generated from `bbs.conf.sample`.
The [Configuration reference](Configuration-Reference) lists all the
settings. The build makes it from `bbs.conf.sample`.
## What it does
**For callers**
- [Message areas](Message-Areas) with new scans, searching, threads, votes
and polls, written in a [full-screen editor](Writing-Messages)
- Private mail, chat rooms, node messages and [paging the sysop](Chat-and-Paging)
- Who's online (with how each caller came in), the user list, the last
callers, feedback to the sysop, and a profile of their own
- [Message areas](Message-Areas) with new scans, search, threads, votes
and polls, written in a [full-screen editor](Writing-Messages).
- Private mail, chat rooms, node messages and [pages to the sysop](Chat-and-Paging).
- Who's online (with the route of each caller), the user list, the last
callers, feedback to the sysop, and a profile for each caller.
- [File areas](Files-and-FTP) with X/Y/ZMODEM, Kermit and IND$FILE
[transfers](File-Transfers), and an FTP (FTPS) server
[transfers](File-Transfers), and an FTP (FTPS) server.
- [Offline mail](Offline-Mail): QWK packets of new messages, and REP packets
of replies
of replies.
- [Doors](Doors): DOS door games in dosemu2, Linux programs, and door
networks such as BBSLink and DoorParty
networks such as BBSLink and DoorParty.
**Terminals**
- [TN3270](TN3270) screens with PF keys, and 3270 graphics where the
emulator has them
- [SSH](SSH), with passwords or keys
- [Commodore 64s in PETSCII and RIPscrip terminals](PETSCII-and-RIP)
- [TN3270](TN3270) screens with PF keys, and 3270 graphics if the
emulator has them.
- [SSH](SSH), with passwords or keys.
- [Commodore 64s in PETSCII and RIPscrip terminals](PETSCII-and-RIP).
- [VT terminals](Terminal-Identification), with DEC line drawing, monochrome
and VT52 support
- [Sixel graphics](Sixel-Graphics) for the logo and pictures
and VT52 support.
- [Sixel graphics](Sixel-Graphics) for the logo and pictures.
**Networks**
- [FidoNet](FidoNet) and other FTN networks: echomail, netmail, file
echoes, AreaFix and a built-in binkp mailer
- [E-mail](E-mail): each user an address, their BBS mail read over IMAP
and POP3 and sent over SMTP, to and from the internet
echoes, AreaFix and a built-in binkp mailer.
- [E-mail](E-mail): an address for each user. Users read their BBS mail
over IMAP and POP3, and send it over SMTP, to and from the internet.
- [Newsgroups](Newsgroups-and-NNTP) served by NNTP and exchanged with other
news servers
- [IRC](IRC), where the chat rooms are channels, [AIM and ICQ](AIM-and-ICQ)
for AIM and ICQ clients on the same chat, [MSN Messenger](MSN-Messenger)
for MSN clients, [Yahoo! Messenger](Yahoo-Messenger) for Yahoo clients, and [MRC](MRC), the chat
network shared with other BBSes
news servers.
- [IRC](IRC), where the chat rooms are channels. [AIM and ICQ](AIM-and-ICQ)
for AIM and ICQ clients on the same chat. [MSN Messenger](MSN-Messenger)
for MSN clients. [Yahoo! Messenger](Yahoo-Messenger) for Yahoo clients. [MRC](MRC), the chat
network shared with other BBSes.
- [News, weather and quotes](News-Weather-and-Quotes): news feeds as read-only
areas, each caller's weather, and stock quotes from IEX
- [Finger, gopher and Gemini](Finger-and-Gopher)
- [Time](Time): NTP, NTS and PTP, followed and served
areas, the weather of each caller, and stock quotes from IEX.
- [Finger, gopher and Gemini](Finger-and-Gopher).
- [Time](Time): NTP, NTS and PTP. The BBS follows time servers and serves
time.
**On the web**
- [A web forum](Web-Forum) of the message areas, in the style of classic
forum software (Invision Power Board, vBulletin, phpBB and many more)
forum software (Invision Power Board, vBulletin, phpBB and many more).
- [Image boards](Image-Boards) in the style of kusaba x and 4chan, also
shown on the terminals
shown on the terminals.
- [A web terminal](HTTP-API#the-web-terminal) and an [HTTP API](HTTP-API)
with REST, server-sent events and WebSockets
with REST, server-sent events and WebSockets.
**For the sysop**
- New users who sign themselves up (or not, with `new_users = no`), and
[access levels](Access-Levels) with flags, daily limits and validation
- New users who sign up themselves (or not, with `new_users = no`), and
[access levels](Access-Levels) with flags, daily limits and validation.
- [Customization](Customization) with ANSI art, 3270 screens, menus and
prompts, and [scripting](Scripting) in JavaScript
prompts, and [scripting](Scripting) in JavaScript.
- [SQLite, PostgreSQL, MySQL or MariaDB](Databases), with `bbs db copy`
between them
between them.
- [Backups](Backups) while callers are on, [security](Security)
settings to keep callers out, and [certificates](Certificates) from
Let's Encrypt and other ACME CAs, got and renewed
Let's Encrypt and other ACME CAs, which the BBS gets and renews.
## All pages
| Page | What it covers |
|---|---|
| [Building](Building) | Go, the go3270 fork, `make` |
| [Running](Running) | the first start, systemd, running as its own user |
| [Running](Running) | the first start, systemd, the BBS as its own user |
| [Administration](Administration) | the `bbs` command: users, areas, files, mail exchange |
| [Sysop tools](Sysop-Tools) | the sysop's menu inside the BBS, and scheduled events |
| [Sysop tools](Sysop-Tools) | the menu of the sysop inside the BBS, and scheduled events |
| [Configuration](Configuration) | `bbs.conf`: its sections, listeners and configuration screens |
| [Configuration reference](Configuration-Reference) | every section and key |
| [Databases](Databases) | SQLite, PostgreSQL, MySQL and MariaDB, and moving between them |
| [Backups](Backups) | making backups, and restoring them |
| [Configuration reference](Configuration-Reference) | all sections and keys |
| [Databases](Databases) | SQLite, PostgreSQL, MySQL and MariaDB, and how to move between them |
| [Backups](Backups) | how to make backups, and how to restore them |
| [Customization](Customization) | screens (ANSI art, 3270), menus, prompts |
| [Scripting](Scripting) | the sysop's own screens in JavaScript, on every terminal |
| [Scripting](Scripting) | the screens of the sysop in JavaScript, on all terminals |
| [Access levels](Access-Levels) | levels, flags, requirements, daily limits, validation |
| [SSH](SSH) | the SSH listener, keys, host keys |
| [Modem callers](Modem-Callers) | app_dmodem and modemmenu, and where callers are |
| [Modem callers](Modem-Callers) | app_dmodem and modemmenu, and the locations of callers |
| [TN3270](TN3270) | 3270 terminals, PF keys, 3270 graphics |
| [Sixel graphics](Sixel-Graphics) | the logo and pictures on sixel terminals |
| [PETSCII and RIP](PETSCII-and-RIP) | Commodore 64s and 128s; RIPscrip graphics and buttons |
| [Terminal identification](Terminal-Identification) | how VT terminals are recognised: DEC graphics, monochrome, VT52 |
| [Message areas](Message-Areas) | reading, new scans, searching, votes and polls |
| [Terminal identification](Terminal-Identification) | how the BBS recognises VT terminals: DEC graphics, monochrome, VT52 |
| [Message areas](Message-Areas) | how to read, new scans, search, votes and polls |
| [Writing messages](Writing-Messages) | the full-screen editor, the line editor, the 3270 editor |
| [Offline mail](Offline-Mail) | QWK packets, REP replies, QWK networks |
| [Files and FTP](Files-and-FTP) | file areas, the FTP (FTPS) server |
@@ -141,28 +142,28 @@ which is generated from `bbs.conf.sample`.
| [E-mail](E-mail) | addresses, IMAP, POP3, SMTP, the MX, a smarthost, DNS |
| [Newsgroups and NNTP](Newsgroups-and-NNTP) | the NNTP server, news peers |
| [FidoNet](FidoNet) | echomail, netmail, binkp, file echoes, AreaFix, nodelists |
| [Chat and paging](Chat-and-Paging) | chat rooms, node messages, paging the sysop |
| [Chat and paging](Chat-and-Paging) | chat rooms, node messages, pages to the sysop |
| [IRC](IRC) | the IRC server, with the chat rooms as channels |
| [AIM and ICQ](AIM-and-ICQ) | the OSCAR server: AIM and ICQ clients, buddies, IMs and chat rooms |
| [IRC server linking](IRC-Linking) | The BBS as a hub server on an IRC network (TS6 or P10): every user reachable there |
| [AOL clients](AOL) | a host for AOL's own clients (3.0, 4.0): sign-on with BBS accounts |
| [IRC server linking](IRC-Linking) | The BBS as a hub server on an IRC network (TS6 or P10): all users are on that network |
| [AOL clients](AOL) | a host for the clients of AOL (3.0, 4.0): sign-on with BBS accounts |
| [MSN Messenger](MSN-Messenger) | the MSN server: MSN Messenger 1.0 to 7.5, contacts and IMs |
| [MSN Classic](MSN-Classic) | The Microsoft Network for Windows 95's client: sign-in, the areas as Categories, bulletin boards |
| [MSN Classic](MSN-Classic) | The Microsoft Network for the client of Windows 95: sign-in, the areas as Categories, bulletin boards |
| [Yahoo! Messenger](Yahoo-Messenger) | the Yahoo server: YMSG 9 to 16, buddies, IMs, chat rooms and conferences |
| [MRC](MRC) | Multi Relay Chat: chat rooms shared with other BBSes |
| [News, weather and quotes](News-Weather-and-Quotes) | news feeds, NWS and Open-Meteo weather, USGS earthquakes, IEX quotes |
| [Finger, gopher and Gemini](Finger-and-Gopher) | who is on, and the BBS in gopherspace and Geminispace |
| [Time](Time) | NTP, NTS and PTP: the clock following time servers, and serving time |
| [Finger, gopher and Gemini](Finger-and-Gopher) | the users who are on, and the BBS in gopherspace and Geminispace |
| [Time](Time) | NTP, NTS and PTP: the clock follows time servers, and the BBS serves time |
| [Web forum](Web-Forum) | the message areas as a web forum |
| [Image boards](Image-Boards) | anonymous image boards, in the style of kusaba x and 4chan |
| [HTTP API](HTTP-API) | REST, events, WebSockets in JSON and protobuf, tokens, metrics |
| [Security](Security) | what is guarded, and how |
| [Certificates](Certificates) | the ACME client: Let's Encrypt and ZeroSSL certificates for every TLS server, renewed |
| [Development](Development) | the source's layout, the shared screens, the tests |
| [Security](Security) | the protection that the BBS gives, and how |
| [Certificates](Certificates) | the ACME client: Let's Encrypt and ZeroSSL certificates for all TLS servers, with renewal |
| [Development](Development) | the layout of the source, the shared screens, the tests |
## More
- The wiki is also a website: [d-modem.github.io/bbs](https://d-modem.github.io/bbs/).
- Planned work is in [TODO.md](https://github.com/D-Modem/bbs/blob/HEAD/TODO.md).
- The other parts of the suite are listed in the
[README](https://github.com/D-Modem/bbs#the-d-modem-suite).
- The list of planned work is in [TODO.md](https://github.com/D-Modem/bbs/blob/HEAD/TODO.md).
- The [README](https://github.com/D-Modem/bbs#the-d-modem-suite) lists the
other parts of the suite.
+95 -86
View File
@@ -1,22 +1,25 @@
The BBS can be a server on an IRC network: a hub that links to any
number of other servers, in and out, and routes between them. It speaks
TS6, the server protocol of Solanum (Libera.Chat), charybdis,
ircd-ratbox and ircd-hybrid (EFnet), and P10, that of ircu (Undernet).
It needs no ircd of its own.
The BBS can be a server on an IRC network: a hub that links to many
other servers, in and out, and routes between them. It uses TS6, the
server protocol of Solanum (Libera.Chat), charybdis, ircd-ratbox and
ircd-hybrid (EFnet). It also uses P10, the server protocol of ircu
(Undernet). It does not need its own ircd.
- **Every BBS user is on the network.** Whoever is online, on a terminal,
a 3270, the web, [IRC](IRC), [AIM or ICQ](AIM-and-ICQ), is a user there
under their name (`Carol Ann` is `Carol_Ann`). Anyone on the network can
`/msg` and `/whois` them; the message reaches them however they came.
- **The rooms beginning `irc-` are the network's channels.** `irc-retro`
is `#retro`: whoever is in the room is in the channel, and talk in one is
talk in the other. The network's users are in the room's member list.
- **A taken nick is never fought over.** When a BBS user comes on and
their nick is in use on the network, or a link comes up with someone
there by that nick, the BBS user is renamed `Nick|Tag`, Tag being the
BBS's short tag (`alice|DM`). It is cut to fit the network's nick length,
and numbered (`alice|DM2`) if that too is taken. The BBS user's name on
the BBS does not change.
- **All BBS users are on the network.** All online users, on a terminal,
a 3270, the web, [IRC](IRC), [AIM or ICQ](AIM-and-ICQ), are users
there with their names (`Carol Ann` is `Carol_Ann`). All users on the
network can `/msg` and `/whois` them. The message goes to them on the
route that they use.
- **The rooms that start with `irc-` are the channels of the network.**
`irc-retro` is `#retro`. The users in the room are in the channel, and
text in one goes to the other. The users of the network are in the
member list of the room.
- **The BBS never fights for a nick that is in use.** Sometimes a BBS
user comes on and the nick is in use on the network. Or a link starts,
and a user there has that nick. In these cases, the BBS gives the BBS
user the name `Nick|Tag`, where Tag is the short tag of the BBS
(`alice|DM`). The BBS cuts it to the nick length of the network. If
that nick is also in use, the BBS adds a number (`alice|DM2`). The
name of the BBS user on the BBS does not change.
```ini
[irclink]
@@ -33,34 +36,34 @@ accept_password = its-to-us
| Setting | Default | What it sets |
|---|---|---|
| `server_name` | (required) | the BBS's server name on the network |
| `server_name` | (required) | the server name of the BBS on the network |
| `sid` | (required) | its TS6 server ID: a digit and two letters or digits, unique on the network |
| `numeric` | (none) | its P10 server numeric, 0 to 4095, unique on the network (needed for a P10 link) |
| `description` | the BBS's name | its description, in `LINKS` |
| `network` | the BBS's name | the network's name, as `WHOIS` of its users shows it on the BBS |
| `tag` | the BBS name's first letters | `Nick\|Tag` for a BBS user whose nick is taken |
| `host` | `server_name` | the BBS users' host, as the network sees them (`alice!bbs@host`) |
| `prefix` | `irc-` | the rooms that are channels (`none`: every room but `sysop-` ones) |
| `nick_length` | `30` (`12` with a P10 peer) | the network's `NICKLEN` (Solanum's is 31 less one; ratbox and hybrid: 9; ircu: 12) |
| `address` | `:7000` | where servers link in (`none`: nowhere) |
| `tls_address`, `tls_cert`, `tls_key` | (none) | servers linking in by TLS |
| `numeric` | (none) | its P10 server numeric, 0 to 4095, unique on the network (necessary for a P10 link) |
| `description` | the name of the BBS | its description, in `LINKS` |
| `network` | the name of the BBS | the name of the network, as the `WHOIS` of its users shows it on the BBS |
| `tag` | the first letters of the BBS name | `Nick\|Tag` for a BBS user whose nick is in use |
| `host` | `server_name` | the host of the BBS users, as the network sees them (`alice!bbs@host`) |
| `prefix` | `irc-` | the rooms that are channels (`none`: all rooms except `sysop-` rooms) |
| `nick_length` | `30` (`12` with a P10 peer) | the `NICKLEN` of the network (the value of Solanum is 31 minus one. ratbox and hybrid: 9. ircu: 12) |
| `address` | `:7000` | the address where servers link in (`none`: no address) |
| `tls_address`, `tls_cert`, `tls_key` | (none) | servers that link in by TLS |
| `retry` | `30` | seconds between tries of a link out |
Each server the BBS links with directly has an `[ircpeer NAME]`, its name
being the server's:
Each server with a direct link to the BBS has an `[ircpeer NAME]`. Its
name is the name of the server:
| Setting | Default | What it sets |
|---|---|---|
| `address` | (none: it links in) | where to link out to; the BBS links again whenever the link drops |
| `address` | (none: it links in) | the address to link out to. The BBS links again each time that the link stops |
| `tls` | `no` | link out by TLS |
| `tls_verify` | `yes` | check its certificate (`no` for a self-signed one) |
| `send_password` | (required) | the password the BBS sends (its `accept_password`) |
| `accept_password` | (required) | the password it must send (its `send_password`) |
| `tag` | its name's first letters | its users' tag, beside a BBS user of the same nick |
| `protocol` | `ts6` | `ts6` (Solanum, charybdis, ratbox), `hybrid` (ircd-hybrid 8, whose TS6 differs) or `p10` (ircu); one linking in is told apart by its handshake |
| `tls_verify` | `yes` | check its certificate (`no` for a self-signed certificate) |
| `send_password` | (required) | the password that the BBS sends (its `accept_password`) |
| `accept_password` | (required) | the password that it must send (its `send_password`) |
| `tag` | the first letters of its name | the tag of its users, adjacent to a BBS user with the same nick |
| `protocol` | `ts6` | `ts6` (Solanum, charybdis, ratbox), `hybrid` (ircd-hybrid 8, which has a different TS6) or `p10` (ircu). For a server that links in, the BBS finds the protocol from its handshake |
The other side's `connect` block names the BBS's `server_name`, with the
passwords the other way round. For Solanum:
The `connect` block of the other side names the `server_name` of the
BBS, with the passwords in the opposite direction. For Solanum:
```
connect "irc.bbs.example.org" {
@@ -73,17 +76,17 @@ connect "irc.bbs.example.org" {
};
```
A server name, SID, password or address that is wrong, or a server already
on the network by another way (a loop), is refused with an `ERROR` that
says why.
The BBS refuses an incorrect server name, SID, password or address. It
also refuses a server that is already on the network through a different
route (a loop). It sends an `ERROR` that gives the reason.
## With ircu (P10)
An ircu network is linked the same way, with `numeric` set in `[irclink]`
and `protocol = p10` on the peer. ircu has one password for a link, both
ways, so `send_password` and `accept_password` are the same. Its
`Connect` block names the BBS, and needs `hub;` if the BBS is to bring
other servers behind it:
You link an ircu network in the same way. Set `numeric` in `[irclink]`
and `protocol = p10` on the peer. ircu has one password for a link, in
the two directions. Thus, `send_password` and `accept_password` are the
same. Its `Connect` block names the BBS. It must have `hub;` if the BBS
will bring other servers behind it:
```ini
[irclink]
@@ -109,59 +112,65 @@ Connect {
};
```
ircu's users come with their accounts (`+r`), as `WHOIS` on the BBS
shows them; the BBS's users go to it with theirs. Its nick length is 12
unless its `NICKLEN` feature says otherwise: set `nick_length` to match,
or ircu refuses a longer nick.
The users of ircu come with their accounts (`+r`), as `WHOIS` on the BBS
shows them. The users of the BBS go to ircu with their accounts. The
nick length of ircu is 12, unless its `NICKLEN` feature gives a
different value. Set `nick_length` to the same value. If not, ircu
refuses a longer nick.
The BBS keeps the network by TS6's names, so it can link TS6 and P10
servers at once, each given the other's servers, users and channels in
its own protocol. Between two P10 servers every line goes as it came;
between P10 and TS6 only what both have goes across: users, nicks,
channels and their members and ops, topics, talk, private messages,
`AWAY`, `KILL`, `WHOIS` and the other queries. Channel modes go across as
`TMODE` and `MODE`, and bans from TS6; G-lines, jupes and ircu's
`CLEARMODE`, `OPMODE` and `ACCOUNT` stay on the P10 side, and TS6's
`ENCAP` on its side.
The BBS keeps the network by the TS6 names. Thus, it can link TS6 and
P10 servers at the same time. Each server gets the servers, users and
channels of the other in its own protocol. Between two P10 servers, each
line goes as it came. Between P10 and TS6, only the items that both
protocols have go across: users, nicks, channels and their members and
ops, topics, talk, private messages, `AWAY`, `KILL`, `WHOIS` and the
other queries. Channel modes go across as `TMODE` and `MODE`, and bans
from TS6. G-lines, jupes and the `CLEARMODE`, `OPMODE` and `ACCOUNT` of
ircu stay on the P10 side. The `ENCAP` of TS6 stays on its side.
## On the BBS
- In the chat, `/msg NICK TEXT` sends to someone on the network (`/msg 3
- In the chat, `/msg NICK TEXT` sends to a user on the network (`/msg 3
TEXT` is still node 3).
- On the BBS's own [IRC server](IRC), the network's users are in the
linked channels' `NAMES` and `WHO`, and `/msg`, `/whois` and `ISON` reach
them as they reach BBS users.
- Someone on the network with the nick of a BBS user online is shown on
the BBS as `Nick|Tag`, with their server's tag (`alice|hub`), so the two
are never confused; `/msg alice|hub` reaches them.
- Topics set on the network are told to the room.
- On the [IRC server](IRC) of the BBS, the users of the network are in
the `NAMES` and `WHO` of the linked channels. `/msg`, `/whois` and
`ISON` go to them as they go to BBS users.
- If a user on the network has the nick of an online BBS user, the BBS
shows that user as `Nick|Tag`, with the tag of their server
(`alice|hub`). Thus, the two users are never confused. `/msg alice|hub`
goes to them.
- The BBS tells the room the topics that users set on the network.
## As a hub
The BBS keeps the network's map: which servers are behind which link,
their users and channels. A server linking in is given everything not
behind it: the servers (`SID`), users (`EUID`, or `UID`), channels
(`SJOIN`) and topics (`TB`). What comes from one link goes on to the
others; a private message goes only toward the one it is for. When a link
drops, the servers behind it are gone from the network (a netsplit): the
rooms are told those users left, and the other links get the `SQUIT`.
The BBS keeps the map of the network: the servers behind each link, and
their users and channels. A server that links in gets all items that
are not behind it: the servers (`SID`), users (`EUID`, or `UID`),
channels (`SJOIN`) and topics (`TB`). Data from one link goes on to the
other links. A private message goes only in the direction of its
recipient. When a link stops, the servers behind it are no longer on the
network (a netsplit). The BBS tells the rooms that those users left, and
the other links get the `SQUIT`.
The BBS sends its burst once the other side's has come (the answer to its
`PING`; P10's `END_OF_BURST`), so a BBS user whose nick the other side has is renamed `Nick|Tag`
before they are sent. When two users of other servers collide, the TS6
rules apply: the newer is killed, or both if they are as old. A BBS user
killed off the network (by an oper, or services) is back on it when they
next log in. Channel modes, bans and the like (`TMODE`, `BMASK`, `ENCAP`
...) are passed on as they come; the BBS sets none of its own.
The BBS sends its burst after the burst of the other side arrives (the
answer to its `PING`. For P10, `END_OF_BURST`). Thus, if the other side
has the nick of a BBS user, the BBS gives that user the name `Nick|Tag`
before it sends the user. When two users of other servers collide, the
TS6 rules apply: the server kills the newer user, or both users if they
have the same age. If an oper or services kill a BBS user from the
network, the user comes back on the network at the next login. The BBS
passes on channel modes, bans and similar items (`TMODE`, `BMASK`,
`ENCAP` ...) as they come. The BBS sets no modes of its own.
The BBS answers `WHOIS`, `VERSION`, `MOTD`, `ADMIN`, `INFO`, `TIME` and
`LINKS` for itself, and passes those for other servers on.
`LINKS` for itself. It passes on these requests for other servers.
## Testing against a real ircd
`internal/irclink`'s `TestLive` links to a real ircd when one is set up:
see the top of `live_test.go`. It has been run against Solanum (built from
its main branch), ircd-hybrid 8.2.43 and ircu 2.10.12.19 (built from
UndernetIRC's `ircu2`, linking both in and out, with `IRCLINK_LIVE_PROTOCOL=p10`).
The `TestLive` of `internal/irclink` links to a real ircd if you
configure one. Refer to the top of `live_test.go`. We ran it against
Solanum (built from its main branch), ircd-hybrid 8.2.43 and ircu
2.10.12.19 (built from the `ircu2` of UndernetIRC, with links in and
out, with `IRCLINK_LIVE_PROTOCOL=p10`).
**See also:** [IRC](IRC), [Chat and paging](Chat-and-Paging), [MRC](MRC)
+169 -153
View File
@@ -1,7 +1,7 @@
The BBS has an IRC server, and its channels are the [chat rooms](Chat-and-Paging).
Someone in HexChat, irssi, WeeChat or any other IRC client talks with
callers on telnet, SSH, 3270s, the web terminal and the API. IRC is
just one more way into the same chat.
The BBS has an IRC server. Its channels are the
[chat rooms](Chat-and-Paging). A user in HexChat, irssi, WeeChat or a
different IRC client talks with callers on telnet, SSH, 3270s, the web
terminal and the API. IRC is only one more route into the same chat.
```ini
[irc]
@@ -15,238 +15,254 @@ tls_key = /etc/bbs/tls.key
|---|---|---|
| `address` | `:6667` | plain IRC (`none`: TLS only) |
| `tls_address` | (none) | IRC over TLS, with `tls_cert` and `tls_key` |
| `server_name` | the host's name | the server's name to clients |
| `network` | the BBS's name | the `NETWORK` clients show |
| `max_clients` | `64` | connections at once |
| `max_per_ip` | `4` | from one address |
| `service` | `BBSServ` | the [services bot](#bbsserv)'s nick |
| `chanserv` | `ChanServ` | the [rooms' bot](#chanserv)'s nick |
| `chanserv_expire` | `90` | days a registered room may go unused before it is dropped (`0`: never) |
| `server_name` | the name of the host | the name of the server that clients see |
| `network` | the name of the BBS | the `NETWORK` that clients show |
| `max_clients` | `64` | the maximum number of connections at one time |
| `max_per_ip` | `4` | the maximum from one address |
| `service` | `BBSServ` | the nick of the [services bot](#bbsserv) |
| `chanserv` | `ChanServ` | the nick of the [bot of the rooms](#chanserv) |
| `chanserv_expire` | `90` | the number of days that a registered room can be unused before the BBS drops it (`0`: never) |
`bbs check` warns about a plain `address` without a `tls_address`,
because passwords then travel in the clear. The deny list and bans in
`[security]` apply as they do everywhere else.
`bbs check` gives a warning about a plain `address` without a
`tls_address`, because then passwords go in clear text. The deny list
and bans in `[security]` apply, as on all other routes.
## Logging in
Every IRC user is a BBS user, logged in with their BBS name and password
in one of these ways:
Each IRC user is a BBS user. The user logs in with the BBS name and
password in one of these ways:
- **SASL PLAIN**, which most clients offer as "SASL" or "account login";
- **the server password** (`PASS`), set to `name:password`, or to the
password alone with your nick as your name.
- **SASL PLAIN**, which most clients offer as "SASL" or "account login".
- **The server password** (`PASS`), set to `name:password`, or to the
password only, with your nick as your name.
Failed logins count towards the throttle and the hack log, like any
other login. The user's access level must allow chat.
Failed logins count towards the throttle and the hack log, as all other
logins do. The access level of the user must permit chat.
Your nick is your BBS name. Spaces and dots become underscores, so
`Carol Ann` is `Carol_Ann`. A client that asked for another nick is
told of the change, and `NICK` can't change it later.
Your nick is your BBS name. Spaces and dots become underscores. Thus,
`Carol Ann` is `Carol_Ann`. If a client asked for a different nick, the
server tells the client about the change. `NICK` cannot change it later.
Each connection is a node, shown in *Who's online* as `irc`. Others can
send it node messages, and the sysop can throw it off like any caller.
Each connection is a node, which *Who's online* shows as `irc`. Other
users can send node messages to it. The sysop can disconnect it, as for
all callers.
## Channels
`#ROOM` is the room ROOM: `#main` is the main room, and any other name
(letters, digits and `-`, up to 20) makes a room. One client can be in
up to 20 at once. Joining shows the room's last 20 lines.
`#ROOM` is the room ROOM. `#main` is the main room. All other names
(letters, digits and `-`, up to 20) make a room. One client can be in up
to 20 rooms at one time. When a client joins, it sees the last 20 lines
of the room.
| On IRC | On the BBS |
|---|---|
| `PRIVMSG #room :text` | a line in the room |
| `/me waves` (CTCP ACTION) | `* alice waves` |
| `PRIVMSG nick :text` | a message to that user's nodes; to one not on, [kept](Chat-and-Paging#private-messages) for them (`301` says so) |
| a caller's node message | a `PRIVMSG` to you |
| `NAMES`, `WHO`, `WHOIS` | who is in a room, on which node and how (`bob!telnet@node3`) |
| `PRIVMSG nick :text` | a message to the nodes of that user. For a user who is not on, the BBS [keeps](Chat-and-Paging#private-messages) it for the user (`301` tells this) |
| the node message of a caller | a `PRIVMSG` to you |
| `NAMES`, `WHO`, `WHOIS` | the users in a room, their nodes and their routes (`bob!telnet@node3`) |
| `LIST` | the rooms in use |
| a page, mail, a notice | a `NOTICE` from the server |
In a room no one has registered, sysops show as channel operators (`@`)
and no one else does. A user can [register a room](#chanserv) with
ChanServ: then its access list says who is opped or voiced on coming in,
and its ops can `MODE +o`/`-o`/`+v`/`-v`, `KICK` and set the topic.
[Permanent](#permanent-rooms) and registered rooms have topics; others
don't. Colours and other formatting are stripped from lines going into
the rooms. A registered room's ops set its [channel modes](#channel-modes).
In a room that no one registered, sysops show as channel operators
(`@`), and no other users do. A user can
[register a room](#chanserv) with ChanServ. Then its access list sets
the users that get op or voice when they come in. Its ops can
`MODE +o`/`-o`/`+v`/`-v`, `KICK` and set the topic.
[Permanent](#permanent-rooms) and registered rooms have topics. Other
rooms do not. The BBS removes colours and other formats from lines that
go into the rooms. The ops of a registered room set its
[channel modes](#channel-modes).
## Channel modes
A registered room has Solanum's channel modes, set by its ops with `MODE`
(`/mode` in the BBS's chat). A room nobody has registered is `+Ccnt`, and
its modes can't change. Like ops and bans, the modes are the room's, so a
caller on the text BBS, AOL or Yahoo is kept out or kept quiet just as an
IRC user is, and they are kept across restarts.
A registered room has the channel modes of Solanum. Its ops set them with
`MODE` (`/mode` in the chat of the BBS). A room that nobody registered is
`+Ccnt`, and its modes cannot change. As ops and bans, the modes belong
to the room. Thus, they keep out or silence a caller on the text BBS, AOL
or Yahoo in the same way as an IRC user. The BBS keeps them across
restarts.
| Mode | What it does |
|---|---|
| `o`, `v` | an operator; a voice |
| `o`, `v` | an operator. A voice |
| `n` | no lines from outside the room (on when registered) |
| `t` | only ops set the topic (on when registered) |
| `s` | secret: not in `LIST` or the BBS's room lists, its members not shown, to those outside |
| `s` | secret: not in `LIST` or the room lists of the BBS. Its members are not shown to users outside |
| `p` | private: no `KNOCK` |
| `m` | moderated: only ops and voices talk |
| `i` | invite only: in by `INVITE`, an `I` mask, or the `i` flag |
| `m` | moderated: only ops and voices can talk |
| `i` | invite only: users come in by `INVITE`, an `I` mask, or the `i` flag |
| `k KEY` | a key to come in: `JOIN #room KEY`, or `/join room KEY` |
| `l N` | at most N users (someone on two nodes counts once) |
| `z` | lines that `m`, `b` or `q` stop go to the ops instead |
| `g` | anyone in the room may `INVITE` |
| `l N` | a maximum of N users (a user on two nodes counts one time) |
| `z` | lines that `m`, `b` or `q` stop go to the ops |
| `g` | all users in the room can `INVITE` |
| `T` | no `NOTICE`s to the room |
| `b MASK` | banned: kept out, and quiet if in |
| `q MASK` | quieted: may not talk |
| `b MASK` | banned: kept out, and silent if in the room |
| `q MASK` | quieted: cannot talk |
| `e MASK` | an exception to `b` and `q` |
| `I MASK` | an exception to `i` |
| `c`, `C` | colours stripped, CTCPs dropped: always on |
| `c`, `C` | colours removed, CTCPs dropped: always on |
A mask is `nick!user@host`, where a BBS user is `Nick!how@nodeN` (how they
came: `irc`, `telnet`, `ssh`...): `+b alice` bans `alice!*@*`, which, nicks
being BBS names, is alice's account, and `+q *!telnet@*` quiets everyone
on telnet. Extbans: `$a` matches every account (so `$~a` no one of ours),
`$a:MASK` an account by name, `$o` sysops. Each list holds 100.
A mask is `nick!user@host`. A BBS user is `Nick!how@nodeN`, where how is
the route (`irc`, `telnet`, `ssh`...). Nicks are BBS names. Thus,
`+b alice` bans `alice!*@*`, which is the account of alice.
`+q *!telnet@*` silences all users on telnet. Extbans: `$a` matches all
accounts (thus `$~a` matches none of our users), `$a:MASK` matches an
account by name, and `$o` matches sysops. Each list holds 100 entries.
An invite lasts an hour, gets past `i`, `k` and `l`, and is used up by
coming in. `KNOCK #room [why]` asks the ops of a room that is invite only,
keyed or full to let you in, once a minute. Sysops and a room's founder
come in always, and sysops, ops and voices always talk; someone with the
`e` flag isn't kept out by bans, and one with `i` gets past `i`, `k` and
`l`. Modes beside these (`f`, `j`, `S`, `P`, `L`...) are refused.
An invite is valid for one hour. It gets past `i`, `k` and `l`, and
the user uses it when the user comes in. `KNOCK #room [why]` asks the ops
of a room that is invite only, keyed or full to let you in, one time
each minute. Sysops and the founder of a room can always come in.
Sysops, ops and voices can always talk. Bans do not keep out a user with
the `e` flag. A user with `i` gets past `i`, `k` and `l`. The BBS
refuses other modes (`f`, `j`, `S`, `P`, `L`...).
A sysop is told of a page by a `NOTICE`. Joining `#sysop-N` answers the
page from node N, just as `/answer` does in the BBS's chat.
A `NOTICE` tells a sysop about a page. If the sysop joins `#sysop-N`, the
sysop answers the page from node N, as `/answer` does in the chat of the
BBS.
Messages kept for you while you were away come as `PRIVMSG`s once you
log in, each with its time: as `server-time` if your client takes it,
otherwise at the start of the line.
Messages that the BBS kept for you while you were away come as
`PRIVMSG`s after you log in, each with its time. The time comes as
`server-time` if your client accepts it. If not, it is at the start of
the line.
The server offers the IRCv3 capabilities `sasl`, `server-time` (the time
of each line, the history replayed on join included), `echo-message`,
`multi-prefix` and `userhost-in-names`.
The server offers these IRCv3 capabilities: `sasl`, `server-time` (the
time of each line, also the history that the server sends again on
join), `echo-message`, `multi-prefix` and `userhost-in-names`.
## Permanent rooms
A room closes when its last caller leaves, unless the sysop makes it
permanent. BBSServ holds a permanent room open, empty or not and across
restarts. It sits in the channel as an operator (`@BBSServ` in `NAMES`
and `WHO`), and `LIST` and BBSServ's `ROOMS` show the room with its
topic even when no one is in it. Permanent rooms are the BBS's own: on
the text BBS and 3270s too, `/rooms` lists them with their topics, and
coming in shows the topic.
permanent. BBSServ keeps a permanent room open, empty or not, and across
restarts. It is in the channel as an operator (`@BBSServ` in `NAMES` and
`WHO`). `LIST` and the `ROOMS` of BBSServ show the room with its topic,
also when no one is in it. Permanent rooms belong to the BBS. Thus, on
the text BBS and 3270s, `/rooms` also lists them with their topics, and
the BBS shows the topic when a user comes in.
| Command | What it does |
|---|---|
| `/msg BBSServ ROOMS` | the permanent rooms (anyone) |
| `/msg BBSServ ROOM ADD #room [topic]` | make a room permanent (the sysop) |
| `/msg BBSServ ROOM TOPIC #room [topic]` | set its topic, or clear it |
| `/msg BBSServ ROOM DEL #room` | permanent no more: it goes with its last caller |
| `/msg BBSServ ROOMS` | the permanent rooms (all users) |
| `/msg BBSServ ROOM ADD #room [topic]` | makes a room permanent (the sysop) |
| `/msg BBSServ ROOM TOPIC #room [topic]` | sets its topic, or clears it |
| `/msg BBSServ ROOM DEL #room` | the room is no longer permanent: it closes with its last caller |
| `TOPIC #room :text` | the sysop sets the topic from the channel |
| `/topic [text]` | in the BBS's chat: the room's topic; the sysop sets it |
| `/topic [text]` | in the chat of the BBS: the topic of the room. The sysop sets it |
| `bbs room list`, `add`, `topic`, `del` | the same from the shell |
When a topic is set, everyone in the room is told: on IRC as a `TOPIC` from
BBSServ, on the BBS as a line ("sysop set the topic: ..."). Changes made
with the `bbs` command reach a running BBS at its next start; those made
through BBSServ apply at once.
When a user sets a topic, the BBS tells all users in the room: on IRC as
a `TOPIC` from BBSServ, and on the BBS as a line ("sysop set the topic:
..."). Changes made with the `bbs` command get to a BBS that runs at its
next start. Changes made through BBSServ apply immediately.
## ChanServ
ChanServ looks after registered rooms: who founded each, and who has which
flags there. A room is registered by someone in it, who becomes its
founder and is opped. Like everything about rooms, it holds for every way
in: a caller on the text BBS, AOL, Yahoo or AIM is opped, voiced, kept out
or put out just as an IRC user is. Talk to it with `/msg ChanServ COMMAND`
or `/CS COMMAND`; on the text BBS, `/cs COMMAND` in chat.
ChanServ manages registered rooms: the founder of each room, and the
flags of each user there. A user in a room registers it. That user
becomes its founder and gets op. As for all room data, this applies on
all routes: ChanServ gives op or voice to a caller on the text BBS, AOL,
Yahoo or AIM, or keeps or puts that caller out, in the same way as an
IRC user. Talk to it with `/msg ChanServ COMMAND` or `/CS COMMAND`. On
the text BBS, use `/cs COMMAND` in chat.
| Command | Needs | What it does |
|---|---|---|
| `REGISTER #room` | to be in it | makes the room yours |
| `DROP #room` | the founder | unregisters it |
| `INFO #room` | | its founder, when registered and last used, settings, topic |
| `INFO #room` | | its founder, when it was registered and last used, settings, topic |
| `FLAGS #room` | `A` | the access list |
| `FLAGS #room nick +flags-flags` | `f` | changes an entry; a template (`VOP`, `AOP`, `SOP`, `FOUNDER`) sets it, `-*` takes it off |
| `OP`, `DEOP #room [nick ...]` | `o` | ops you, or them |
| `VOICE`, `DEVOICE #room [nick ...]` | `v` | voices you, or them |
| `FLAGS #room nick +flags-flags` | `f` | changes an entry. A template (`VOP`, `AOP`, `SOP`, `FOUNDER`) sets it. `-*` removes it |
| `OP`, `DEOP #room [nick ...]` | `o` | gives or removes op for you, or for them |
| `VOICE`, `DEVOICE #room [nick ...]` | `v` | gives or removes voice for you, or for them |
| `TOPIC #room [text]` | `t` | sets the topic |
| `INVITE #room` | `i` | invites you in (past `+i`, `+k` and `+l`, for the hour) |
| `INVITE #room` | `i` | invites you in (past `+i`, `+k` and `+l`, for one hour) |
| `GETKEY #room` | `i` | tells you the key |
| `KICK #room nick [reason]` | `r` | puts one out |
| `BAN`, `UNBAN #room nick` | `r` | keeps one out (`b` on their entry), or lets them in again |
| `CLEAR #room USERS [reason]` | `R` | puts everyone out but you |
| `SET #room FOUNDER nick` | the founder | gives the room away |
| `SET #room GUARD`, `TOPICLOCK`, `PRIVATE ON`\|`OFF` | `s` | ChanServ holds the room open; only `t` sets the topic; `INFO` shows little to those without `A` |
| `SET #room DESCRIPTION`, `URL`, `ENTRYMSG [text]` | `s` | the room's texts; the entry message is told to everyone coming in |
| `LIST` | | the rooms you have flags in (a sysop's `LIST ALL`: every room) |
| `WHY #room [nick]` | | what gives you (or them) their flags |
| `KICK #room nick [reason]` | `r` | puts one user out |
| `BAN`, `UNBAN #room nick` | `r` | keeps one user out (`b` on their entry), or lets them in again |
| `CLEAR #room USERS [reason]` | `R` | puts all users out except you |
| `SET #room FOUNDER nick` | the founder | gives the room to a different user |
| `SET #room GUARD`, `TOPICLOCK`, `PRIVATE ON`\|`OFF` | `s` | ChanServ keeps the room open. Only `t` sets the topic. `INFO` shows little to users without `A` |
| `SET #room DESCRIPTION`, `URL`, `ENTRYMSG [text]` | `s` | the texts of the room. The BBS shows the entry message to all users who come in |
| `LIST` | | the rooms in which you have flags (`LIST ALL` of a sysop: all rooms) |
| `WHY #room [nick]` | | the source of your flags (or their flags) |
The flags are Atheme's:
The flags are those of Atheme:
| Flag | | Flag | |
|---|---|---|---|
| `v` | voice through ChanServ | `V` | voiced on coming in |
| `o` | ops through ChanServ | `O` | opped on coming in |
| `t` | sets the topic | `i` | `INVITE`, `GETKEY`; gets past `+i`, `+k`, `+l` |
| `v` | voice through ChanServ | `V` | voice when the user comes in |
| `o` | op through ChanServ | `O` | op when the user comes in |
| `t` | sets the topic | `i` | `INVITE`, `GETKEY`. Gets past `+i`, `+k`, `+l` |
| `r` | `KICK`, `BAN`, `UNBAN` | `R` | `CLEAR` |
| `f` | changes the access list | `s` | `SET` |
| `A` | sees the access list | `e` | not kept out by a ban |
| `b` | banned: kept out | `F` | founder: everything |
| `A` | sees the access list | `e` | a ban does not keep the user out |
| `b` | banned: kept out | `F` | founder: all functions |
Templates: `VOP` is `+AV`, `AOP` `+AOiortv`, `SOP` `+AORefiorstv`, and
`FOUNDER` `+AFORefiorstv`. Someone with `f` gives or takes only flags they
have; `F` is a founder's to give. A sysop acts as a founder in every room,
but is opped in a registered one only as anyone is. Only a sysop puts a
sysop out, and no one but a sysop puts out the founder.
Templates: `VOP` is `+AV`, `AOP` is `+AOiortv`, `SOP` is `+AORefiorstv`,
and `FOUNDER` is `+AFORefiorstv`. A user with `f` can give or remove
only the flags that the user has. Only a founder can give `F`. A sysop
operates as a founder in all rooms. But in a registered room, a sysop
gets op only in the same way as all users. Only a sysop can put a sysop
out. Only a sysop can put out the founder.
Page rooms (`sysop-N`) and rooms a [linked network](IRC-Linking) or MRC
carries can't be registered: the network's own services look after
those. A permanent room is registered by the sysop alone, who can then
give it away with `SET FOUNDER`. A room no one on its access list has
come into for `chanserv_expire` days is dropped. When a founder's account
is deleted, the room goes to the oldest entry with `F`, else with `f`,
else the oldest entry; with no one left, it is dropped.
Users cannot register page rooms (`sysop-N`) and rooms that a
[linked network](IRC-Linking) or MRC carries: the services of the
network manage those. Only the sysop can register a permanent room. The
sysop can then give it to a different user with `SET FOUNDER`. If no
user on its access list came into a room for `chanserv_expire` days,
the BBS drops the room. When the BBS deletes the account of a founder,
the room goes to the oldest entry with `F`. If there is none, it goes to
the oldest entry with `f`, or else to the oldest entry. If no entry
remains, the BBS drops the room.
## BBSServ
BBSServ is a services bot, like an IRC network's NickServ, for your BBS
account. Everyone on the server is logged in, so it always acts on the
account of whoever asks. Talk to it with `/msg BBSServ COMMAND`, or
with its own command, `/BS COMMAND` (`/BBSSERV` also works). Its
answers come as notices.
BBSServ is a services bot for your BBS account, similar to the NickServ
of an IRC network. All users on the server are logged in. Thus, it always
operates on the account of the user who asks. Talk to it with
`/msg BBSServ COMMAND`, or with its own command, `/BS COMMAND`
(`/BBSSERV` also operates). Its answers come as notices.
| Command | What it does |
|---|---|
| `HELP [command]` | the commands, or how to use one |
| `INFO` | your account: level, where you call from, alias, signature, settings, unread mail, keys, tokens, new scan |
| `SET LOCATION`, `ABOUT`, `ALIAS` *value* | your profile's fields (no value, or `-`, clears one) |
| `SET SIGNATURE` *line* `\|` *line* | up to three lines under what you write |
| `SET ANSI`, `UTF8`, `SIXEL`, `RIP`, `WIDTH`, `EDITOR`, `EXPERT` *value* | your terminal and menu settings; cleared, a terminal setting goes back to what your terminal says |
| `INFO` | your account: level, location, alias, signature, settings, unread mail, keys, tokens, new scan |
| `SET LOCATION`, `ABOUT`, `ALIAS` *value* | the fields of your profile (no value, or `-`, clears one) |
| `SET SIGNATURE` *line* `\|` *line* | up to three lines below the text that you write |
| `SET ANSI`, `UTF8`, `SIXEL`, `RIP`, `WIDTH`, `EDITOR`, `EXPERT` *value* | your terminal and menu settings. If you clear a terminal setting, it goes back to the value that your terminal gives |
| `PASSWD` *now new* | your password |
| `SCAN`, `SCAN ON`\|`OFF` *area*\|`ALL` | the areas of your new scan (and of your [QWK](Offline-Mail) packets) |
| `KEYS`, `KEYS ADD` *password key*, `KEYS DEL` *n* | your [SSH keys](SSH). Adding one asks for your password, since a key opens your account |
| `KEYS`, `KEYS ADD` *password key*, `KEYS DEL` *n* | your [SSH keys](SSH). To add one, you must give your password, because a key opens your account |
| `TOKENS`, `TOKENS REVOKE` *id* | your [HTTP API](HTTP-API) tokens |
| `ROOMS`; `ROOM ADD`\|`DEL`\|`TOPIC` *#room* | the [permanent rooms](#permanent-rooms); making them (the sysop) |
| `FRIENDS`, `FRIENDS ADD`\|`DEL` *nick* | your [friends list](Chat-and-Paging#friends), and who on it is on |
| `HISTORY`, `HISTORY` *nick* [*lines*] | those you have talked with; your last lines with one (50, up to 500) |
| `ROOMS`; `ROOM ADD`\|`DEL`\|`TOPIC` *#room* | the [permanent rooms](#permanent-rooms). Changes to them (the sysop) |
| `FRIENDS`, `FRIENDS ADD`\|`DEL` *nick* | your [friends list](Chat-and-Paging#friends), and which friends are on |
| `HISTORY`, `HISTORY` *nick* [*lines*] | the users that you talked with. Your last lines with one user (50, up to 500) |
The same checks apply as on the BBS: an alias that is someone's name is
refused, and so is a setting's wrong value. A wrong password (`KEYS
ADD`, `PASSWD`) counts as a failed login. CTCP `VERSION`, `PING` and
`TIME` are answered, and notices sent to the bot are ignored. A user
whose BBS name is the bot's nick can't be reached by nick over IRC.
The same checks apply as on the BBS. The bot refuses an alias that is
the name of a different user, and an incorrect value for a setting. An
incorrect password (`KEYS
ADD`, `PASSWD`) counts as a failed login. The bot answers CTCP
`VERSION`, `PING` and `TIME`, and ignores notices sent to it. If the BBS
name of a user is the nick of the bot, IRC users cannot send to that
user by nick.
`service = Account` in `[irc]` gives the bot another nick, and its own
command becomes `/ACCOUNT`.
`service = Account` in `[irc]` gives the bot a different nick. Then its
own command becomes `/ACCOUNT`.
## Ergo
The IRC protocol's parts come from [ergo](https://github.com/ergochat/ergo):
The parts of the IRC protocol come from
[ergo](https://github.com/ergochat/ergo):
- messages are read and written by ergo's `irc-go` library (`ircmsg`,
`ircreader`, and `ircfmt` for stripping formatting);
- the numerics and the `ISUPPORT` list builder are taken from ergo's
source, under its MIT license (`internal/ircd/LICENSE.ergo`);
- BBSServ's framework (its command table, parameters, `HELP`, CTCP) is
adapted from ergo's services (`irc/services.go`), on which its
- The `irc-go` library of ergo reads and writes messages (`ircmsg`,
`ircreader`, and `ircfmt` to remove formats).
- The numerics and the `ISUPPORT` list builder come from the source of
ergo, under its MIT license (`internal/ircd/LICENSE.ergo`).
- The framework of BBSServ (its command table, parameters, `HELP`, CTCP)
is adapted from the services of ergo (`irc/services.go`), on which its
NickServ and ChanServ run.
Its tests also use irc-go's client (`ircevent`).
Its tests also use the client of irc-go (`ircevent`).
**See also:** [Chat and paging](Chat-and-Paging), [IRC server linking](IRC-Linking), [MRC](MRC), [Security](Security)
+338 -267
View File
@@ -1,14 +1,20 @@
The HTTP API's server also serves image boards, at `/chan/`, in the manner
of kusaba&nbsp;x and of 4chan that it followed (and Futaba before both):
boards by directory (`/chan/b/`, `/chan/g/`), threads that start with an
image, anonymous replies, bumping, sage and tripcodes. Nothing is needed
but the `bbs` binary: thumbnails are made in Go, and the pages load
nothing from elsewhere.
The server of the HTTP API also shows image boards, at `/chan/`. They are
similar to kusaba&nbsp;x and to 4chan, which kusaba&nbsp;x copied (and
Futaba before the two). They have these items:
Unlike the [web forum](Web-Forum), the image boards are a world of their
own: posters need no account, and their posts are not messages in the
BBS's areas. The BBS's accounts are for staff: sysops are admins of every
board, and each board can name its own mods.
- Boards by directory (`/chan/b/`, `/chan/g/`).
- Threads that start with an image.
- Anonymous replies.
- Bumps, sage and tripcodes.
You need only the `bbs` binary. Go code makes the thumbnails, and the
pages load nothing from other locations.
The image boards are different from the [web forum](Web-Forum). They are
separate from the rest of the BBS. Posters do not need an account, and
their posts are not messages in the areas of the BBS. The accounts of the
BBS are for staff. Sysops are admins of all boards, and each board can
have its own mods.
```
bbs chan board add b Random "Anything goes." -nsfw
@@ -48,199 +54,235 @@ address = :8443
| Setting | Default | What it sets |
|---|---|---|
| `chan` (in `[http]`) | `yes` | the image boards at `/chan/` |
| `dir` | `chan` | where images and thumbnails are kept, and the boards' secret (`dir/secret`, made the first time: keep it, or secure tripcodes change) |
| `max_file` | `4M` | the largest image; `bbs chan board set DIR max_file 8M` gives a board its own |
| `thread_wait`, `reply_wait` | `60`, `15` | flood control: staff are not held to it |
| `dir` | `chan` | the location of images and thumbnails, and the secret of the boards (`dir/secret`, made the first time: keep it, or secure tripcodes change) |
| `max_file` | `4M` | the largest image; `bbs chan board set DIR max_file 8M` gives a board its own limit |
| `thread_wait`, `reply_wait` | `60`, `15` | flood control: it does not apply to staff |
| `max_comment` | `2000` | characters in a comment (and 100 lines) |
| `strip_metadata` | `yes` | JPEGs' EXIF, XMP and comments taken out before they are kept |
| `captcha` | `yes` | those not signed in answer a captcha to post ([below](#captchas-and-members)); a board may say otherwise |
| `captcha_length` | `6` | the captcha's letters, 4 to 10 |
| `captcha_level` | `normal` | how hard it is to read: `easy` (letters barely turned, a line through them), `normal`, `hard` (turned further, waved, three lines, more specks) |
| `captcha_lifetime` | `600` | seconds a captcha lasts (60 to a day) |
| `options` | `yes` | the post form's Options line (`sage`, `nonoko`); without it posts always bump. A board may say otherwise |
| `style` | by the board | Yotsuba B on a worksafe board, Yotsuba on the rest, as 4chan does |
| `ffmpeg`, `pdftoppm` | none | the programs that make videos' and PDFs' thumbnails (by name on the PATH, or a path); without them, a card saying what the file is ([below](#videos-and-pdfs)) |
| `max_video` | `120` | seconds a video may run (0: any length) |
| `archive_days` | `3` | days a pruned thread stays in its board's archive ([below](#the-archive)); 0 keeps them always |
| `ruffle` | none | the directory of Ruffle's self-hosted package (`ruffle.js` and its `.wasm`): SWFs and FLVs played in the page ([below](#flash)); without it they are only downloaded |
| `strip_metadata` | `yes` | the BBS removes EXIF, XMP and comments from JPEGs before it keeps them |
| `captcha` | `yes` | users who are not signed in must answer a captcha to post ([below](#captchas-and-members)); a board can have a different setting |
| `captcha_length` | `6` | the letters of the captcha, 4 to 10 |
| `captcha_level` | `normal` | how difficult it is to read: `easy` (letters turned a small quantity, one line through them), `normal`, `hard` (turned more, waved, three lines, more specks) |
| `captcha_lifetime` | `600` | seconds that a captcha is valid (60 to one day) |
| `options` | `yes` | the Options line of the post form (`sage`, `nonoko`); without it, all posts bump. A board can have a different setting |
| `style` | by the board | Yotsuba B on a worksafe board, Yotsuba on the other boards, as on 4chan |
| `ffmpeg`, `pdftoppm` | none | the programs that make the thumbnails of videos and PDFs (a name on the PATH, or a path); without them, a card that tells the type of file ([below](#videos-and-pdfs)) |
| `max_video` | `120` | the maximum length of a video in seconds (0: all lengths) |
| `archive_days` | `3` | days that a pruned thread stays in the archive of its board ([below](#the-archive)); 0 keeps them always |
| `ruffle` | none | the directory of the self-hosted package of Ruffle (`ruffle.js` and its `.wasm`): the page plays SWFs and FLVs ([below](#flash)); without it, users can only download them |
## On the terminals
The image boards are on the text BBS and on 3270s too: **B** on the main
menu (or a sysop's menu item `boards`). The boards, a board's threads by
bump order (replies, images, subject), and a thread read a post at a
time, as messages: who posted (tripcode, capcode), the thread, and under
each post the posts that quote it. The posters are the BBS's callers,
posting as anyone on the web does: a name (`Name#password` for a
tripcode), `sage`, a subject or none, staff as `## Admin` or `## Mod`;
the same bans, flood control (by the caller's address, or by their
account where there is none: a modem's), limits and pruning.
The image boards are also on the text BBS and on 3270s. Use **B** on the
main menu (or a sysop's menu item `boards`). The terminals show these
items as messages:
A post's picture is shown above it, as well as the terminal can:
- The boards.
- The threads of a board in bump order (replies, images, subject).
- A thread, one post at a time: the poster (tripcode, capcode), the
thread, and below each post the posts that quote it.
The posters are the callers of the BBS. They post in the same way as
users on the web: a name (`Name#password` for a tripcode), `sage`, a
subject or no subject, staff as `## Admin` or `## Mod`. The same bans,
flood control, limits and pruning apply. Flood control uses the address
of the caller, or the account if there is no address (for example, a
modem caller).
The terminal shows the picture of a post above the post, as well as the
terminal can:
| Terminal | How |
|---|---|
| kitty, Ghostty | kitty's graphics protocol (by what they say they are) |
| sixel: xterm (`-ti vt340`), foot, mlterm, WezTerm, Windows Terminal, iTerm2, SyncTERM, the [web terminal](HTTP-API#the-web-terminal) | sixel |
| iTerm2 before sixel, mintty | iTerm2's inline images |
| any other UTF-8 terminal with colour | coloured half blocks (`▀`, 256 colours): rough, but the picture |
| the rest, and 3270s | what it is, in words: `[cat.png, 640x480, 52 KB]` |
| all other UTF-8 terminals with color | colored half blocks (`▀`, 256 colors): rough, but you can see the picture |
| all other terminals, and 3270s | a description in words: `[cat.png, 640x480, 52 KB]` |
The thumbnail goes above the post (a spoiler's says it is one); **V**
shows the image itself, as large as the screen allows. A caller turns
pictures off (or on) on their profile, **M**, and it stays so. A thread
is started with its image sent by the terminal's transfer protocol
(ZMODEM, YMODEM, XMODEM, Kermit), where it has one; terminals without
(a 3270, the web terminal) reply, or start threads on `text_only`
boards. Staff's tools (deleting, bans, reports) are the web's.
The thumbnail shows above the post. The thumbnail of a spoiler tells that
it is a spoiler. **V** shows the full image, as large as the screen
permits. A caller can set pictures off (or on) in the profile, **M**. The
setting stays.
To start a thread, send its image with the transfer protocol of the
terminal (ZMODEM, YMODEM, XMODEM, Kermit), if the terminal has one.
Terminals without a protocol (a 3270, the web terminal) can reply, or
start threads on `text_only` boards. The tools for staff (deletion, bans,
reports) are only on the web.
## Posting
A board's index has the post form at its top: name, options, subject,
comment, an image, and a password to delete the post by (filled in for
each browser, which keeps it in a cookie). A thread starts with an image
(unless the board is `text_only`); replies need a comment, an image, or
both.
The post form is at the top of the index of a board. It has these fields:
name, options, subject, comment, an image, and a password to delete the
post. The browser fills in the password, and keeps it in a cookie. A
thread starts with an image (unless the board is `text_only`). Replies
must have a comment, an image, or the two.
| Typed | Result |
|---|---|
| `Name#password` | a tripcode: `Name !WokonZwxw2`. The same as 2channel's and 4chan's: `#tea` is `!WokonZwxw2` here too |
| `Name##password` | a secure tripcode, `!!...`, made with this site's secret: it cannot be found by trying passwords elsewhere |
| `Name#password` | a tripcode: `Name !WokonZwxw2`. It is the same as on 2channel and 4chan: `#tea` is `!WokonZwxw2` here also |
| `Name##password` | a secure tripcode, `!!...`, made with the secret of this site: nobody can find it with password tests on a different site |
| `sage` in Options | the reply does not bump its thread |
| `nonoko` in Options | back to the board after posting, not the thread |
| `nonoko` in Options | after the post, the board shows, not the thread |
| `>text` | greentext |
| `>>123` | a link to post 123, `(OP)` if it starts its thread, struck through if it is gone |
| `>>>/g/123`, `>>>/g/` | a post on another board, or the board |
| `[spoiler]...[/spoiler]` | hidden until hovered |
| `[code]...[/code]` | set as code |
| a link | made a link |
| `>>123` | a link to post 123, `(OP)` if it starts its thread, struck through if it is deleted |
| `>>>/g/123`, `>>>/g/` | a post on a different board, or the board |
| `[spoiler]...[/spoiler]` | hidden until you move the pointer over it |
| `[code]...[/code]` | shown as code |
| a link | shown as a link |
**Spoiler?** shows the image's thumbnail as *Spoiler Image* until it is
opened. Names cannot be used on a `forced_anon` board.
**Spoiler?** shows the thumbnail of the image as *Spoiler Image* until a
user opens it. On a `forced_anon` board, users cannot use names.
Images are JPEG, PNG, GIF or WebP, told by their bytes, not their names;
up to 10000 pixels a side. Thumbnails are JPEGs, 250 pixels for a thread's
first image and 125 for a reply's. The same image twice on a board is
refused, with a link to where it is (by its MD5, as 4chan does). JPEGs
lose their EXIF before they are kept, so a phone's photo does not say
where it was taken.
Images are JPEG, PNG, GIF or WebP. The BBS identifies them by their
bytes, not by their names. The maximum is 10000 pixels on each side.
Thumbnails are JPEGs: 250 pixels for the first image of a thread and 125
for the image of a reply. The BBS refuses the same image two times on a
board, and gives a link to the first post (by its MD5, as on 4chan).
The BBS removes the EXIF of JPEGs before it keeps them. Thus, the photo
from a phone does not tell where it was taken.
## Captchas and members
Posters who are not signed in type the letters of a captcha under the
form: drawn here, crooked over noise (no outside service sees the
posters), good for one post and ten minutes; **New one** gives another.
Its answer travels sealed in the form (AES-GCM, with the boards' secret),
so nothing is kept of it but that it has been used. `captcha = no` in
`[chan]` turns it off, `captcha_length`, `captcha_level` and
`captcha_lifetime` make it longer or shorter, harder or easier; a board's
own `captcha` (`yes`, `no`, `default`) says otherwise than `[chan]` for
it.
Posters who are not signed in type the letters of a captcha below the
form. The BBS draws the captcha, with crooked letters over noise. No
outside service sees the posters. A captcha is valid for one post and for
ten minutes. **New one** gives a different captcha. The answer goes in
the form, sealed (AES-GCM, with the secret of the boards). Thus, the BBS
keeps only the fact that the captcha is used.
The BBS's users sign in at `/chan/login` (**Sign in** at the top of each
page) and post without one. Their posts are marked as a member's: a ✓
beside the name, `"member": 1` in the JSON, whatever name they gave. They
may also tick **Sign it as NAME**: the post then carries their account's
name (underlined, a blue ✓, `"account"` in the JSON), which no one else
can post under, as anyone can type a name. On a `forced_anon` board posts
are marked, never signed. On the terminals every poster is signed in: no
captcha, `[member]` by the name, and *Sign it as NAME?* before the post.
To set the captcha off, set `captcha = no` in `[chan]`. Use
`captcha_length`, `captcha_level` and `captcha_lifetime` to make it
longer or shorter, more or less difficult. The `captcha` setting of a
board (`yes`, `no`, `default`) replaces the setting of `[chan]` for that
board.
The users of the BBS sign in at `/chan/login` (**Sign in** at the top of
each page), and post without a captcha. The BBS marks their posts as the
posts of a member: a ✓ adjacent to the name, `"member": 1` in the JSON,
for all names that they give. They can also select **Sign it as NAME**.
Then the post shows the name of their account (underlined, a blue ✓,
`"account"` in the JSON). No other poster can post under that name. (All
posters can type a name.) On a `forced_anon` board, the BBS marks posts,
but it never signs them. On the terminals, all posters are signed in:
there is no captcha, `[member]` shows adjacent to the name, and
*Sign it as NAME?* shows before the post.
## Poster IDs and flags
A board with `ids yes` gives each poster an ID in each thread, as 4chan's
do: eight characters from a keyed hash of their address, the board and
the thread, so a poster has the same ID all through a thread and another
in the next, and nothing of their address can be had from it. Each ID has
a colour of its own; hovering it says how many posts in the thread are
by it, and clicking it marks them all. On the terminals it is by the
On a board with `ids yes`, each poster gets an ID in each thread, as on
4chan. The ID has eight characters from a keyed hash of the address, the
board and the thread. Thus, a poster has the same ID in all of a thread
and a different ID in the next thread. Nobody can get the address from
the ID. Each ID has its own color. When you move the pointer over an ID,
it shows the number of posts by that ID in the thread. When you click the
ID, it marks all of them. On the terminals, the ID is adjacent to the
name: `Anonymous (ID: aQvqbFdJ)`.
A board with `flags yes` shows the flag of each poster's country by their
name (an emoji, its name on hovering; `[NZ]` on the terminals), from a
country database the sysop has, `[chan] geoip` (by default `[general]
geoip`, the one the rest of the BBS uses):
A board with `flags yes` shows the flag of the country of each poster
adjacent to the name. The flag is an emoji, and its name shows when you
move the pointer over it. On the terminals, it is `[NZ]`. The country
comes from a country database of the sysop, `[chan] geoip` (by default
`[general] geoip`, the database that the rest of the BBS uses). These
formats are possible:
- a MaxMind DB file (`.mmdb`): MaxMind's GeoLite2 or GeoIP2 Country or
City, DB-IP's *IP to Country Lite*, IPinfo's and others in its format;
- or a CSV of ranges, plain or gzipped: DB-IP's (`start,end,CC`) or
- A MaxMind DB file (`.mmdb`): GeoLite2 or GeoIP2 Country or City from
MaxMind, *IP to Country Lite* from DB-IP, the files of IPinfo and other
files in this format.
- A CSV of ranges, plain or gzipped: DB-IP's (`start,end,CC`) or
IP2Location LITE DB1's (`"from","to","CC","Country"`, by numbers).
The BBS reads them itself (nothing is fetched); replace the file and it
is read again within a minute. DB-IP's free one, for instance, is a
monthly download (`https://download.db-ip.com/free/dbip-country-lite-YYYY-MM.mmdb.gz`,
gzipped as it comes is fine); it was checked against MaxMind's own reader,
200,000 addresses alike. Its licence (CC BY 4.0), as GeoLite2's, asks
for a credit: `geoip_credit` and `geoip_credit_url` put it at the foot of
each page. Posts from no address (a modem's caller)
or one the database does not know have no flag. Behind a reverse proxy
name it in `trusted_proxies`, or every poster is the proxy and has its ID
and its flag. Both are kept with each post when it is made: turning them
off leaves those already made as they were.
The BBS reads them itself (it downloads nothing). When you replace the
file, the BBS reads it again in less than one minute. For example, the
free file from DB-IP is a monthly download
(`https://download.db-ip.com/free/dbip-country-lite-YYYY-MM.mmdb.gz`; you
can use the gzipped file as it is). We checked it against MaxMind's own
reader, with 200,000 addresses that gave the same result. Its licence
(CC BY 4.0), as the licence of GeoLite2, asks for a credit:
`geoip_credit` and `geoip_credit_url` put it at the bottom of each page.
Posts without an address (a modem caller), or with an address that the
database does not know, have no flag. If the BBS is behind a reverse
proxy, put the proxy in `trusted_proxies`. If you do not do this, all
posters have the address of the proxy, and its ID and its flag. The BBS
keeps the ID and the flag with each post when the user posts it. If you
set them off, the posts that exist stay as they were.
## Threads
A reply bumps its thread to the top of the board until the thread has
`bump_limit` replies (300); a thread takes `image_limit` images (150).
A board has `pages` pages of `per_page` threads (10 of 10); when a new
thread pushes the last one past them, it is pruned: **archived**, or, on a
board with `archive no`, deleted with its images. Stickies stay at the
top and are never pruned; closed threads take no replies (but staff's).
`bump_limit` replies (300). A thread accepts `image_limit` images (150).
A board has `pages` pages of `per_page` threads (10 of 10). When a new
thread pushes the last thread past this limit, the BBS prunes it. It
**archives** the thread, or, on a board with `archive no`, it deletes the
thread and its images. Stickies stay at the top, and the BBS never prunes
them. Closed threads accept no replies (but staff can reply).
### The archive
As 4chan's, a pruned thread goes to its board's archive
(`/chan/b/archive`, *[Archive]* beside *[Catalog]*): off the board's
pages and catalog, but whole, its files kept, and read-only. No one
replies to it (staff neither: it is a record), and its posts are not
deleted by their passwords (staff still delete them). Its page says
*This thread is archived* in place of the reply form, and its first post
wears an *Archived* badge. The archive lists the threads, the last
archived first: number, subject and the start of the comment, replies,
when; `archive.json` is 4chan's, the numbers, oldest first, and an
archived thread's JSON has `"archived": 1` and `"archived_on"`.
As on 4chan, a pruned thread goes to the archive of its board
(`/chan/b/archive`, *[Archive]* adjacent to *[Catalog]*). It is not on
the pages and the catalog of the board, but it is complete, with its
files, and it is read-only. Nobody can reply to it (also not staff: it
is a record). Users cannot delete its posts with their passwords (staff
can delete them). Its page shows *This thread is archived* in place of
the reply form, and its first post has an *Archived* badge.
After `[chan] archive_days` (3) a thread is gone from the archive too,
with its files (looked to when a thread is made and when the archive or
the thread is looked at); `archive_days = 0` keeps them always. `bbs chan
board set DIR archive no` prunes a board's threads as before, deleted at
once. On the terminals the board's thread list has *Archive* (A): the
archived threads, to read.
The archive lists the threads, the last archived first: number, subject
and the start of the comment, replies, date. `archive.json` is the same
as on 4chan: the numbers, oldest first. The JSON of an archived thread
has `"archived": 1` and `"archived_on"`.
The index shows each thread's first post and its last five replies (one
under a sticky), with how many were left out; a comment longer than 15
lines is cut there. A thread's page has all of it, and under each post
the posts that quote it. The **catalog** shows every thread at a glance:
its image, its replies and images, the start of its first post; by bump
order or by when it was made.
After `[chan] archive_days` (3), the BBS removes a thread from the
archive, with its files. It does this check when a user makes a thread,
and when a user looks at the archive or the thread. `archive_days = 0`
keeps them always. `bbs chan board set DIR archive no` prunes the
threads of a board as before, and deletes them immediately. On the
terminals, the thread list of the board has *Archive* (A): the archived
threads, which you can read.
With JavaScript (the pages work without it): clicking a post's number
quotes it in the reply form, clicking a thumbnail opens the image in place,
and hovering a `>>123` shows that post.
The index shows the first post of each thread and its last five replies
(one below a sticky), with the number of posts that it does not show. It
cuts a comment that is longer than 15 lines. The page of a thread shows
all of it, and below each post the posts that quote it. The **catalog**
shows all threads together: the image, the replies and images, the start
of the first post. The order is by bump or by date of creation.
With JavaScript (the pages also operate without it):
- Click the number of a post to quote it in the reply form.
- Click a thumbnail to open the image in its location.
- Move the pointer over a `>>123` to show that post.
## Deleting and reporting
Tick posts, give the password they were posted with (the browser's own is
filled in), and **Delete**; **File Only** deletes their images and leaves
the posts. The ▸ beside a post reports it to staff.
To delete posts, do these steps:
1. Select the posts.
2. Type the password that you used for the posts. (The browser fills in
its own password.)
3. Click **Delete**. **File Only** deletes their images and keeps the
posts.
The ▸ adjacent to a post reports it to staff.
## Staff
Sysops and a board's mods sign in at `/chan/login` with their BBS account
and get **Manage** at the top of each page, an `[M]` beside each post, and
the choice of posting as `## Admin` or `## Mod`.
Sysops and the mods of a board sign in at `/chan/login` with their BBS
account. They get **Manage** at the top of each page, an `[M]` adjacent
to each post, and an option to post as `## Admin` or `## Mod`.
- **Reports** (`/chan/manage`): what has been reported on their boards,
how often, and why.
- **A post** (`[M]`): its address and that address's other posts; delete
the post (a thread's first: the thread) or its file; make a thread
sticky or closed; dismiss its reports; delete every post of the address
on the board; and ban.
- **Reports** (`/chan/manage`): the reports on their boards, the number
of reports, and the reasons.
- **A post** (`[M]`): its address and the other posts from that address.
Staff can delete the post (for the first post of a thread: the thread)
or its file, make a thread sticky or closed, dismiss its reports,
delete all posts of the address on the board, and ban.
- **Bans**: by address or by range (the /24 of IPv4, the /48 of IPv6), on
the board or (admins) on every board, for some days or for ever,
optionally saying `(USER WAS BANNED FOR THIS POST)` under the post. The
banned see why, until when, and what they posted, when they next post.
`/chan/manage/bans` lists them and lifts them.
the board or (admins) on all boards, for some days or for ever. As an
option, the ban shows `(USER WAS BANNED FOR THIS POST)` below the post.
When banned users try to post again, they see the reason, the end date,
and their post. `/chan/manage/bans` lists the bans and removes them.
From the command line:
@@ -256,31 +298,31 @@ bbs chan ban del ID
| Board setting | Default | What it sets |
|---|---|---|
| `title`, `description` | | as the board's banner shows them |
| `pages`, `per_page` | 10, 10 | threads kept: pages of threads |
| `bump_limit`, `image_limit` | 300, 150 | a thread's |
| `title`, `description` | | the text in the banner of the board |
| `pages`, `per_page` | 10, 10 | the threads that the board keeps: pages of threads |
| `bump_limit`, `image_limit` | 300, 150 | the limits of a thread |
| `max_file` | `[chan]`'s | the largest image |
| `default_name` | Anonymous | a post with no name |
| `nsfw` | no | not worksafe: Yotsuba, and left off the front page's images |
| `default_name` | Anonymous | the name for a post without a name |
| `nsfw` | no | not worksafe: Yotsuba, and not in the images of the front page |
| `forced_anon` | no | no names or tripcodes |
| `text_only` | no | threads need no image |
| `text_only` | no | threads do not need an image |
| `oekaki` | no | posters can draw their pictures in the page ([below](#oekaki)) |
| `ids` | no | each poster has an ID in a thread ([below](#poster-ids-and-flags)) |
| `flags` | no | posts show their country's flag (with `[chan] geoip`) |
| `files` | none | files taken besides images: `webm`, `mp4`, `pdf`, `swf`, `flv`, as many as wanted (`webm,pdf`); `none` for images only ([below](#videos-and-pdfs)) |
| `sound` | no | videos and Flash may have sound |
| `archive` | yes | pruned threads are archived, read-only, for `archive_days` ([below](#the-archive)); `no` deletes them at once |
| `locked` | no | only staff post |
| `login` | `no` | `post`: only the BBS's users post (signed in at `/chan/login`); `all`: only they see the board at all (its pages, images and JSON; others are sent to sign in, and the front page marks it *(members)*) |
| `captcha` | `default` | `yes` or `no` for this board, else `[chan]`'s |
| `options` | `default` | `yes` or `no`: this board's post form has the Options line (`sage`, `nonoko`), else as `[chan]` says |
| `mods` | | users who moderate it, by name |
| `sort` | 0 | where it comes in the lists of boards |
| `flags` | no | posts show the flag of their country (with `[chan] geoip`) |
| `files` | none | the files that the board accepts in addition to images: `webm`, `mp4`, `pdf`, `swf`, `flv`, as many as necessary (`webm,pdf`); `none` for images only ([below](#videos-and-pdfs)) |
| `sound` | no | videos and Flash can have sound |
| `archive` | yes | the BBS archives pruned threads, read-only, for `archive_days` ([below](#the-archive)); `no` deletes them immediately |
| `locked` | no | only staff can post |
| `login` | `no` | `post`: only the users of the BBS can post (signed in at `/chan/login`); `all`: only they can see the board (its pages, images and JSON; the BBS sends other users to sign in, and the front page marks the board *(members)*) |
| `captcha` | `default` | `yes` or `no` for this board, or the setting of `[chan]` |
| `options` | `default` | `yes` or `no`: the post form of this board has the Options line (`sage`, `nonoko`), or the setting of `[chan]` |
| `mods` | | the users who moderate it, by name |
| `sort` | 0 | its position in the lists of boards |
## Videos and PDFs
A board can take videos and PDFs besides images, as 4chan's take WebM
everywhere and PDF on /po/:
A board can accept videos and PDFs in addition to images. 4chan accepts
WebM on all boards and PDF on /po/:
```
bbs chan board set wsg files webm,mp4
@@ -288,37 +330,45 @@ bbs chan board set wsg sound yes
bbs chan board set po files pdf
```
What a file is is found from its bytes, never its name, and each is read
before it is kept:
The BBS identifies the type of a file from its bytes, never from its
name. It reads each file before it keeps it:
| Format | Accepted | Refused |
|---|---|---|
| WebM | VP8, VP9 or AV1 video, Vorbis or Opus sound | a Matroska file that is not WebM (browsers do not play it), other codecs, other tracks, two videos in one |
| MP4 | H.264, AV1 or VP9 video, AAC or Opus sound | HEVC and other codecs browsers do not all play; one still being written (no movie header) |
| PDF | a whole one (`%PDF-` to `%%EOF`) | one cut short |
| WebM | VP8, VP9 or AV1 video, Vorbis or Opus sound | a Matroska file that is not WebM (browsers do not play it), other codecs, other tracks, two videos in one file |
| MP4 | H.264, AV1 or VP9 video, AAC or Opus sound | HEVC and other codecs that not all browsers play; a file that is not complete (no movie header) |
| PDF | a complete file (`%PDF-` to `%%EOF`) | a file that is cut short |
A video is at most 4096 pixels a side and `max_video` seconds long (one
that does not say its length is refused while there is a limit), and
without sound unless the board's `sound` says yes. Its post says its size
and length (`320x240, 0:05`); a PDF's its pages where it can count them
(`PDF, 2 pages`). In the page a video's thumbnail plays it in place, with
*[Close]* to stop; a PDF's opens it in a tab of its own, in the browser's
viewer (it is served as itself, without the boards' Content Security
Policy, which a PDF viewer will not run under; nothing sniffs it as
anything else).
These limits apply to a video:
Thumbnails: with `[chan] ffmpeg` a video's is its first frame, and with
`pdftoppm` (poppler-utils) a PDF's is its first page; ffmpeg is told the
container (`-f matroska`, `-f mov`) and reads only the file. Either one
failing on a file refuses it (a browser would not show it either).
Without them, the thumbnail is a card saying what it is (*WEBM 0:05*,
*PDF 2 pages*). On the terminals a video or PDF shows as its thumbnail;
the file itself is for the browser.
- The maximum is 4096 pixels on each side.
- The maximum length is `max_video` seconds. While there is a limit, the
BBS refuses a video that does not tell its length.
- The video has no sound, unless the `sound` setting of the board is yes.
The post of a video shows its size and length (`320x240, 0:05`). The
post of a PDF shows its pages if the BBS can count them
(`PDF, 2 pages`). In the page, the thumbnail of a video plays it in its
location. *[Close]* stops it. The thumbnail of a PDF opens it in a
different tab, in the viewer of the browser. The BBS serves the PDF as a
PDF, without the Content Security Policy of the boards, because a PDF
viewer does not operate with that policy. No program identifies it as a
different type.
Thumbnails: with `[chan] ffmpeg`, the thumbnail of a video is its first
frame. With `pdftoppm` (poppler-utils), the thumbnail of a PDF is its
first page. The BBS tells ffmpeg the container (`-f matroska`, `-f mov`),
and ffmpeg reads only the file. If one of these programs fails on a file,
the BBS refuses the file (a browser also cannot show it). Without these
programs, the thumbnail is a card that tells the type of file
(*WEBM 0:05*, *PDF 2 pages*). On the terminals, a video or a PDF shows as
its thumbnail. The file itself is for the browser.
## Flash
A board can take Flash too, as 4chan's /f/ did, played by
[Ruffle](https://ruffle.rs), the Flash Player emulator, in the page:
A board can also accept Flash, as /f/ on 4chan did.
[Ruffle](https://ruffle.rs), the Flash Player emulator, plays it in the
page:
```
make ruffle # Ruffle's self-hosted package, into ruffle/ (or unpack a release's)
@@ -333,62 +383,76 @@ ruffle = /opt/bbs/ruffle ; the directory with ruffle.js (some 30 MB, not
| Format | Read for | Notes |
|---|---|---|
| SWF (`FWS`, `CWS`, `ZWS`) | its stage's size, frames and rate, sounds | compressed ones are walked as they unpack, nothing kept (a small file that unpacks to much is refused at no cost); an LZMA one (`ZWS`) Ruffle unpacks, so it is taken as 550x400 with sound |
| FLV | its `onMetaData` (size, length), its tags (sound, the video's codec: Sorenson H.263, Screen, VP6, VP6 alpha, H.264) | without metadata its length is its last tag's time, its size Flash's 320x240 |
| SWF (`FWS`, `CWS`, `ZWS`) | the size of its stage, frames and rate, sounds | the BBS reads compressed files as they unpack, and keeps nothing (it refuses a small file that unpacks to a large size, at no cost); Ruffle unpacks an LZMA file (`ZWS`), thus the BBS accepts it as 550x400 with sound |
| FLV | its `onMetaData` (size, length), its tags (sound, the codec of the video: Sorenson H.263, Screen, VP6, VP6 alpha, H.264) | without metadata, its length is the time of its last tag, and its size is the 320x240 of Flash |
A movie or FLV with sound needs the board's `sound`; an FLV is held to
`max_video` as videos are. The thumbnail of an FLV is its first frame
with `[chan] ffmpeg`; a movie's is a card (*FLASH 550x400*): nothing here
draws Flash but the browser.
A movie or FLV with sound needs the `sound` setting of the board. The
`max_video` limit applies to an FLV as to videos. With `[chan] ffmpeg`,
the thumbnail of an FLV is its first frame. The thumbnail of a movie is a
card (*FLASH 550x400*): only the browser draws Flash.
Clicking the thumbnail plays it in place, with *[Close]*. The player is a
frame of `/chan/flash`, **sandboxed** (`allow-scripts` alone, by its
Content Security Policy as by the frame): it has no origin of the
site's, so no cookies, and nothing of the page. The page fetches the file
(with its own cookies, so a board for members only works) and hands its
bytes to the frame, which hands them to Ruffle with the network,
scripting and links off (`allowNetworking: "none"`, `allowScriptAccess:
false`, `openUrlMode: "deny"`). Ruffle does not play an FLV by itself,
as Flash Player did not: the BBS makes a small movie of its own
(`/chan/flvplayer.swf?w=&h=`, a `NetStream` played into a `Video` of the
FLV's size) that plays it from a `blob:` of the frame's. Ruffle's files
are served at `/chan/ruffle/` to anyone (the frame has no origin to send),
only those of the package (`.js`, `.wasm`, `.map`, no directories).
Ruffle decodes H.264 with the browser's own decoder (WebCodecs), which
Chrome, Edge and Safari have; Sorenson, VP6 and Screen video it decodes
itself.
Click the thumbnail to play it in its location, with *[Close]*. These are
the security controls of the player:
- The player is a frame of `/chan/flash`. It is **sandboxed**
(`allow-scripts` alone, by its Content Security Policy and by the
frame). It does not have the origin of the site. Thus, it has no
cookies, and it cannot access the page.
- The page downloads the file (with its own cookies, thus a board for
members only also operates). It gives the bytes to the frame. The
frame gives them to Ruffle with the network, scripting and links off
(`allowNetworking: "none"`, `allowScriptAccess: false`,
`openUrlMode: "deny"`).
- Ruffle does not play an FLV by itself, as Flash Player did not. The BBS
makes its own small movie (`/chan/flvplayer.swf?w=&h=`, a `NetStream`
played into a `Video` of the size of the FLV). This movie plays the FLV
from a `blob:` of the frame.
- The BBS serves the files of Ruffle at `/chan/ruffle/` to all users
(the frame has no origin to send). It serves only the files of the
package (`.js`, `.wasm`, `.map`, no directories).
Ruffle decodes H.264 with the decoder of the browser (WebCodecs). Chrome,
Edge and Safari have this decoder. Ruffle itself decodes Sorenson, VP6
and Screen video.
## Oekaki
An oekaki board (お絵かき, doodling: `bbs chan board set oe oekaki yes`)
has a drawing board in its post form, as Futaba's boards had their Java
painters. Choose the canvas's size (50 to 1200 pixels a side) and **Open
the drawing board**:
has a drawing board in its post form, as the boards of Futaba had their
Java painters. Select the size of the canvas (50 to 1200 pixels on each
side) and click **Open the drawing board**:
- **Pen**, **Eraser** and **Fill**, a colour (or one from the palette), a
brush size;
- **Undo** and **Redo** (Ctrl+Z, Ctrl+Y), **Clear**;
- **Use this drawing**, or just post: the drawing goes as the post's image,
a PNG.
- **Pen**, **Eraser** and **Fill**, a color (or one from the palette), a
brush size.
- **Undo** and **Redo** (Ctrl+Z, Ctrl+Y), **Clear**.
- **Use this drawing**, or post: the drawing goes as the image of the
post, a PNG.
The PNG carries how it was drawn: every stroke, with its timing, in a
chunk of its own (`okST`) that other programs pass over, so the picture
looks the same anywhere. Under a drawing, **Replay** draws it again
stroke by stroke, at 1× to 32× (pauses cut short), ending as the picture
is; the post says how long the drawing took. On an oekaki board **Draw
over** starts a reply from the drawing's strokes, to add to it: the new
drawing's replay has both. Since the strokes are in the file, a drawing
saved and posted again (on any board) still replays; programs that
rewrite PNGs may drop the chunk.
The PNG contains the record of the drawing: all strokes, with their
timing, in a separate chunk (`okST`). Other programs ignore this chunk,
thus the picture looks the same in all programs. Below a drawing,
**Replay** draws it again stroke by stroke, at 1× to 32× (pauses are
made shorter), until it is the same as the picture. The post shows how
long the drawing took. On an oekaki board, **Draw over** starts a reply
from the strokes of the drawing, to add to it. The replay of the new
drawing has the two. The strokes are in the file, thus a drawing that you
save and post again (on any board) can still replay. Programs that write
PNGs again can remove the chunk.
The drawing board and the replays need JavaScript (the boards' only
pages that do); without it, an oekaki board is an image board.
The drawing board and the replays need JavaScript. They are the only
pages of the boards that need it. Without JavaScript, an oekaki board is
an image board.
What the server takes is checked: a replay must be of this picture's
size, its strokes on the canvas, at most a million numbers and 32 MB
unpacked, and well formed. One that is not is taken out of the PNG, which
is kept as a picture. The format, for programs that want to make or read
it, is zlib-compressed JSON:
The server checks what it receives. A replay must have these properties:
- The size of this picture.
- Its strokes on the canvas.
- A maximum of one million numbers and 32 MB unpacked.
- A correct format.
If a replay does not have these properties, the BBS removes it from the
PNG, and keeps the PNG as a picture. The format, for programs that make
or read it, is zlib-compressed JSON:
```json
{"v": 1, "w": 300, "h": 200, "bg": "#ffffff",
@@ -396,54 +460,61 @@ it, is zlib-compressed JSON:
{"t": "f", "c": "#22b14c", "z": 1, "p": [900, 150, 150]}]}
```
A stroke is the pen (`p`), the eraser (`e`: the pen in the background's
colour) or a fill (`f`, one point); `z` is its size, and `p` its points as
`dt, x, y`, `dt` the milliseconds since the point before (for a stroke's
first point, since the stroke before ended). The drawing's time is the
sum of them.
A stroke is the pen (`p`), the eraser (`e`: the pen in the color of the
background) or a fill (`f`, one point). `z` is its size, and `p` is its
points as `dt, x, y`. `dt` is the milliseconds since the previous point
(for the first point of a stroke, since the end of the previous stroke).
The time of the drawing is the sum of them.
## Styles
Callers choose one at the top of each page (kept in a cookie):
Callers select a style at the top of each page (the BBS keeps it in a
cookie):
| Style | What it looks like |
|---|---|
| `yotsuba` | 4chan's, on boards not worksafe: cream and maroon |
| `yotsuba` | 4chan's, on boards that are not worksafe: cream and maroon |
| `yotsuba-b` | 4chan's worksafe blue |
| `futaba` | Futaba's, as kusaba had it |
| `futaba` | Futaba's, as on kusaba |
| `burichan` | kusaba's blue |
| `photon` | kusaba's grey and orange |
| `tomorrow` | 4chan's dark style |
## JSON
The boards can be read as JSON, in the shapes of 4chan's read-only API
(github.com/4chan/4chan-API), so that its readers read these boards too:
You can read the boards as JSON, in the format of the read-only API of
4chan (github.com/4chan/4chan-API). Thus, readers for 4chan can also read
these boards:
| File | What it holds |
|---|---|
| `/chan/boards.json` | the boards and how they are run |
| `/chan/b/threads.json` | each page's threads, when each changed, their replies |
| `/chan/b/catalog.json` | each page's threads, with their last replies |
| `/chan/boards.json` | the boards and their settings |
| `/chan/b/threads.json` | the threads of each page, the time of the last change of each thread, their replies |
| `/chan/b/catalog.json` | the threads of each page, with their last replies |
| `/chan/b/1.json` | a page of the index |
| `/chan/b/thread/123.json` | a thread |
Posts have 4chan's `id`, `country` and `country_name` where the board
has them, and `boards.json` its `user_ids` and `country_flags`. Beyond
4chan's fields, `boards.json` says `"oekaki": 1` of an oekaki board, and
a drawing that replays has `"replay": 1` and `"draw_ms"`. A board that
takes videos or PDFs has `"file_types": ["webm", "pdf"]`, and with videos
4chan's `webm_audio` and `max_webm_duration`; `is_archived` is 1 of a
board with an archive; a video's post has
`"duration_ms"`, a PDF's `"page_count"`, beside 4chan's `ext`, `w`, `h`.
Posts have the `id`, `country` and `country_name` fields of 4chan if the
board has them. `boards.json` has its `user_ids` and `country_flags`. In
addition to the fields of 4chan:
A post's file is at `/chan/b/src/{tim}{ext}` and its thumbnail at
`/chan/b/thumb/{tim}s.jpg` (where 4chan's are at `i.4cdn.org/b/`).
kusaba's addresses go where they should: `/chan/b/res/123.html` to the
thread, `/chan/b/1.html` to the index.
- `boards.json` has `"oekaki": 1` for an oekaki board.
- A drawing that replays has `"replay": 1` and `"draw_ms"`.
- A board that accepts videos or PDFs has
`"file_types": ["webm", "pdf"]`. With videos, it has the
`webm_audio` and `max_webm_duration` fields of 4chan.
- `is_archived` is 1 for a board with an archive.
- The post of a video has `"duration_ms"`, and the post of a PDF has
`"page_count"`, in addition to the `ext`, `w`, `h` fields of 4chan.
Behind a reverse proxy, name it in `[http]`'s `trusted_proxies`: otherwise
every poster has the proxy's address, and flood control and bans reach
everyone. See [HTTP API: behind a proxy](HTTP-API#behind-a-proxy).
The file of a post is at `/chan/b/src/{tim}{ext}`, and its thumbnail is
at `/chan/b/thumb/{tim}s.jpg` (4chan has them at `i.4cdn.org/b/`). The
addresses of kusaba go to the correct location: `/chan/b/res/123.html`
to the thread, `/chan/b/1.html` to the index.
**See also:** [Web forum](Web-Forum), [HTTP API](HTTP-API)
If the BBS is behind a reverse proxy, put the proxy in the
`trusted_proxies` setting of `[http]`. If you do not do this, all
posters have the address of the proxy, and flood control and bans apply
to all users. Refer to [HTTP API: behind a proxy](HTTP-API#behind-a-proxy).
**Refer to:** [Web forum](Web-Forum), [HTTP API](HTTP-API)
+41 -37
View File
@@ -1,12 +1,13 @@
[Multi Relay Chat](https://wiki.mysticbbs.com/doku.php?id=mrc) is a chat
network of BBSes: Mystic, Synchronet, ENiGMA½ and others share its rooms.
The BBS joins it as its own MRC connector, with one connection to the MRC
server carrying all its users. No connector program is needed.
network of BBSes. Mystic, Synchronet, ENiGMA½ and other BBSes share its
rooms. The BBS connects to it as its own MRC connector. One connection to
the MRC server carries all the users of the BBS. You do not have to
install a connector program.
MRC's rooms are the BBS's chat rooms that begin with the prefix (`mrc-`):
`mrc-lobby` is MRC's lobby. Whoever is in that room on the BBS, from a
terminal, a 3270, the web or IRC (`#mrc-lobby`), is in MRC's lobby, under
their name.
The MRC rooms are the chat rooms of the BBS that start with the prefix
(`mrc-`). `mrc-lobby` is the MRC lobby. All users in that room on the
BBS are in the MRC lobby, with their names. This applies to users from a
terminal, a 3270, the web or IRC (`#mrc-lobby`).
```ini
[mrc]
@@ -19,45 +20,48 @@ telnet = bbs.example.org:23
| Setting | Default | What it sets |
|---|---|---|
| `address` | `mrc.bottomlessabyss.net:5000` | the MRC server (5001 with TLS) |
| `tls` | `no` | TLS to it |
| `prefix` | `mrc-` | what begins MRC's rooms here |
| `system_name` | the BBS's name | the BBS as MRC shows it (Mystic's `\|NN` colour codes allowed) |
| `web`, `telnet`, `ssh`, `sysop`, `description` | (the sysop's name, the BBS's) | what MRC's `INFO` tells of the BBS |
| `require` | (anyone who may chat) | who may go into MRC's rooms ([access levels](Access-Levels)) |
| `tls` | `no` | TLS to the MRC server |
| `prefix` | `mrc-` | the start of the names of MRC rooms on this BBS |
| `system_name` | the name of the BBS | the name of the BBS that MRC shows (the `\|NN` colour codes of Mystic are permitted) |
| `web`, `telnet`, `ssh`, `sysop`, `description` | (the name of the sysop, the BBS) | the data about the BBS that the MRC `INFO` gives |
| `require` | (all users who can chat) | the users who can go into the MRC rooms ([access levels](Access-Levels)) |
## Chatting
- `/join mrc-lobby` in the BBS's chat (`JOIN #mrc-lobby` on IRC) goes into
MRC's lobby. Others on the network see the user arrive, and see them
leave when they go.
- Lines said there go to MRC as `<name> text`, and `/me` as an action.
Lines from other systems show as `carol@Far_BBS: text` (on IRC, from
`carol_Far_BBS!mrc@far_bbs`). MRC's colour codes are removed.
- `!COMMAND` is a command for the MRC server, not a line for the room:
`!motd`, `!list` (its rooms), `!chatters`, `!bbses`, `!info N`
and the rest (the server says which it does not know). Its answers come to whoever asked. `!!text`
says a line that begins with `!`.
- Private messages to a user here come to them alone.
- `/join mrc-lobby` in the chat of the BBS (`JOIN #mrc-lobby` on IRC)
puts the user in the MRC lobby. Other users on the network see the
user arrive. They also see the user leave.
- Lines that the user writes there go to MRC as `<name> text`. `/me`
goes as an action. Lines from other systems show as
`carol@Far_BBS: text` (on IRC, from `carol_Far_BBS!mrc@far_bbs`). The
BBS removes the MRC colour codes.
- `!COMMAND` is a command for the MRC server, not a line for the room.
Examples are `!motd`, `!list` (its rooms), `!chatters`, `!bbses`,
`!info N` and other commands. The server tells you which commands it
does not know. Its answers go only to the user who asked. `!!text` sends
a line that starts with `!`.
- Private messages to a user on this BBS go only to that user.
A user in two of MRC's rooms here (an IRC client in two channels) is in
one on MRC, the last they spoke in. MRC has a user in one room at a time.
On MRC, a user is in one room at a time. Thus, if a user is in two MRC
rooms on this BBS (an IRC client in two channels), the user is in one
room on MRC. This is the last room in which the user wrote.
Each user is kept present (`IAMHERE`) every minute. If the connection
drops, the BBS connects again after 30 seconds and puts back everyone
who was there.
Each minute, the BBS tells MRC that each user is present (`IAMHERE`). If
the connection stops, the BBS connects again after 30 seconds. Then it
puts back all the users who were there.
A sysop can make `mrc-lobby` a [permanent room](IRC#permanent-rooms), so
that it is listed even when no one here is in it.
A sysop can make `mrc-lobby` a [permanent room](IRC#permanent-rooms).
Then the BBS lists the room when it has no users on this BBS.
## The protocol
The BBS speaks MRC's protocol as Synchronet's `mrc-connector.js` and `mrc-session.js` do:
The BBS uses the MRC protocol in the same way as the `mrc-connector.js` and `mrc-session.js` of Synchronet:
- the handshake `SYSTEM~BBSSEC/os_arch/1.3.5`, then the server's hello;
- lines of `FromUser~FromSite~FromRoom~ToUser~MsgExt~ToRoom~Body~`;
- `INFO*`, `IMALIVE` and `CAPABILITIES` for the BBS;
- `IMALIVE` in answer to the server's `PING`;
- `IAMHERE` for each user, `NEWROOM:old:new` to move, `LOGOFF` to go;
- names without spaces (underscores), at most 30 characters.
- The handshake `SYSTEM~BBSSEC/os_arch/1.3.5`, then the hello of the server.
- Lines of `FromUser~FromSite~FromRoom~ToUser~MsgExt~ToRoom~Body~`.
- `INFO*`, `IMALIVE` and `CAPABILITIES` for the BBS.
- `IMALIVE` as the answer to the `PING` of the server.
- `IAMHERE` for each user, `NEWROOM:old:new` to move, `LOGOFF` to leave.
- Names without spaces (underscores), with a maximum of 30 characters.
**See also:** [Chat and paging](Chat-and-Paging), [IRC](IRC)
+61 -48
View File
@@ -1,12 +1,18 @@
MSN 2.0 (late 1996) and the 2.5 and 2.6 that came with Windows 98 turned
The Microsoft Network into internet services: web pages in the MSN
Program Viewer (Internet Explorer inside), newsgroups for the bulletin
boards, IRC for chat, and internet mail. Members signed in to each with
MSN's own security package, which is NTLM under another name ("MSN", once
codenamed Sicily): the password never travels, only an answer to a
challenge worked out from its hash. The BBS answers that sign-in on its
mail, news and web servers, so MSN 2.x's programs sign in to the BBS as
they did to MSN. This is early work, not yet tried with a real client.
MSN 2.0 (late 1996), and the 2.5 and 2.6 that came with Windows 98,
changed The Microsoft Network into internet services:
- Web pages in the MSN Program Viewer (Internet Explorer inside).
- Newsgroups for the bulletin boards.
- IRC for chat.
- Internet mail.
Members signed in to each service with the MSN security package. This
package is NTLM with a different name ("MSN", with the old codename
Sicily). The password never goes on the network. Only an answer to a
challenge goes, which the client calculates from the hash of the
password. The BBS answers this sign-in on its mail, news and web servers.
Thus, the programs of MSN 2.x sign in to the BBS as they did to MSN. This
is early work. We did not try it with a real client yet.
## Turning it on
@@ -15,54 +21,61 @@ they did to MSN. This is early work, not yet tried with a real client.
ntlm = yes
```
The sign-in checks each password's LAN Manager and NT hashes, which the
BBS keeps once this is on (or MSN Classic is served, whose 1996 client
signs in the same way). They are made when the password is next typed in
the clear: when its owner signs in any other way (telnet, the web form, a
mail program's plain password) or sets a password. Until then, that
member's NTLM sign-in fails, and the log says why. The hashes are password
equivalents, the LM hash a weak one, so the database needs guarding as a
password file does.
The sign-in checks the LAN Manager and NT hashes of each password. The
BBS keeps these hashes when this setting is on, or when it serves MSN
Classic (the 1996 client of MSN Classic signs in in the same way). The
BBS makes the hashes the next time that the user types the password in
clear text. That occurs when the user signs in with a different method
(telnet, the web form, the plain password of a mail program) or sets a
password. Until then, the NTLM sign-in of that member fails, and the log
gives the reason.
The hashes are equivalent to passwords, and the LM hash is a weak hash.
Thus, you must protect the database as you protect a password file.
## What signs in
The member ID is the BBS name (or the mail address, or the name with any
domain), and the password the BBS password.
The member ID is the BBS name (or the mail address, or the name with a
domain). The password is the BBS password.
- **Mail**: POP3 and IMAP, and SMTP on the submission listener, offer
`NTLM` and `MSN` beside `PLAIN`. In Outlook Express (or Internet Mail),
give the account the BBS's servers and tick "Log on using Secure
Password Authentication" for incoming mail, and under the outgoing
server's "My server requires authentication", the same.
- **Newsgroups**: NNTP's `AUTHINFO GENERIC NTLM` (or `MSN`), as
Microsoft's news servers had it. In Internet News (or Outlook Express),
tick "This server requires me to log on" and "Log on using Secure
`NTLM` and `MSN` adjacent to `PLAIN`. In Outlook Express (or Internet
Mail), give the servers of the BBS to the account. For incoming mail,
select "Log on using Secure Password Authentication". For the outgoing
server, select the same option under "My server requires
authentication".
- **Newsgroups**: the `AUTHINFO GENERIC NTLM` (or `MSN`) of NNTP, as on
the news servers of Microsoft. In Internet News (or Outlook Express),
select "This server requires me to log on" and "Log on using Secure
Password Authentication".
- **The web forum**: `/forum/login/ntlm` asks the browser for NTLM (or
MSN), and the sign-in page links to it. Internet Explorer, the Program
Viewer's browser, answers with the name and password it already has
(MSN's or Windows'), or asks for them. The exchange needs one connection from start to
end, so a proxy in front of the BBS has to keep connections as they are.
- **Chat**: Comic Chat, MSN 2.x's chat program, is an IRC client: point it
at the BBS's IRC server ([IRC](IRC)), which it signs in to by password.
MSN). The sign-in page has a link to it. Internet Explorer, the browser
of the Program Viewer, answers with the name and password that it
already has (from MSN or Windows), or it asks for them. The exchange
must use one connection from start to end. Thus, a proxy in front of
the BBS must keep the connections as they are.
- **Chat**: Comic Chat, the chat program of MSN 2.x, is an IRC client.
Point it at the IRC server of the BBS ([IRC](IRC)). It signs in with a
password.
A server with `tls = required` asks for TLS before any sign-in, NTLM's
too, and Windows 95 and 98 programs can't speak the TLS that a modern
server does, so leave TLS optional on the servers these clients use.
A server with `tls = required` asks for TLS before all sign-ins, also
before NTLM. Programs for Windows 95 and 98 cannot use the TLS of a
modern server. Thus, keep TLS optional on the servers that these clients
use.
## Not served yet
- The Program Viewer's own pages: MSN's start page, its channels and
OnStage shows, and the MSN Sign-In dialer. What the Viewer asks for
first isn't documented anywhere found so far; it needs the client
itself looked at.
- DPA (Distributed Password Authentication), the other package MSN's
later Windows 98 mail used for Secure Password Authentication. It isn't
NTLM, and isn't documented.
- MSN's own 16-character passwords: the security package spread the 15th
and 16th characters over the first 14 for the LM hash. Passwords longer
than 14 characters sign in by the NT hash, which needs the client to
send it.
- The pages of the Program Viewer: the MSN start page, its channels and
OnStage shows, and the MSN Sign-In dialer. We did not find a document
that tells what the Viewer asks for first. It is necessary to examine
the client.
- DPA (Distributed Password Authentication), the other package that the
later Windows 98 mail of MSN used for Secure Password Authentication.
DPA is not NTLM, and there is no document for it.
- The 16-character passwords of MSN: for the LM hash, the security
package spread the 15th and 16th characters over the first 14.
Passwords longer than 14 characters sign in with the NT hash. For this,
the client must send the NT hash.
MSN 2.0 kept MSN Classic's Exchange mail for its members; that is served
by [MSN Classic](MSN-Classic).
MSN 2.0 kept the Exchange mail of MSN Classic for its members.
[MSN Classic](MSN-Classic) serves that mail.
+123 -97
View File
@@ -1,15 +1,25 @@
The BBS can be The Microsoft Network as it was from 1995 to 1998, for the
MSN client that came with Windows 95 ("MSN Classic"). A caller signs in
with their BBS name and password, MSN Central is the BBS, the Categories
folder holds the BBS's message areas (a folder for each area group), and
each area opens as an MSN bulletin board: the messages listed with their
replies under them, a message opened in the reader, new posts and replies
from the Compose window, and a member's own messages deleted. MSN Today
lists the boards with the newest messages. The Inbox (Microsoft Exchange,
with the MSN service) is the caller's BBS mail, and the Chat folder holds
the BBS's chat rooms, where MSN callers talk with everyone else in them.
The Files folder holds the file areas, whose files download, and Find
searches all of it. This is early work, not yet tried with a real client.
MSN client that came with Windows 95 ("MSN Classic"). These are the
functions:
- A caller signs in with the BBS name and password.
- MSN Central is the BBS.
- The Categories folder holds the message areas of the BBS (a folder for
each area group).
- Each area opens as an MSN bulletin board. It lists the messages with
their replies below them. The reader opens a message. The Compose
window makes new posts and replies. A member can delete the messages
of that member.
- MSN Today lists the boards with the newest messages.
- The Inbox (Microsoft Exchange, with the MSN service) is the BBS mail of
the caller.
- The Chat folder holds the chat rooms of the BBS. MSN callers talk with
all other users in these rooms.
- The Files folder holds the file areas. Callers can download their
files.
- Find searches all of these items.
This is early work. We did not try it with a real client yet.
## Over TCP
@@ -20,22 +30,22 @@ address = :569
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:569` | where to listen |
| `max_clients` | `64` | clients at once |
| `max_per_ip` | `4` | from one address |
| `address` | `:569` | the address on which to listen |
| `max_clients` | `64` | the maximum number of clients at one time |
| `max_per_ip` | `4` | the maximum number of clients from one address |
The client can't be told a port: it is always 569. It connects to the name
in its Dial-Up Networking settings for "The Microsoft Network" (by default
`gateway.moswest.msn.net`): point that name at the BBS in the hosts file of
the client's machine (`C:\Windows\hosts`), or give the machine the BBS's
[DNS server](DNS).
You cannot give a port to the client: it always uses 569. It connects to
the name in its Dial-Up Networking settings for "The Microsoft Network"
(by default `gateway.moswest.msn.net`). Point that name at the BBS in the
hosts file of the machine of the client (`C:\Windows\hosts`), or give the
[DNS server](DNS) of the BBS to the machine.
## By modem
A modem caller's client sends a carriage return and waits for `COM`, then
speaks MSN's own packets. A listener with `frontend = marvel` answers that
way (telnet, in binary, or raw), so a modem bridge such as D-Modem can hand
the call over as it does for the text BBS:
The client of a modem caller sends a carriage return and waits for
`COM`. Then it uses the MSN packets. A listener with `frontend = marvel`
answers in that way (telnet, in binary, or raw). Thus, a modem bridge
such as D-Modem can give the call to it, as it does for the text BBS:
```ini
[listen msn]
@@ -44,87 +54,103 @@ address = 127.0.0.1:2325
frontend = marvel
```
Point the client's phone number at the line that reaches that listener.
Point the phone number of the client at the line that connects to that
listener.
## What callers get
- **Signing in**: the Sign In dialog's member ID and password are a BBS
account's. A wrong password, an unknown name, a locked account and a
throttled address each get the client's own message, and failed sign-ins
count against the address as everywhere else. A signed-in client is a
node and shows in Who's On as `MSN`. The Password dialog changes the BBS
password. The billing pages show the account's name and location and
keep nothing.
- **The 1996 client** (Windows 95 OSR2, MSN 1.3) signs in with NTLM: it
never sends the password, only an answer to a challenge worked out from
the password's LAN Manager hash. The BBS keeps that hash and the NT
hash for each account, made whenever the password is typed in the clear
(signing in any other way, or setting a password), and bound to the
password, so a password changed somewhere they aren't made leaves them
unused until it is typed again. An account whose hashes aren't kept yet
gets "Password not valid" from this client: sign in once by telnet, the
web or the 1995 client first. The hashes are kept only while MSN Classic
is served (a `[marvel]` section or a `frontend = marvel` listener) or
`[security] ntlm` is on ([MSN 2.x](MSN-2)), and
they are password equivalents, the LM hash a weak one, so the database
needs guarding as a password file does. After signing in, the Password
dialog and the billing pages travel sealed (RC4) under the sign-in's
key, as the client expects.
- **The directory**: only the areas the caller may read are listed. Go
words are the areas' and groups' names (in any case), and `today`.
- **Bulletin boards**: up to the newest few hundred messages of an area
(as many as fit in one reply). Bodies are plain text. A board the caller
may not post in is read-only in the client. A post may come as plain or
rich text (compressed or not); it is kept as plain text, with its reply
threading. Attachments are refused.
- **E-mail**: Exchange's Inbox gets the caller's BBS mail, and a message
read there is marked read. Mail sent from Exchange goes out as BBS mail:
to a member by name, or to an internet address where the BBS sends
e-mail. Rich text is kept as plain text, and an attachment is left out
with a line saying so. If some recipients can't be sent to, the rest
still get it and the sender gets a note from Postmaster naming the ones
that didn't. Deleting a message moves it to the BBS's trash.
- **The address book**: the BBS's members (not locked accounts or QWK
nodes), for Exchange's member list, for names typed into To:, and for
the Member Properties sheet (name, location and the About text). With
them come the caller's own saved addresses, so a saved name typed into
To: finds its address on any PC. The saved addresses are the same ones
as CompuServe's Address Book, and an internet address the caller mails
from Exchange is added to them (unless its name or address is there
already). Exchange's own Personal Address Book stays on the caller's
PC: the client never tells the server what it adds there.
- **Signing in**: the member ID and password of the Sign In dialog are
those of a BBS account. An incorrect password, an unknown name, a
locked account and a throttled address each get the applicable message
of the client. Failed sign-ins count against the address, as on all
other routes. A client that signed in is a node, and it shows in Who's
On as `MSN`. The Password dialog changes the BBS password. The billing
pages show the name and location of the account, and keep nothing.
- **The 1996 client** (Windows 95 OSR2, MSN 1.3) signs in with NTLM. It
never sends the password. It sends only an answer to a challenge, which
it calculates from the LAN Manager hash of the password. The BBS keeps
that hash and the NT hash for each account. It makes them each time
that the user types the password in clear text (a sign-in with a
different method, or a new password). The hashes are bound to the
password. Thus, if a password changes in a location that does not make
the hashes, the BBS does not use them until the user types the
password again.
If the BBS does not keep the hashes of an account yet, this client
gets "Password not valid". In that case, first sign in one time by
telnet, the web or the 1995 client. The BBS keeps the hashes only
while it serves MSN Classic (a `[marvel]` section or a
`frontend = marvel` listener), or while `[security] ntlm` is on
([MSN 2.x](MSN-2)). The hashes are equivalent to passwords, and the LM
hash is a weak hash. Thus, you must protect the database as you
protect a password file. After the sign-in, the Password dialog and
the billing pages go sealed (RC4) with the key of the sign-in, as the
client expects.
- **The directory**: the BBS lists only the areas that the caller can
read. Go words are the names of the areas and groups (with upper or
lower case), and `today`.
- **Bulletin boards**: up to the newest some hundred messages of an area
(the quantity that fits in one reply). Bodies are plain text. If the
caller cannot post on a board, the board is read-only in the client. A
post can come as plain or rich text (compressed or not). The BBS keeps
it as plain text, with its reply threading. The BBS refuses
attachments.
- **E-mail**: the Exchange Inbox gets the BBS mail of the caller. When
the caller reads a message there, the BBS marks it as read. Mail sent
from Exchange goes out as BBS mail: to a member by name, or to an
internet address if the BBS sends e-mail. The BBS keeps rich text as
plain text. It removes an attachment and adds a line that tells this.
If the BBS cannot send to some recipients, the other recipients still
get the mail. The sender gets a note from Postmaster with the names of
the recipients that did not get it. When the caller deletes a message,
the BBS moves it to the trash of the BBS.
- **The address book**: the members of the BBS (not locked accounts or
QWK nodes). The BBS uses them for the member list of Exchange, for
names typed into To:, and for the Member Properties sheet (name,
location and the About text). The address book also has the saved
addresses of the caller. Thus, a saved name typed into To: finds its
address on all PCs. The saved addresses are the same as those in the
Address Book of CompuServe. When the caller sends mail from Exchange
to an internet address, the BBS adds the address to them (unless its
name or address is already there). The Personal Address Book of
Exchange stays on the PC of the caller. The client never tells the
server what it adds there.
- **Chat**: the Chat folder (go word `chat`, in MSN Central and in
Categories) lists the main room, the permanent rooms and those in use,
with each one's topic and how many are in it. Opening one joins it in
the chat window, with everyone already there listed. MSN callers share
rooms with telnet, IRC and every other caller, and with linked rooms on
other networks. `/me` at the start of a line is an action. Sysop rooms
aren't listed, and rooms can't be made from the client.
Categories) lists the main room, the permanent rooms and the rooms in
use. It shows the topic of each room and the number of users in it.
When the caller opens a room, the caller joins it in the chat window,
with a list of all the users that are already there. MSN callers share
rooms with telnet, IRC and all other callers, and with linked rooms on
other networks. `/me` at the start of a line is an action. The BBS
does not list sysop rooms. Callers cannot make rooms from the client.
- **Files**: the Files folder (go word `files`, in MSN Central and in
Categories) has a folder for each file area the caller may download
from. Each file is a Download-and-Run file, as MSN's own downloads
were: opening it has the client's File Transfer Manager fetch it, with
its progress window, and then the client opens it as Explorer would (a
program runs; a `.zip` opens in whatever the PC opens those with). The
file lands in the PC's temporary folder, so a caller who wants to keep
it saves it from there. Each download counts against the caller's
daily limit and ratio, as it does everywhere else.
- **Find**: Find > The Microsoft Network searches the directory's names
and descriptions: folders, boards, chat rooms, file libraries and files
(not the messages in a board). The words and wildcards work as the
dialog's help says: a word matches whole words, `*` and `?` stand in
for letters, and a quoted phrase matches its words in order. The "of
type" list narrows it (bulletin boards, chat rooms, "Kiosks and other
files" for the files, newsgroups for the areas that carry one). Nothing
here has a place, so a search with Place filled in finds nothing. At
most 200 results come back.
Categories) has a folder for each file area from which the caller can
download. Each file is a Download-and-Run file, as the downloads of
MSN were. When the caller opens it, the File Transfer Manager of the
client gets it, with its progress window. Then the client opens it as
Explorer does (a program runs. A `.zip` opens in the program that the
PC uses for these files). The file goes into the temporary folder of
the PC. Thus, if a caller wants to keep it, the caller must save it
from there. Each download counts against the daily limit and ratio of
the caller, as on all other routes.
- **Find**: Find > The Microsoft Network searches the names and
descriptions of the directory: folders, boards, chat rooms, file
libraries and files (not the messages in a board). The words and
wildcards operate as the help of the dialog tells. A word matches full
words. `*` and `?` replace letters. A quoted phrase matches its words
in sequence. The "of type" list makes the search narrower (bulletin
boards, chat rooms, "Kiosks and other files" for the files, newsgroups
for the areas that carry one). No item here has a place. Thus, a
search with Place filled in finds nothing. A search gives a maximum of
200 results.
Not served yet: the sign-up wizard and MSN Today's Media Viewer title.
Not served yet: the sign-up wizard and the Media Viewer title of MSN
Today.
## Where the protocol comes from
The protocol, codenamed Marvel, was reverse-engineered by the
[marvel-msn](https://github.com/gabspeck/marvel-msn) project, whose notes
and wire captures this server is written from. None of that project's
code is used.
The [marvel-msn](https://github.com/gabspeck/marvel-msn) project
reverse-engineered the protocol (codename Marvel). We wrote this server
from the notes and wire captures of that project. We do not use code
from that project.
+129 -113
View File
@@ -1,9 +1,10 @@
The BBS has an MSN Messenger server (MSNP, the protocol of Microsoft's
MSN Messenger), beside its [IRC](IRC) and [AIM](AIM-and-ICQ) servers and
on the same chat. Someone signed in with MSN Messenger 1.0 to 7.5 or
Windows Messenger 4.x sees their BBS friends as contacts and IMs anyone on
the BBS: other MSN users, IRC and AIM users, and callers on telnet, SSH,
3270s and the web terminal.
The BBS has an MSN Messenger server (MSNP, the protocol of MSN Messenger
from Microsoft). This server is adjacent to the [IRC](IRC) and
[AIM](AIM-and-ICQ) servers of the BBS, and it uses the same chat. A user
who signs in with MSN Messenger 1.0 to 7.5 or Windows Messenger 4.x sees
BBS friends as contacts. The user can send IMs to all users on the BBS:
other MSN users, IRC and AIM users, and callers on telnet, SSH, 3270s and
the web terminal.
```ini
[msn]
@@ -18,22 +19,22 @@ tls_key = /etc/bbs/passport.key
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:1863` | where to listen |
| `host` | the address each client came to | where clients are sent for conversations (`host:port`); set it behind NAT |
| `domain` | `bbs.invalid` | users' handles are `name@domain` |
| `max_clients` | `256` | connections at once |
| `max_per_ip` | `16` | from one address (each conversation is a connection) |
| `system` | `BBS` | the name the BBS's notices come from |
| `site` | none | a web address the client's links (inbox, profiles) open |
| `https_address` | none | where the [Passport server](#msn-messenger-50-to-75-passport) listens; without it, MSN 5.0 and later are not served |
| `address` | `:1863` | the address on which to listen |
| `host` | the address to which each client came | the address to which the BBS sends clients for conversations (`host:port`). Set it behind NAT |
| `domain` | `bbs.invalid` | the handles of users are `name@domain` |
| `max_clients` | `256` | the maximum number of connections at one time |
| `max_per_ip` | `16` | the maximum from one address (each conversation is a connection) |
| `system` | `BBS` | the name from which the notices of the BBS come |
| `site` | none | a web address that the links of the client (inbox, profiles) open |
| `https_address` | none | the address on which the [Passport server](#msn-messenger-50-to-75-passport) listens. Without it, the BBS does not serve MSN 5.0 and later |
| `tls_cert`, `tls_key` | none | its certificate, for `nexus.passport.com`, `login.passport.com` and `login.live.com` |
| `passport_host` | the name the client asked the nexus at | where clients are sent to log in (`host[:port]`) |
| `http_address` | none | the Passport server without TLS, behind a proxy that does it |
| `passport_host` | the name at which the client asked the nexus | the address to which the BBS sends clients to log in (`host[:port]`) |
| `http_address` | none | the Passport server without TLS, behind a proxy that does the TLS |
One port serves the messaging: sign-in, the contact list and presence
(the "notification server"), and the conversations ("switchboards").
MSN Messenger 5.0 and later also log in at a Passport server over
HTTPS, which the BBS serves on `https_address`.
One port serves the messages: sign-in, the contact list and presence
(the "notification server"), and the conversations ("switchboards"). MSN
Messenger 5.0 and later also log in at a Passport server over HTTPS. The
BBS serves this on `https_address`.
## Versions served
@@ -43,54 +44,62 @@ HTTPS, which the BBS serves on `https_address`.
| MSNP8 to MSNP11 | MSN Messenger 5.0 to 7.0 | Passport 1.4 (`login2.srf`), over HTTPS |
| MSNP12 | MSN Messenger 7.5 | Passport SOAP (`RST.srf`), over HTTPS |
Third-party clients that speak these versions work too. Windows Live
Messenger (MSNP13 and later) is not served yet: its address book and
sign-in are web services of their own. A client asking only for versions
not served is told so, and the log says why (without `https_address`,
MSNP8 and later are not served).
Third-party clients that use these versions also operate. The BBS does
not serve Windows Live Messenger (MSNP13 and later) yet: its address book
and sign-in are separate web services. If a client asks only for versions
that the BBS does not serve, the BBS tells the client, and the log gives
the reason (without `https_address`, the BBS does not serve MSNP8 and
later).
None of these has been tried with the real clients yet; the tests use
scripted ones.
We did not try these with the real clients yet. The tests use scripted
clients.
## Pointing a client at the BBS
The clients were made for Microsoft's servers, so each must be pointed
at the BBS:
The clients were made for the servers of Microsoft. Thus, you must point
each client at the BBS:
- With the BBS's [DNS server](DNS) (`[dns]`), the callers' machines that
use it are sent here for all of these names, with no hosts file.
- All of them: the server is `messenger.hotmail.com`, so a hosts file
entry sending it to the BBS points any of them here.
- MSN Messenger 1.0 to 4.7: the `Server` value (a string) under
- With the [DNS server](DNS) of the BBS (`[dns]`), the machines of
callers that use it come here for all of these names, with no hosts
file.
- All clients: the server is `messenger.hotmail.com`. Thus, an entry in
the hosts file that sends this name to the BBS points all clients
here.
- MSN Messenger 1.0 to 4.7: set the `Server` value (a string) under
`HKEY_CURRENT_USER\Software\Microsoft\MessengerService` in the
registry, set to the BBS's host (with `:1863` if the port is another).
A hosts file entry sending `messenger.hotmail.com` to the BBS may also
work. Neither has been tried with the real clients yet.
- Third-party clients (aMSN, Miranda, Trillian and others) take a server
and port in the account's settings.
registry to the host of the BBS (with `:1863` if the port is
different). An entry in the hosts file that sends
`messenger.hotmail.com` to the BBS can also operate. We did not try
these methods with the real clients yet.
- Third-party clients (aMSN, Miranda, Trillian and others) accept a
server and port in the settings of the account.
The deny list and bans in `[security]` apply as they do everywhere else.
The deny list and bans in `[security]` apply, as on all other routes.
## MSN Messenger 5.0 to 7.5: Passport
From MSN Messenger 5.0 the client gives its password not to the
messaging server but to Passport, over HTTPS, and hands the messaging
server the ticket Passport gave it. The BBS is that Passport server too
when `https_address` is set, and checks the password as any login's:
From MSN Messenger 5.0, the client does not give its password to the
messaging server. It gives it to Passport, over HTTPS. Then it gives the
messaging server the ticket from Passport. When `https_address` is set,
the BBS is also that Passport server. It checks the password as for all
logins:
- `nexus.passport.com/rdr/pprdr.asp` says where to log in
(`passport_host`, or the name the client asked at).
- `nexus.passport.com/rdr/pprdr.asp` tells the client where to log in
(`passport_host`, or the name at which the client asked).
- `login.passport.com/login2.srf` (Passport 1.4) logs in MSN 5.0 to 7.0.
- `login.live.com/RST.srf` (Passport SOAP) logs in MSN 7.5.
A ticket is good once, for ten minutes, for the account it was given to.
A ticket is valid one time, for ten minutes, for the account that got
it.
The machine running the client must send those three names to the BBS
(its hosts file) and trust `tls_cert` for them. No public certificate
authority signs for Microsoft's names, so make a small certificate
authority of your own, sign a certificate for the three names with it,
and add the authority's certificate (`ca.crt`) to the machine's trusted
roots:
The machine that runs the client must send those three names to the BBS
(in its hosts file) and trust `tls_cert` for them. No public certificate
authority signs for the names of Microsoft. Thus, do these steps:
1. Make a small certificate authority of your own.
2. With it, sign a certificate for the three names.
3. Add the certificate of the authority (`ca.crt`) to the trusted roots
of the machine.
```sh
openssl req -x509 -newkey rsa:2048 -sha256 -days 3650 -nodes \
@@ -102,81 +111,88 @@ openssl x509 -req -in passport.csr -CA ca.crt -CAkey ca.key -CAcreateserial \
-days 3650 -sha256 -extfile san.txt -out passport.crt
```
The hosts file entries, with the BBS at 192.0.2.1:
The entries in the hosts file, with the BBS at 192.0.2.1:
```
192.0.2.1 messenger.hotmail.com nexus.passport.com login.passport.com login.live.com
```
Windows XP
speaks only TLS 1.0 with old ciphers (3DES, RC4); the Passport server
takes those as well as current ones. With a proxy doing TLS in front of
the BBS, set `http_address` instead and send the proxy's requests there.
Windows XP uses only TLS 1.0 with old ciphers (3DES, RC4). The Passport
server accepts those, and also current ciphers. If a proxy does TLS in
front of the BBS, set `http_address` in place of `https_address`, and
send the requests of the proxy there.
## Signing in
Every MSN user is a BBS user. They sign in with `name@domain` as the
e-mail address (a name with spaces may be typed with or without them,
`CarolAnn@msn.example.org`) and their BBS password. The domain part is not
checked, so a client that insists on `@hotmail.com` (MSN 1.0) works too.
Failed sign-ins count towards the throttle and the hack log, like any
other login, and the user's access level must allow chat. One account is
signed in on one MSN client at a time: signing in again signs the older
one out.
Each MSN user is a BBS user. The user signs in with `name@domain` as the
e-mail address and with the BBS password. You can type a name with
spaces with or without the spaces (`CarolAnn@msn.example.org`). The BBS
does not check the domain part. Thus, a client that must have
`@hotmail.com` (MSN 1.0) also operates. Failed sign-ins count towards
the throttle and the hack log, as all other logins do. The access level
of the user must permit chat. One account can be signed in on one MSN
client at a time. A new sign-in signs out the older one.
MSN Messenger 5.0 and later sign in by [Passport](#msn-messenger-50-to-75-passport),
which checks the password itself. MSN 1.0 to 4.7 send the password as an
MD5 digest, which the BBS's password
hashes can't check. So the BBS keeps each account's MSN digest too, made
whenever the password is known: when the account is made, when its
password is set, and at any login by password. An account from before
`[msn]` was set up has none yet: its user logs in once some other way
(telnet, SSH, IRC, AIM, the web) and can then sign in with MSN. The log
says so when that is why a sign-in failed. The digest is kept only while
`[msn]` is set up. MSN's challenge for an account is the same each time,
as it was on Microsoft's servers, so anyone who saw a sign-in on the wire
(or read the digest from the database) could sign in by MSN as that
user. The connection is not encrypted.
MSN Messenger 5.0 and later sign in by
[Passport](#msn-messenger-50-to-75-passport), which checks the password
itself. MSN 1.0 to 4.7 send the password as an MD5 digest. The password
hashes of the BBS cannot check this digest. Thus, the BBS also keeps the
MSN digest of each account. It makes it each time that it knows the
password: when the account is made, when the password is set, and at all
logins by password. An account from before the configuration of `[msn]`
has no digest yet. Its user must log in one time by a different method
(telnet, SSH, IRC, AIM, the web). Then the user can sign in with MSN. If
this is the cause of a failed sign-in, the log tells you.
The BBS keeps the digest only while `[msn]` is configured. The MSN
challenge for an account is the same each time, as it was on the servers
of Microsoft. Thus, a person who saw a sign-in on the wire (or read the
digest from the database) can sign in by MSN as that user. The
connection is not encrypted.
## Contacts
The contact list is the user's [friends list](Chat-and-Paging#friends),
the same list the BBS's chat, IRC and AIM show, with its groups (MSN
Messenger 4.6 and later show them). A contact is always a BBS user;
adding anyone else is refused. A friend added elsewhere comes to a
client that is on at once, and one added or removed on MSN is on or off
the list everywhere. Someone who adds an MSN user is on their reverse
list, so the client asks "X has added you to their contact list".
Groups made on MSN are kept with the friends in them: a group left
empty is gone at the next sign-in.
The contact list is the [friends list](Chat-and-Paging#friends) of the
user. It is the same list that the chat of the BBS, IRC and AIM show,
with its groups (MSN Messenger 4.6 and later show them). A contact is
always a BBS user. The BBS refuses all other contacts. If you add a
friend on a different route, a client that is on gets it immediately. If
you add or remove a contact on MSN, the change applies on all routes. If
a user adds an MSN user, that user is on the reverse list of the MSN
user. Thus, the client asks "X has added you to their contact list". The
BBS keeps groups made on MSN with the friends in them. If a group is
empty, it is removed at the next sign-in.
The block list is the user's [blocked list](Chat-and-Paging#blocking),
shared with the chat's `/block`: a blocked user's messages are refused
however they come, and the user appears offline to them. "Only people on
my Allow List can see my status" shows the user offline to those not on
their friends list.
The block list is the [blocked list](Chat-and-Paging#blocking) of the
user. The chat command `/block` uses the same list. The BBS refuses the
messages of a blocked user on all routes, and the user shows as offline
to the blocked user. "Only people on my Allow List can see my status"
shows the user as offline to the users who are not on the friends list.
A contact is online while they are on the BBS by any route: with the
status their MSN client set (busy, away, appearing offline...), or plain
online on any other route. Between MSN clients 5.0 and later, display
pictures and the personal message (MSN 7.0 and later) pass as they did.
A contact is online while the contact is on the BBS by any route. The
contact has the status that the MSN client of the contact set (busy,
away, appear offline...), or plain online on all other routes. Between
MSN clients 5.0 and later, display pictures and the personal message
(MSN 7.0 and later) go across as they did on the servers of Microsoft.
## Conversations
An IM to an MSN user opens a conversation on their client as usual. An
IM to a BBS user on another route puts them in the conversation at once:
what is said reaches them as a private message (a `PRIVMSG` on IRC, an
IM on AIM, a message line on a terminal), and what they send back comes
into it. A private message from someone not on MSN opens a conversation
with them on the client. Conversations of several MSN users work as they
did on Microsoft's servers; typing notices and invitations pass between
MSN clients, not to other routes.
An IM to an MSN user opens a conversation on the client, as usual. An IM
to a BBS user on a different route puts that user in the conversation
immediately. The text goes to that user as a private message (a
`PRIVMSG` on IRC, an IM on AIM, a message line on a terminal). The
answers of that user come into the conversation. A private message from
a user who is not on MSN opens a conversation with that user on the
client. Conversations of more than one MSN user operate as they did on
the servers of Microsoft. Typing notices and invitations go between MSN
clients, not to other routes.
Every line is [kept](Chat-and-Paging#private-messages). One to a user who
isn't on is kept for them, and the sender told so (once); they get it
when they next log in. Lines kept for an MSN user come when they sign in,
in a conversation from each sender, marked with when they were sent. The
BBS's notices (new mail, a page for the sysop) come from the `system`
name. Calling someone who is offline is refused, as on Microsoft's
servers: to leave a message for them, use their conversation while it is
open, or another route.
The BBS [keeps](Chat-and-Paging#private-messages) each line. If a user
is not on, the BBS keeps the line for the user, and tells the sender
(one time). The user gets it at the next login. Lines kept for an MSN
user come at the sign-in, in one conversation from each sender, with
the time that they were sent. The notices of the BBS (new mail, a page
for the sysop) come from the `system` name. The BBS refuses a call to a
user who is offline, as the servers of Microsoft did. To leave a message
for that user, use the conversation with the user while it is open, or
use a different route.
+40 -37
View File
@@ -1,6 +1,6 @@
This page describes what callers can do in the message areas, on any
terminal. The letters are the keys on a text terminal, and the PF keys are
a 3270's.
This page tells what callers can do in the message areas, on all
terminals. The letters are the keys on a text terminal. The PF keys are
the keys of a 3270.
## The areas
@@ -15,30 +15,32 @@ Area number, [N]ew scan, [T]o you, [F]ind, [S]can setup, [Q]uit:
| Action | Key | PF | What it does |
|---|---|---|---|
| an area | its number | `S` by it | its messages, a page at a time |
| new scan | `N` | PF5 | reads the new messages of each area in the scan, area after area |
| to you | `T` | PF4 | the newest 100 messages addressed to you (in any case), in the areas you read; `*` those you have not read |
| find | `F` | PF10 | messages whose subject, text or author has the words in them (in any case, two characters or more), newest first, up to 100 |
| scan setup | `S` | PF11 | which areas the new scan goes through |
| add area | `+` | PF6 | the sysop only |
| an area | its number | `S` adjacent to it | shows its messages, one page at a time |
| new scan | `N` | PF5 | reads the new messages of each area in the scan, one area after the other |
| to you | `T` | PF4 | shows the newest 100 messages to you (with upper or lower case), in the areas that you read. `*` shows the messages that you did not read |
| find | `F` | PF10 | shows the messages that have the words in their subject, text or author (with upper or lower case, two characters or more). The newest come first, with a maximum of 100 |
| scan setup | `S` | PF11 | selects the areas for the new scan |
| add area | `+` | PF6 | for the sysop only |
## Scan setup
Every area is in the new scan until the caller takes it out. Typing an
area's number (or `S` beside it on a 3270) switches it in or out, `A`
(PF5) puts every area in, and `X` (PF6) takes every area out. Areas marked
`*` are in the scan. The choice is kept with the account.
All areas are in the new scan until the caller removes them. To put an
area in the scan or remove it, type the number of the area (or `S`
adjacent to it on a 3270). `A` (PF5) puts all areas in. `X` (PF6) removes
all areas. Areas with the mark `*` are in the scan. The BBS keeps the
selection with the account.
If the sysop has put areas in groups, they are listed by group (areas in
no group first), with a Group column.
If the sysop put areas in groups, the BBS lists them by group, with a
Group column. Areas that are not in a group come first.
## In an area
An area lists its messages a page at a time (Enter for more on a text
terminal, PF7/PF8 on a 3270), with `*` marking those not yet read. Typing
a message's number reads it, even if it is not on the page. `R` (PF5)
reads from the first new message, `P` (PF6) posts, and `L` (PF9) posts a
poll: a question and 2 to 10 answers, separated by `|`.
An area lists its messages one page at a time (Enter for more on a text
terminal, PF7/PF8 on a 3270). A `*` shows the messages that you did not
read yet. To read a message, type its number, also if it is not on the
page. `R` (PF5) reads from the first new message. `P` (PF6) posts a
message. `L` (PF9) posts a poll: a question and 2 to 10 answers, with
`|` between them.
## Reading
@@ -48,30 +50,31 @@ poll: a question and 2 to 10 answers, separated by `|`.
| previous | `P` | PF10 |
| reply in the area | `R` | PF4 |
| reply by mail | `M` | PF5 |
| delete (yours, or any for the sysop) | `D` | PF9 |
| vote it up or down (or take your vote back) | `V` | PF1 |
| the thread: every message from the one it began with, replies under what they answer | `T` | PF6 |
| the message this answers | `O` | PF2 |
| answer a poll (again: your answer changes) | `A` | PF12 |
| delete (your messages, or all messages for the sysop) | `D` | PF9 |
| vote for or against it (or remove your vote) | `V` | PF1 |
| the thread: all the messages from the first one, with replies below the messages that they answer | `T` | PF6 |
| the message that this message answers | `O` | PF2 |
| answer a poll (if you answer again, your answer changes) | `A` | PF12 |
| back | `Q` | PF3 |
A message's votes appear beside its number (`+3 -1`). A poll's answers
appear under its text with each answer's share, and your answer is marked
`*`.
The votes for a message show adjacent to its number (`+3 -1`). The
answers of a poll show below its text, with the share of each answer. The
mark `*` shows your answer.
## Aliases and signatures
In the profile, `I` sets an alias and `G` sets a signature (up to three
lines). In an area where the sysop allows aliases, posting asks whether to
post under the alias. The message is then from the alias (in newsgroups
and echoes too), although the sysop can still see who wrote it. An alias
is checked like a new user's name, and cannot be anyone else's name or
alias. The signature goes under every post and mail written on the BBS.
lines). If the sysop permits aliases in an area, the BBS asks if you want
to post with the alias. Then the message is from the alias (also in
newsgroups and echoes). But the sysop can still see the author. The BBS
checks an alias in the same way as the name of a new user. An alias
cannot be the name or alias of a different user. The signature goes
below each post and mail that you write on the BBS.
Reading in an area marks the area read up to that point. Reading messages
found by *To you* or *Find* does not, so the new scan still shows those
messages as new.
When you read in an area, the BBS marks the area as read up to that
point. When you read messages from *To you* or *Find*, the BBS does not
mark them. Thus, the new scan still shows those messages as new.
For how to write messages, see [Writing messages](Writing-Messages).
For how to write messages, refer to [Writing messages](Writing-Messages).
**See also:** [Administration](Administration#message-areas), [TN3270](TN3270)
+148 -135
View File
@@ -1,15 +1,19 @@
Modem callers reach the BBS through the D-Modem suite, in one of two ways:
straight from the call through
[app_dmodem](https://github.com/D-Modem/D-Modem/blob/main/docs/asterisk.md),
D-Modem's Asterisk application, or through
[modemmenu](https://github.com/D-Modem/menu) after its login. This page
covers both, how to give callers the same password everywhere, and how
the BBS works out where callers are.
Modem callers connect to the BBS through the D-Modem suite, in one of two
ways:
- Directly from the call through
[app_dmodem](https://github.com/D-Modem/D-Modem/blob/main/docs/asterisk.md),
the Asterisk application of D-Modem.
- Through [modemmenu](https://github.com/D-Modem/menu) after its login.
This page tells about the two ways. It also tells how to give callers
the same password on all routes, and how the BBS finds the locations of
callers.
## Straight from app_dmodem
app_dmodem's `[bbs]` profile hands each call to a TCP server as raw
bytes. The sample's `[listen modem]` is that server:
The `[bbs]` profile of app_dmodem gives each call to a TCP server as raw
bytes. The `[listen modem]` of the sample is that server:
```
; dmodem.conf
@@ -24,26 +28,26 @@ type = raw
address = 127.0.0.1:2323
```
The caller then logs in to the BBS, or signs up. Over a raw line the BBS
Then the caller logs in to the BBS, or signs up. Over a raw line, the BBS
asks the terminal for its cursor position. An ANSI terminal (SyncTERM,
Telix, Qmodem, HyperTerminal in ANSI mode) answers, and the answer also
tells the BBS the screen size; any other terminal gets plain text. Text is
7-bit ASCII unless the caller turns UTF-8 on. If app_dmodem sends a session
header (`header = yes`), the BBS learns the call's rate and caller ID; set
`header = yes` on the listener too.
Telix, Qmodem, HyperTerminal in ANSI mode) answers. The answer also tells
the BBS the screen size. All other terminals get plain text. Text is
7-bit ASCII unless the caller enables UTF-8. If app_dmodem sends a
session header (`header = yes`), the BBS gets the rate and caller ID of
the call. Also set `header = yes` on the listener.
## Behind modemmenu
modemmenu logs the caller in first and offers the BBS as an item in its
menu. There are three ways for it to hand the caller over, from the
simplest to the most closely linked.
modemmenu logs in the caller first, and offers the BBS as an item in its
menu. There are three ways for modemmenu to give the caller to the BBS.
The list starts with the simplest and ends with the most closely linked.
**rlogin** is modemmenu's default for a BBS. It sends the caller's
password as the rlogin client user and their name as the server user
(Synchronet's convention). The BBS checks them against its own accounts.
If they do not match (the user has no account on the BBS, or a different
password), the caller is asked to log in, with their name already filled
in.
**rlogin** is the default of modemmenu for a BBS. It sends the password
of the caller as the rlogin client user, and the name as the server user
(the convention of Synchronet). The BBS checks them against its own
accounts. If they do not agree (the user has no account on the BBS, or a
different password), the BBS asks the caller to log in, with the name
already filled in.
```
; modemmenu.conf
@@ -61,12 +65,12 @@ type = rlogin
address = 127.0.0.1:2513
```
**A unix socket with the session header** lets the BBS trust modemmenu's
login (`trust_user`). Callers do not need an account on the BBS first:
`create_users = yes` creates one for each new name. Such an account has
no BBS password of its own; it logs in this way, or with the modemmenu
password (described below). The rate, caller ID and number from the
header appear in the log and in Who's online.
**A unix socket with the session header** lets the BBS trust the login of
modemmenu (`trust_user`). Callers do not need an account on the BBS
first: `create_users = yes` creates one for each new name. This type of
account has no BBS password of its own. It logs in in this way, or with
the modemmenu password (refer to the text below). The rate, caller ID and
number from the header show in the log and in Who's online.
```
; modemmenu.conf
@@ -90,23 +94,24 @@ socket_mode = 0660
socket_group = asterisk
```
`trust_user` trusts whoever can connect, so make sure only modemmenu's
user can reach the socket (Asterisk's group with mode 0660, or mode 0600
and the same user). `bbs check` warns about a trusting socket or port that
others can reach.
`trust_user` trusts all processes that can connect. Thus, make sure that
only the user of modemmenu can get to the socket (the group of Asterisk
with mode 0660, or mode 0600 and the same user). `bbs check` gives a
warning about a trusting socket or port that others can get to.
**telnet** works too (`mode = telnet`, `port = 2300`). modemmenu's telnet
client says it is an `ANSI` terminal, and the caller logs in again.
**telnet** also operates (`mode = telnet`, `port = 2300`). The telnet
client of modemmenu says that it is an `ANSI` terminal, and the caller
logs in again.
## The same password for telnet, SSH and the web
Accounts that modemmenu logs in have no password on the BBS. With
modemmenu's auth socket, the same people can log in to the BBS any other
way (telnet, SSH, TN3270, the web forum and terminal, the API, FTP, NNTP,
IRC) with their modemmenu password. The BBS asks modemmenu, and modemmenu
asks its own backends (its users file, LDAP, SQL, or the system's accounts
through PAM), just as it does at its own login prompt. The BBS keeps
nothing of the password.
Accounts that modemmenu logs in have no password on the BBS. With the
auth socket of modemmenu, the same persons can log in to the BBS by all
other routes (telnet, SSH, TN3270, the web forum and terminal, the API,
FTP, NNTP, IRC) with their modemmenu password. The BBS asks modemmenu.
modemmenu asks its own backends (its users file, LDAP, SQL, or the
accounts of the system through PAM), as it does at its own login prompt.
The BBS keeps no part of the password.
```
; modemmenu.conf: answered by modemmenu -serve, or modemmenu -authd alone
@@ -123,44 +128,46 @@ auth_socket = /run/modemmenu/auth.sock
| `[modemmenu]` key | Default | What it sets |
|---|---|---|
| `auth_socket` | none | modemmenu's `[authd] listen` |
| `create_users` | `yes` | a user modemmenu knows and the BBS does not gets an account at their first login (any way in), as `create_users` does for a listener: a name the BBS takes, not refused by `name_deny_file` |
| `timeout` | `15` | seconds for modemmenu's answer (a wrong password comes after its `fail_delay`) |
| `auth_socket` | none | the `[authd] listen` of modemmenu |
| `create_users` | `yes` | if modemmenu knows a user and the BBS does not, the user gets an account at the first login (by any route), as `create_users` does for a listener. The name must be a name that the BBS accepts, and `name_deny_file` must not refuse it |
| `timeout` | `15` | seconds for the answer of modemmenu (the answer for an incorrect password comes after its `fail_delay`) |
The BBS asks modemmenu only about accounts modemmenu created (external
accounts with no BBS password). An account with its own BBS password keeps
it, and the modemmenu password does not open it. A wrong password counts
as a failed login like any other (throttling, the hack log). If modemmenu
does not answer, the caller is told there is a problem, and it is not
counted against them. These passwords are changed in modemmenu (or its
backend), not in the BBS.
The BBS asks modemmenu only about accounts that modemmenu created
(external accounts with no BBS password). An account with its own BBS
password keeps it, and the modemmenu password does not open it. An
incorrect password counts as a failed login, as all others do
(throttling, the hack log). If modemmenu does not answer, the BBS tells
the caller that there is a problem, and does not count it against the
caller. Change these passwords in modemmenu (or its backend), not in the
BBS.
Callers can also sign in without typing a password. While signed in on
the BBS, the sign-in code in *Your profile* (`C`) signs in to the web
forum once, within five minutes (see
[Web forum](Web-Forum#sign-in-codes)), and SSH keys added there (`K`) log
in by SSH with no password.
Callers can also sign in without a password. While a caller is signed in
on the BBS, the sign-in code in *Your profile* (`C`) signs in to the web
forum one time, within five minutes (refer to
[Web forum](Web-Forum#sign-in-codes)). SSH keys added there (`K`) log in
by SSH with no password.
## Where callers are
With `[general] phone_country` set, the BBS reads modem callers' numbers
using each country's numbering plan. From a number it learns:
If `[general] phone_country` is set, the BBS reads the numbers of modem
callers with the numbering plan of each country. From a number, it
finds:
- the country, even where countries share a calling code (Jersey and
Britain, Kazakhstan and Russia, Jamaica and the US);
- what kind of number it is (fixed line, mobile, toll-free, premium rate,
VoIP and so on);
- the place it is in, down to the exchange where the plan says (*Jersey
City, NJ*, *Ontario*, *London*, *Berlin*, *Tokyo*; 151 calling codes have
places).
- The country, also where countries share a calling code (Jersey and
Britain, Kazakhstan and Russia, Jamaica and the US).
- The type of number (fixed line, mobile, toll-free, premium rate, VoIP
and other types).
- The place of the number, down to the exchange if the plan gives it
(*Jersey City, NJ*, *Ontario*, *London*, *Berlin*, *Tokyo*. 151 calling
codes have places).
International numbers (`+44 20...`) are read whatever `phone_country` is.
National numbers, which is how exchanges mostly send them, are read the
way that country dials, with its trunk and international prefixes removed
(`4155550123`, `1 415 555 0123` and `011 44...` with `US`; `020 7123 4567`
and `00 1 415...` with `GB`; `8 495 ...` and `810 ...` with `RU`). A local
number without an area code gives only the country, and a withheld number
gives nothing.
The BBS reads international numbers (`+44 20...`) for all values of
`phone_country`. It reads national numbers, the usual format of
exchanges, as that country dials them, with its trunk and international
prefixes removed (`4155550123`, `1 415 555 0123` and `011 44...` with
`US`. `020 7123 4567` and `00 1 415...` with `GB`. `8 495 ...` and
`810 ...` with `RU`). A local number without an area code gives only the
country. A withheld number gives nothing.
```ini
[general]
@@ -168,34 +175,35 @@ phone_country = US
;geoip = /var/lib/bbs/dbip-country-lite.mmdb ; for callers by address
```
The log records this with each call, writing the number as it is written
from abroad:
The log records this with each call. It writes the number as callers
from other countries write it:
```
node 3: modem on [listen modem]: rate 33600/31200, from 4155550123 (+1 415-555-0123), in San Francisco, CA, United States
node 4: modem on [listen modem]: rate 26400/26400, from 08005550123 (+44 800 555 0123), in United Kingdom (toll-free)
```
Who's online shows each caller's country (from the caller ID, or else
from their address with `[general] geoip`). The sysop's node list (spy,
chat, kick) also shows their number, whether it is a mobile, and the
place. Posts keep the poster's country for the
[web forum's flags](Web-Forum#flags).
Who's online shows the country of each caller (from the caller ID, or
from the address with `[general] geoip`). The node list of the sysop
(spy, chat, kick) also shows the number, if it is a mobile, and the
place. Posts keep the country of the poster for the
[flags of the web forum](Web-Forum#flags).
### By address: countries, regions and cities
Callers by telnet, SSH, the web terminal and the forum are placed by
their address, using the database in `[general] geoip`. A country database
gives a country. A **city** database also gives a region (state, province
or county) and a city, which the log and the sysop's node list show
(*Mountain View, California, United States*); Who's online, the API and
the forum's flags still show only the country. Either kind works, in
either format:
The BBS finds the location of callers by telnet, SSH, the web terminal
and the forum from their address, with the database in
`[general] geoip`. A country database gives a country. A **city**
database also gives a region (state, province or county) and a city. The
log and the node list of the sysop show them
(*Mountain View, California, United States*). Who's online, the API and
the flags of the forum still show only the country. The two types of
database operate, in the two formats:
| Format | Country databases | City databases |
|---|---|---|
| MaxMind DB (`.mmdb`, gzipped or not) | GeoLite2/GeoIP2 Country, DB-IP *IP to Country Lite*, IPinfo's | GeoLite2/GeoIP2 City, DB-IP *IP to City Lite* |
| CSV of ranges (gzipped or not) | DB-IP's (`start,end,CC`), IP2Location LITE DB1 | DB-IP's city (`start,end,continent,CC,region,city,lat,lon`), IP2Location LITE DB3, DB5, DB9, DB11 |
| MaxMind DB (`.mmdb`, gzipped or not) | GeoLite2/GeoIP2 Country, DB-IP *IP to Country Lite*, the database of IPinfo | GeoLite2/GeoIP2 City, DB-IP *IP to City Lite* |
| CSV of ranges (gzipped or not) | the database of DB-IP (`start,end,CC`), IP2Location LITE DB1 | the city database of DB-IP (`start,end,continent,CC,region,city,lat,lon`), IP2Location LITE DB3, DB5, DB9, DB11 |
```ini
[general]
@@ -204,27 +212,31 @@ geoip_credit = IP geolocation by DB-IP
geoip_credit_url = https://db-ip.com
```
DB-IP's free city database is a monthly download
(`https://download.db-ip.com/free/dbip-city-lite-YYYY-MM.mmdb.gz`, 60 MB),
and it can stay gzipped. It takes about 120 MB of memory. Its CSV version
(86 MB gzipped, 7.8 million ranges) takes 135 MB and about 15 seconds to
read, while the `.mmdb` loads at once. The BBS reads the file when it
starts, not at the first call. If you replace the file, it is read again
in the background within a minute, and the old one answers meanwhile. The
reader was checked against MaxMind's own reader on DB-IP's city database
of October 2026, in both formats, and gave the same country, region and
city for 200,000 addresses. The image boards' flags use the same file
(loaded once) unless `[chan] geoip` says otherwise.
The free city database of DB-IP is a monthly download
(`https://download.db-ip.com/free/dbip-city-lite-YYYY-MM.mmdb.gz`, 60 MB).
It can stay gzipped. It uses about 120 MB of memory. Its CSV version (86
MB gzipped, 7.8 million ranges) uses 135 MB and about 15 seconds to
read. The `.mmdb` loads immediately. The BBS reads the file when it
starts, not at the first call. If you replace the file, the BBS reads it
again in the background within one minute. The old file answers during
that time.
The numbering plans come from Google's
[libphonenumber](https://github.com/google/libphonenumber) (Apache License
2.0), and North America's area codes from NANPA's own
[area code report](https://nanpa.com/reports/npa-reports). An area code
NANPA has in service is recognised even where libphonenumber has not
caught up, its state or province is taken from NANPA, and an area code
announced for a later date starts working on that date. Both are built
into the BBS, so nothing is looked up online. To rebuild the tables from
newer data (`internal/phone/gen`):
We checked the reader against the reader of MaxMind on the city database
of DB-IP of October 2026, in the two formats. It gave the same country,
region and city for 200,000 addresses. The flags of the image boards use
the same file (loaded one time) unless `[chan] geoip` sets a different
file.
The numbering plans come from
[libphonenumber](https://github.com/google/libphonenumber) of Google
(Apache License 2.0). The area codes of North America come from the
[area code report](https://nanpa.com/reports/npa-reports) of NANPA. The
BBS recognises an area code that NANPA has in service, also if
libphonenumber does not have it yet. The BBS takes its state or province
from NANPA. An area code that NANPA announced for a later date starts to
operate on that date. The two data sets are part of the BBS. Thus, the
BBS looks up nothing online. To build the tables again from newer data
(`internal/phone/gen`):
```sh
git clone --depth 1 https://github.com/google/libphonenumber
@@ -232,39 +244,40 @@ curl -O https://reports.nanpa.com/public/npa_report.csv
make phone-data LIBPHONENUMBER=libphonenumber NANPA=npa_report.csv
```
The tables were last rebuilt in October 2026, from NANPA's report of 14
October and libphonenumber's data of 8 October (which was then missing
thirteen area codes NANPA had in service). They were checked against
libphonenumber's Go port (nyaruka/phonenumbers) on 34,000 numbers and gave
the same country, kind and place for every one.
We last built the tables in October 2026, from the report of NANPA of 14
October and the data of libphonenumber of 8 October (this data did not
have thirteen area codes that NANPA had in service). We checked them
against the Go port of libphonenumber (nyaruka/phonenumbers) on 34,000
numbers. They gave the same country, type and place for all numbers.
### A modem call by VoIP without a caller ID
When a call has no caller ID, the BBS falls back to the address the call
came from over VoIP, if the modem server tells it (`DMODEM_PEER` in the
If a call has no caller ID, the BBS uses the address from which the call
came over VoIP, if the modem server gives it (`DMODEM_PEER` in the
session header: `203.0.113.5`, `203.0.113.5:5060` or `sip:...@203.0.113.5`
all work). The address is looked up in `[general] geoip` like any other.
This is a best guess: a call that came in through a VoIP provider gives the
provider's address, not the caller's.
all operate). The BBS looks up the address in `[general] geoip`, as all
other addresses. This is only an estimate: a call through a VoIP provider
gives the address of the provider, not the address of the caller.
### New users, and users who share where they are
A new user's *Where are you calling from?* starts filled in with where
their caller ID or address says they are (*San Francisco, CA, United
States*, *London, England, United Kingdom*). They can change it or clear
it. The web forum's sign-up form does the same. `geoip_prefill = no` turns
this off.
For a new user, the BBS fills in *Where are you calling from?* with the
location from the caller ID or the address (*San Francisco, CA, United
States*, *London, England, United Kingdom*). The user can change it or
clear it. The sign-up form of the web forum does the same.
`geoip_prefill = no` disables this.
New users are then asked whether the sysop may see where they call from.
The answer is no unless they say yes, and they can change it at any time
in their profile (*Share where you are with the sysop*), or through the API
(`PATCH /api/v1/me` with `share_location`). For a user who says yes, the
BBS keeps the place at each login, with how it was found (caller ID,
address, VoIP address) and the date. Sysops see it on the user's page (in
the user list, in the sysop's user editor and in `bbs config`) and in the
API's `geo`. A user who stops sharing has what was kept forgotten at once.
`geoip_users = no` stops asking, and stops keeping it. The question is only
asked when there is a way to find the place (`geoip` or `phone_country`).
Then the BBS asks new users if the sysop can see their location. The
answer is no unless the user says yes. The user can change it at all
times in the profile (*Share where you are with the sysop*), or through
the API (`PATCH /api/v1/me` with `share_location`). For a user who says
yes, the BBS keeps the place at each login, with the method (caller ID,
address, VoIP address) and the date. Sysops see it on the page of the
user (in the user list, in the user editor of the sysop and in
`bbs config`) and in the `geo` of the API. If a user stops the share, the
BBS deletes the kept data immediately. `geoip_users = no` stops the
question, and stops the records. The BBS asks the question only if it
has a method to find the place (`geoip` or `phone_country`).
```ini
[general]
+129 -111
View File
@@ -1,6 +1,7 @@
News feeds, each caller's own weather, and stock quotes, under one item
of the main menu (**[N]**), as CompuServe, Prodigy and AOL had them. Each
part is on when its section is in the configuration.
The BBS gives news feeds, the local weather of each caller, and stock
quotes, under one item of the main menu (**[N]**), as CompuServe,
Prodigy and AOL did. Each part is enabled when its section is in the
configuration.
```
News, weather, quotes
@@ -8,7 +9,7 @@ News, weather, quotes
[Q] Stock quotes [B] Back to the main menu
```
Sysop menus reach them with the actions `news` (the menu above),
Sysop menus get to them with the actions `news` (the menu above),
`headlines`, `weather` and `quotes`.
## News feeds
@@ -19,16 +20,17 @@ contact = sysop@example.org
catalog = all
```
A feed's items are posted to a message area of their own, read-only (only
the sysop posts), made the first time the feed is read and listed under
its group. So the news is read wherever areas are: the terminals and
3270s, newsreaders (make the area a newsgroup with `bbs area newsgroup`),
QWK packets, the web forum, gopher and Gemini. **Headlines** lists the
news areas, each with its newest story.
The BBS posts the items of a feed to a read-only message area of their
own (only the sysop posts). The BBS makes the area the first time that it
reads the feed, and lists it under its group. Thus, callers can read the
news in all locations where they read areas: the terminals and 3270s,
newsreaders (make the area a newsgroup with `bbs area newsgroup`), QWK
packets, the web forum, gopher and Gemini. **Headlines** lists the news
areas, each with its newest story.
An item becomes a short message: its headline, its summary as plain text,
a link to the whole story, and where and when it is from. That is what
feeds are published for; the BBS does not fetch the stories themselves.
An item becomes a short message: its headline, its summary as plain
text, a link to the full story, and its source and time. Feeds are
published for this purpose. The BBS does not get the stories.
```
Subj: AI stocks climb after trillions wiped from market values
@@ -42,34 +44,36 @@ https://www.bbc.co.uk/news/articles/c35ynnpzdq51o
-- BBC News, Fri 6 Nov 2026 21:06 UTC
```
RSS 0.9x to 2.0, RSS 1.0 (RDF), Atom and JSON Feed are read, in any
character set. Each feed is read every `every` minutes (with a little
jitter, and less often after failures or when the site asks with
`Retry-After`), and asked only for what changed (`If-None-Match`,
`If-Modified-Since`). An item is posted once: its Message-ID is made from
the feed and the item's id, and remembered after the message is purged.
The first reading of a feed posts at most `max_items` of its newest.
The BBS reads RSS 0.9x to 2.0, RSS 1.0 (RDF), Atom and JSON Feed, in all
character sets. It reads each feed every `every` minutes. It adds a
small random variation, and reads less frequently after failures or
when the site asks with `Retry-After`. It asks only for changes
(`If-None-Match`, `If-Modified-Since`). The BBS posts an item one time
only. It makes the Message-ID from the feed and the id of the item, and
it remembers it after it purges the message. The first time that the BBS
reads a feed, it posts a maximum of `max_items` of the newest items.
`contact` is sent in the User-Agent. The SEC refuses readers without a way
to reach the person running them, and the National Weather Service asks
for one.
The BBS sends `contact` in the User-Agent. The SEC refuses readers that
do not give a method to contact the person who runs them. The National
Weather Service asks for a contact.
### The catalogue
`bbs feeds catalog` lists the feeds the BBS knows. `catalog =` takes `all`,
groups or names:
`bbs feeds catalog` lists the feeds that the BBS knows. `catalog =`
accepts `all`, groups or names:
| Group | Feeds |
|---|---|
| News | BBC World, NPR, AP News (by way of Google News: AP has no feeds of its own), The Guardian, Al Jazeera, CBC, Deutsche Welle, Global Voices |
| News | BBC World, NPR, AP News (through Google News: AP has no feeds of its own), The Guardian, Al Jazeera, CBC, Deutsche Welle, Global Voices |
| Business | BBC Business, NPR Business, SEC press releases, SEC 8-K filings (EDGAR) |
| Technology | BBC Technology, Ars Technica, The Register, Hacker News |
| Science | NASA, USGS earthquakes of magnitude 4.5 and more |
| Government | the Federal Register (significant documents), Congress.gov (most-viewed bills, bills presented to the President, House and Senate floor), the White House, National Weather Service news |
The US government's feeds are in the public domain. The outlets' are
theirs: the BBS shows what they publish in their feeds, with the link.
Reuters and AP stopped publishing feeds (2020, 2024).
The feeds of the US government are in the public domain. The feeds of
the outlets belong to the outlets. The BBS shows what they publish in
their feeds, with the link. Reuters and AP stopped their feeds (2020,
2024).
### Feeds of your own
@@ -83,18 +87,21 @@ every = 60
keep_days = 14
```
`title` is who the messages are from (the feed's own title if not said),
`area` the area (the section's name if not said), `keep_days` how long
messages are kept when the area is made (`bbs area keep` changes it after).
A section named as a catalogue feed changes it (`[feed nasa]` with
`area = Space`), and `enabled = no` leaves it out.
- `title` is the sender of the messages (the title of the feed if you do
not set it).
- `area` is the area (the name of the section if you do not set it).
- `keep_days` is the time that the BBS keeps messages when it makes the
area (`bbs area keep` changes it later).
`bbs feeds read [NAME...]` reads the feeds now, `bbs feeds list` shows
what is configured.
A section with the name of a catalogue feed changes that feed (for
example, `[feed nasa]` with `area = Space`). `enabled = no` removes it.
A news area that is a newsgroup is offered to news peers like any other:
leave feed newsgroups out of a peer's `groups` unless you mean to pass the
news on.
`bbs feeds read [NAME...]` reads the feeds now. `bbs feeds list` shows
the configured feeds.
The BBS offers a news area that is a newsgroup to news peers, as all
other newsgroups. Do not put feed newsgroups in the `groups` of a peer
unless you want to send the news to that peer.
## Your weather
@@ -107,34 +114,38 @@ quake_min = 2.5
alerts_at_login = yes
```
The first time, the caller says where they are: a US ZIP code, a town
(`Springfield, IL`, `Leeds, UK`, `Paris, France`, `Tokyo`), or a latitude
and longitude. Towns are looked up in Open-Meteo's gazetteer (GeoNames);
when there are several of that name, the caller chooses. ZIP codes are
the US Census Bureau's tabulation areas, built into the BBS. The place is
kept with the account.
The first time, the caller gives the location: a US ZIP code, a town
(`Springfield, IL`, `Leeds, UK`, `Paris, France`, `Tokyo`), or a
latitude and longitude. The BBS looks up towns in the gazetteer of
Open-Meteo (GeoNames). If there are some towns with that name, the
caller selects one. ZIP codes are the tabulation areas of the US Census
Bureau, which are part of the BBS. The BBS keeps the location with the
account.
The weather screen has, in order:
The weather screen has these parts, in this sequence:
- **Warnings, watches and advisories** in force at that point, from the
National Weather Service (US only), the most serious first, with what
to do.
- **The forecast**: the National Weather Service's seven days in the US;
elsewhere Open-Meteo's (the weather now, then seven days). Open-Meteo
is free for non-commercial use and its data is CC BY 4.0, so the screen
credits it; `international = no` leaves it out.
- **Earthquakes** of the past week within `quake_radius` km of
`quake_min` or more (and great ones, 6 and more, from four times as
far), from the USGS, worldwide. Those with a PAGER alert above green or
a tsunami flag are marked.
- **Warnings, watches and advisories** that apply at that point now,
from the National Weather Service (US only). The most serious come
first, with the instructions.
- **The forecast**: the seven days of the National Weather Service in
the US. In other countries, the forecast of Open-Meteo (the weather
now, then seven days). Open-Meteo is free for non-commercial use and
its data is CC BY 4.0. Thus, the screen gives its credit.
`international = no` removes it.
- **Earthquakes** of the past week within `quake_radius` km, of
`quake_min` or more (and great earthquakes, 6 and more, from four times
that distance), from the USGS, worldwide. The screen marks the
earthquakes with a PAGER alert above green or a tsunami flag.
Units are US (°F, mph) in the US and metric elsewhere; the caller can
change them. With `alerts_at_login`, a caller is told of Severe and
Extreme warnings where they are as they log in.
Units are US (°F, mph) in the US and metric in other countries. The
caller can change them. With `alerts_at_login`, the BBS tells a caller
about Severe and Extreme warnings at the location of the caller at the
login.
What is fetched is kept a while (the NWS's points a day, forecasts half an
hour, alerts five minutes, the earthquake list ten minutes, shared by all),
so callers in one town cost one request.
The BBS keeps the data that it gets for some time (the points of the NWS
for a day, forecasts for half an hour, alerts for five minutes, the
earthquake list for ten minutes, shared by all callers). Thus, callers in
one town cause only one request.
## Stock quotes
@@ -144,20 +155,23 @@ file = /var/lib/bbs/quotes.json.gz
default = SPY DIA QQQ AAPL MSFT
```
The quotes are IEX's (the Investors Exchange): its own trades and quotes,
not the whole market's, with IEX's credit on each screen. Every caller has
a list of symbols (`default` until they add or remove one); a symbol
chosen shows its last trade, open, high, low, close, extended-hours price,
bid and ask, and IEX volume (all the market's, from Alpaca's paid plan).
The quotes come from IEX (the Investors Exchange). They are the trades
and quotes of IEX only, not of the full market, with the credit of IEX
on each screen. Each caller has a list of symbols (`default` until the
caller adds or removes one). For a selected symbol, the screen shows its
last trade, open, high, low, close, extended-hours price, bid and ask,
and IEX volume (the volume of the full market comes from the paid plan
of Alpaca).
### The day before's prices, free (HIST)
IEX publishes each session's whole TOPS feed the next day, free. `bbs
quotes fetch` reads the latest session's file into `file`. The file is
some 16 GB, so it is read as it downloads and nothing of it is kept but
the quotes (a few hundred KB); at 60 MB/s it takes under five minutes. A
download cut off is taken up where it stopped. Run it each morning as an
event:
IEX publishes the full TOPS feed of each session on the next day, free
of charge. `bbs
quotes fetch` reads the file of the latest session into `file`. The file
is about 16 GB. Thus, the BBS reads it during the download, and keeps
only the quotes (some hundred KB). At 60 MB/s, it takes less than five
minutes. If a download stops, the BBS continues it from the point where
it stopped. Run it each morning as an event:
```
[event quotes]
@@ -166,8 +180,9 @@ at = 06:30
timeout = 3600
```
The change from the day before needs the day before's prices: the first
time, fetch the session before by its date, then the latest:
To calculate the change from the day before, the BBS must have the
prices of the day before. The first time, get the previous session by
its date, then the latest:
```
bbs quotes fetch 20261105
@@ -175,12 +190,12 @@ bbs quotes fetch
bbs quotes show AAPL SPY
```
`bbs quotes load FILE` reads a TOPS capture you have (pcap or pcapng,
gzipped or not), and the BBS reads the new file when it changes, with no
restart.
`bbs quotes load FILE` reads a TOPS capture that you have (pcap or
pcapng, with or without gzip). The BBS reads the new file when it
changes, with no restart.
IEX's terms for HIST data ask for its credit ("Data provided for free by
IEX"), which the screens show.
The terms of IEX for HIST data ask for its credit ("Data provided for
free by IEX"). The screens show it.
### Live (TOPS)
@@ -191,16 +206,17 @@ interface = eth1
delay = 15 minutes
```
A sysop who receives IEX's TOPS feed (its real-time feed, or its free
delayed one; both need a connection to IEX) can give its UDP address. The
BBS joins the multicast group and keeps the quotes as they come; `delay`
is told to callers. Without trades yet today, the screens show the file's.
A sysop who receives the TOPS feed of IEX (its real-time feed, or its
free delayed feed. The two must have a connection to IEX) can give its
UDP address. The BBS joins the multicast group and keeps the quotes when
they arrive. The BBS tells callers the `delay`. If there are no trades
yet today, the screens show the data from the file.
The feed is IEX-TP carrying TOPS 1.6 (DEEP's messages are read too:
trades, quotes, official prices, trading status, system events). Test
securities are left out; odd lots count toward volume but not the last
sale, high or low; trades outside regular hours are the extended-hours
price.
The feed is IEX-TP that carries TOPS 1.6 (the BBS also reads the
messages of DEEP: trades, quotes, official prices, trading status,
system events). The BBS ignores test securities. Odd lots count toward
volume, but not toward the last sale, high or low. Trades outside
regular hours are the extended-hours price.
### Live from Alpaca
@@ -212,30 +228,32 @@ alpaca_feed = iex
alpaca_symbols = 30
```
[Alpaca](https://alpaca.markets/data)'s market data needs no connection
to IEX: an account (a paper-trading one will do) gives a key and secret.
Its free plan (`alpaca_feed = iex`) has IEX's trades and quotes, live; a
paid one (`sip`) every US exchange's, and `delayed_sip` them 15 minutes
late.
The market data of [Alpaca](https://alpaca.markets/data) does not need a
connection to IEX. An account (a paper-trading account is sufficient)
gives a key and secret. Its free plan (`alpaca_feed = iex`) has the
trades and quotes of IEX, live. A paid plan (`sip`) has those of all US
exchanges. `delayed_sip` gives them 15 minutes late.
A symbol a caller looks at is fetched then (Alpaca's snapshot: the day so
far, and the day before's close for the change), and followed on Alpaca's
stream: the default symbols and those looked at most recently, up to
`alpaca_symbols` (the free plan allows 30 at a time). What is followed is
fetched again every five minutes; the rest when it is next looked at, if
a minute old. The quotes begin again with each session's first trade, so
nothing need run each morning. The session (before the open, regular
hours, after hours, closed) is by the clock: a weekday with no trades by
9:35 is taken for a holiday.
When a caller looks at a symbol, the BBS gets it at that time (the
snapshot of Alpaca: the day until now, and the close of the day before
for the change). Then the BBS follows it on the stream of Alpaca. It
follows the default symbols and the symbols that callers looked at most
recently, up to `alpaca_symbols` (the free plan permits 30 at a time).
The BBS gets the followed symbols again every five minutes. It gets the
other symbols when a caller next looks at them, if they are one minute
old. The quotes start again with the first trade of each session. Thus,
nothing must run each morning. The BBS finds the session (before the
open, regular hours, after hours, closed) from the clock. If a weekday
has no trades by 9:35, the BBS thinks that it is a holiday.
`bbs quotes alpaca AAPL MSFT` tries the keys: the snapshots, then the
stream for a few seconds. Keep the configuration file 0640, as the keys
are in it.
stream for some seconds. Keep the configuration file at 0640, because
the keys are in it.
Alpaca's terms are for personal, non-commercial use: to make its data
available to others through your own application, they ask for 30 days'
written notice first, and its written consent to republish it. Tell them
of the BBS before you turn this on. `listen` and `alpaca_key` are one or
the other.
The terms of Alpaca are for personal, non-commercial use. To make its
data available to others through your own application, they ask for 30
days of written notice first, and their written consent to republish it.
Tell them about the BBS before you enable this function. Use `listen`
or `alpaca_key`, not the two together.
**See also:** [Message areas](Message-Areas), [Newsgroups and NNTP](Newsgroups-and-NNTP), [Sysop tools](Sysop-Tools)
+55 -42
View File
@@ -1,8 +1,9 @@
A message area becomes a newsgroup when it is given a newsgroup name. Its
messages are then also news articles. Newsreaders (Thunderbird, slrn, tin,
Pan) read and post them through the BBS's NNTP server, and peer news
servers exchange them with it. So a message posted from a modem shows up
on INN, and a reply from a newsreader shows up on a 3270.
If you give a newsgroup name to a message area, the area becomes a
newsgroup. Then its messages are also news articles. Newsreaders
(Thunderbird, slrn, tin, Pan) read and post them through the NNTP server
of the BBS. Peer news servers exchange them with the BBS. Thus, a
message that a caller posts from a modem shows on INN. A reply from a
newsreader shows on a 3270.
```
bbs area newsgroup General bbs.general
@@ -37,50 +38,62 @@ accept_from = news.example.net ; may feed us by IHAVE
## The server
The NNTP server speaks RFC 3977 with the readers' commands (`GROUP`,
`LISTGROUP`, `ARTICLE`/`HEAD`/`BODY`/`STAT`, `NEXT`/`LAST`, `OVER`/`XOVER`,
`HDR`/`XHDR`, `LIST ACTIVE`/`NEWSGROUPS`/`OVERVIEW.FMT`, `NEWNEWS`, `POST`),
`IHAVE` for peers, `AUTHINFO USER/PASS` (RFC 4643) with the BBS's login,
failure delay and throttling, and `STARTTLS` (RFC 4642). Every message has
a Message-ID. A message posted on the BBS is turned into an article (with
From, Date, Path, References from the thread it replies to, and MIME UTF-8
text). An article that came from elsewhere is kept exactly as it arrived,
and shown on the BBS as text: its poster, subject and body are decoded
(quoted-printable, base64, the charset, the text part of a multipart) and
cleaned like anything else a caller writes.
The NNTP server uses RFC 3977 with these commands:
- The commands for readers (`GROUP`, `LISTGROUP`,
`ARTICLE`/`HEAD`/`BODY`/`STAT`, `NEXT`/`LAST`, `OVER`/`XOVER`,
`HDR`/`XHDR`, `LIST ACTIVE`/`NEWSGROUPS`/`OVERVIEW.FMT`, `NEWNEWS`,
`POST`).
- `IHAVE` for peers.
- `AUTHINFO USER/PASS` (RFC 4643) with the login, failure delay and
throttling of the BBS.
- `STARTTLS` (RFC 4642).
Each message has a Message-ID. The BBS changes a message that a caller
posts on the BBS into an article. The article has From, Date, Path,
References from the thread to which it replies, and MIME UTF-8 text. The
BBS keeps an article from a different source exactly as it arrived. It
shows the article on the BBS as text. It decodes the poster, subject and
body (quoted-printable, base64, the charset, the text part of a
multipart). It cleans them as it cleans all other text from callers.
## Peers
The BBS syncs with its peers every `interval` seconds, and whenever you
run `bbs news sync`:
The BBS syncs with its peers every `interval` seconds, and each time that
you run `bbs news sync`:
- *pull*: for each of our newsgroups the peer carries (and `groups`
matches: a wildmat, `bbs.*,!bbs.test`), the articles after the last one
fetched, by `OVER` and `ARTICLE`. The first time, only the latest
`initial` of each group.
- *push*: our articles posted since the last push (on the BBS, by a reader,
or from another peer, never back to the peer they came from), by `IHAVE`;
a server that refuses `IHAVE` to us (a reader-only account) gets `POST`.
The first time only records where to start: the history is not dumped
on a new peer.
- the peer may *feed* us by `IHAVE` from the addresses in `accept_from`;
nobody else may use `IHAVE`. Names there are looked up when the
configuration is loaded (at the start and each reload), not on each
connection: if a peer's address changes, reload, or list its addresses.
- *pull*: for each of our newsgroups that the peer carries (and that
`groups` matches: a wildmat, `bbs.*,!bbs.test`), the BBS gets the
articles after the last article that it got, with `OVER` and
`ARTICLE`. The first time, it gets only the latest `initial` articles
of each group.
- *push*: the BBS sends with `IHAVE` our articles that came after the last
push. These are articles from the BBS, from a reader, or from a
different peer. The BBS never sends an article back to the peer that
sent it. If a server refuses `IHAVE` from us (a reader-only account),
the BBS uses `POST`. The first time, the BBS only records the start
point. It does not send the full history to a new peer.
- The peer can *feed* us with `IHAVE` from the addresses in
`accept_from`. No other system can use `IHAVE`. The BBS looks up the
names there when it loads the configuration (at the start and at each
reload), not on each connection. If the address of a peer changes, do
a reload, or list its addresses.
Each article is taken only once (the BBS keeps a history of Message-IDs,
including refused ones), and never if this site is already in its Path, so
two peers that carry the same group do not loop. It is stored in the first
of its newsgroups that this site carries, and this site's name goes at the
head of its Path. This was tested against INN 2.7 in both directions:
pushing to it, pulling from it, and innxmit feeding the BBS.
The BBS takes each article only one time. It keeps a history of
Message-IDs, also of the articles that it refused. It never takes an
article if this site is already in its Path. Thus, two peers that carry
the same group do not make a loop. The BBS stores the article in the
first of its newsgroups that this site carries. It puts the name of this
site at the start of the Path. We tested this with INN 2.7 in the two
directions: push to it, pull from it, and innxmit as the feed to the BBS.
## Not supported
Control messages (cancel, newgroup, rmgroup) are refused rather than acted
on, and deleting a message on the BBS does not cancel it elsewhere. A
crossposted article lives in only one area here. There is no `NEWGROUPS`
(the sysop creates newsgroups) and no streaming (`CHECK`/`TAKETHIS`),
which suits a BBS's volume.
The BBS refuses control messages (cancel, newgroup, rmgroup). It does
not do the action of these messages. When you delete a message on the
BBS, the message is not cancelled on other servers. A crossposted article
is in only one area here. There is no `NEWGROUPS` (the sysop creates
newsgroups). There is no streaming (`CHECK`/`TAKETHIS`). This is
satisfactory for the volume of a BBS.
**See also:** [FidoNet (the echo-newsgroup gateway)](FidoNet), [Security](Security)
+78 -68
View File
@@ -1,88 +1,94 @@
Callers can read and answer their messages offline with a QWK reader
(MultiMail, OLX, SLMR, Blue Wave's QWK mode, Synchronet's own...). The
BBS packs a caller's new messages into a **packet**. The caller reads it
and writes their answers offline, then brings them back as a **REP**.
(MultiMail, OLX, SLMR, the QWK mode of Blue Wave, the reader of
Synchronet, and others). The BBS puts the new messages of a caller into a
**packet**. The caller reads it and writes the answers offline. Then the
caller sends the answers back as a **REP**.
## The packet
A packet is `BBSID.QWK`: a ZIP of `CONTROL.DAT`, `MESSAGES.DAT`, an index
file for each conference, `PERSONAL.NDX` (the messages to the caller),
`DOOR.ID` and `HELLO` (the message of the day). It holds:
A packet is `BBSID.QWK`. It is a ZIP of `CONTROL.DAT`, `MESSAGES.DAT`, an
index file for each conference, `PERSONAL.NDX` (the messages to the
caller), `DOOR.ID` and `HELLO` (the message of the day). It contains:
- the caller's **unread mail**, in conference 0;
- the **new messages** in the areas of their new scan (the areas they
left out of it stay out of the packet), each area a conference
numbered by its ID. Every area the caller reads is listed, so a reader
can post in one that isn't scanned.
- The **unread mail** of the caller, in conference 0.
- The **new messages** in the areas of the new scan of the caller. The
areas that the caller removed from the new scan are not in the packet.
Each area is a conference, with its ID as the number. The packet lists
all areas that the caller reads. Thus, a reader can post in an area
that is not in the scan.
A packet takes at most 500 new messages from one area, and 3000 in all.
A caller with more waiting takes another packet.
A packet has a maximum of 500 new messages from one area, and 3000 in
total. If more messages wait, the caller gets another packet.
The messages count as read only once the packet has gone: the areas'
pointers move past them and the mail is marked read. A transfer that
fails leaves everything new, for the next packet.
The messages count as read only after the packet goes. Then the pointers
of the areas move past them, and the BBS marks the mail as read. If a
transfer fails, all items stay new for the next packet.
Names and subjects longer than QWK's 25 characters travel as QWKE lines
(`Subject: ...`) at the head of the text, which most readers understand.
Text is CP437.
Names and subjects longer than the 25 characters of QWK go as QWKE lines
(`Subject: ...`) at the start of the text. Most readers know these
lines. Text is CP437.
`BBSID` is made from the system's name: its first 8 letters and digits,
in capitals (`D-Modem BBS` is `DMODEMBB`). `qwk_id` in `[general]` sets
another:
The BBS makes `BBSID` from the name of the system: its first 8 letters
and digits, in capitals (`D-Modem BBS` is `DMODEMBB`). `qwk_id` in
`[general]` sets a different ID:
```ini
[general]
qwk_id = DMODEM
```
Changing it later breaks callers' readers, which file packets under it.
If you change it later, the readers of callers do not operate correctly,
because they file packets under this ID.
## The REP
The caller's answers come back as `BBSID.REP`: a ZIP holding `BBSID.MSG`
(or the `.MSG` file on its own). Each message is posted, or mailed, as
if the caller had written it on the BBS:
The answers of the caller come back as `BBSID.REP`. This is a ZIP that
contains `BBSID.MSG` (or the `.MSG` file alone). The BBS posts or mails
each message, as if the caller wrote it on the BBS:
- conference 0, or a message marked private, goes as mail to its To
(a user, or `Name@zone:net/node` as netmail);
- any other conference is posted in that area, with the caller's access
checked as for any post. The message it answers becomes its reply-to
when that message is in the same area.
- Conference 0, or a message marked private, goes as mail to its To (a
user, or `Name@zone:net/node` as netmail).
- The BBS posts all other conferences in their area. It checks the
access of the caller, as for all posts. If the message that it answers
is in the same area, that message becomes its reply-to.
The REP's From is ignored: the message is from the caller. Messages refused (an
area they can't post in, a user who isn't there) are listed, and the
rest still go. A REP uploaded twice posts once: what each REP brought is
remembered for 90 days.
The BBS ignores the From of the REP: the message is from the caller. The
BBS lists the messages that it refused (an area where the caller cannot
post, a user who does not exist). The other messages still go. If a REP
is uploaded two times, the BBS posts it one time only. The BBS keeps a
record of the contents of each REP for 90 days.
A REP is at most 16 MB and 1000 messages.
A REP has a maximum of 16 MB and 1000 messages.
## Getting it
| Where | The packet | The REP |
|---|---|---|
| text BBS: *O* on the main menu | *D*ownload, by XMODEM, YMODEM, ZMODEM or Kermit | *U*pload, likewise |
| 3270: *O* on the main menu | `IND$FILE GET BBSID.QWK` from the emulator's file transfer, typed on the screen's command line | `IND$FILE PUT BBSID.REP` |
| text BBS: *O* on the main menu | *D*ownload, by XMODEM, YMODEM, ZMODEM or Kermit | *U*pload, in the same way |
| 3270: *O* on the main menu | `IND$FILE GET BBSID.QWK` from the file transfer of the emulator, typed on the command line of the screen | `IND$FILE PUT BBSID.REP` |
| [FTP](Files-and-FTP) | `get /qwk/BBSID.QWK` | `put BBSID.REP` into `/qwk/` |
| [HTTP API](HTTP-API) | `GET /api/v1/qwk` | `POST /api/v1/qwk/rep` |
The FTP directory `/qwk` is there for logged-in users, not anonymous
ones. It hides a file area named `qwk` from them. The packet listed
there is made as it is asked for (and again after a minute). It counts
as taken once all of it has been read.
The FTP directory `/qwk` is for logged-in users, not for anonymous users.
It hides a file area with the name `qwk` from them. The BBS makes the
packet in that directory when the user asks for it (and again after a
minute). The packet counts as taken when the user has read all of it.
A sysop's own menus offer it with `qwk` ([customization](Customization)).
The menus of a sysop can offer it with `qwk` ([customization](Customization)).
## QWK networks
QWK networks (DOVE-Net, FSXNet's QWK side and others) join BBSes through
a **hub**. Each **node** calls the hub as a user, puts a REP of what its
callers wrote in the network's conferences, and takes a packet of what
was written everywhere else. This BBS can be either.
QWK networks (DOVE-Net, the QWK side of FSXNet, and others) connect
BBSes through a **hub**. Each **node** calls the hub as a user. It puts a
REP of the messages that its callers wrote in the conferences of the
network. Then it takes a packet of the messages from all other systems.
This BBS can be a node or a hub.
### As a node
Give each network a `[qwknet NAME]` section: the hub's FTP server, the
account it gave you, and which of its conferences go in which area here.
Give each network a `[qwknet NAME]` section. Put in it the FTP server of
the hub, the account that the hub gave you, and the area here for each
conference of the hub.
```ini
[qwknet dovenet]
@@ -96,37 +102,41 @@ every = 60 ; minutes between calls (0: only when asked)
2002 = DOVE Chat
```
The areas must exist (`bbs area add "DOVE General"`). On each call the
BBS:
The areas must exist (`bbs area add "DOVE General"`). On each call, the
BBS does these steps:
1. puts `HUBID.REP` in the hub's directory, holding the messages written
here in those areas since the last call (at most 1000 a call);
2. takes `HUBID.QWK` and posts what is in it, under each writer's name,
in the areas of its conferences. Conferences not listed are passed
over, and so is mail to the node's account.
1. It puts `HUBID.REP` in the directory of the hub. This file contains
the messages written here in those areas since the last call (a
maximum of 1000 for each call).
2. It takes `HUBID.QWK` and posts its contents in the areas of its
conferences, with the name of each writer. It ignores conferences
that are not in the list. It also ignores mail to the account of the
node.
`HUBID` is the packet found in the hub's directory, or `hub_id`. The
first call sends nothing already here. Only messages written on this BBS
go up: those that came by a network, a news peer or FidoNet stay put.
Each message from the hub is known by its conference and number, so a
packet taken twice posts nothing twice. Answers keep their threads both
ways where the message answered came by the network.
`HUBID` is the packet that the BBS finds in the directory of the hub, or
`hub_id`. The first call sends no messages that are already here. Only
messages written on this BBS go up. Messages that came by a network, a
news peer or FidoNet stay here. The BBS knows each message from the hub
by its conference and number. Thus, if it takes a packet two times, it
posts nothing two times. If the answered message came by the network,
answers keep their threads in the two directions.
`bbs qwknet call [NET]` (or `POST /api/v1/admin/qwknet/call`) calls now.
### As a hub
Make an account for each node and flag it:
Make an account for each node and give it the flag:
```
bbs user add MYNODE
bbs user qwknode MYNODE
```
A node's account takes its packet and puts its REP like any caller, best
by [FTP](Files-and-FTP) (`/qwk`). What its REP brings is posted under the
names of the node's writers, not the account's. Its access is still
checked on each area. Its packet leaves out what came from the node
itself. The areas a node gets are those of its account's new scan.
The account of a node takes its packet and puts its REP in the same way
as all callers. [FTP](Files-and-FTP) (`/qwk`) is the best method. The
BBS posts the contents of its REP with the names of the writers on the
node, not the name of the account. The BBS still checks its access on
each area. Its packet does not contain the messages that came from the
node. A node gets the areas of the new scan of its account.
**See also:** [Message areas](Message-Areas), [Files and FTP](Files-and-FTP), [File transfers](File-Transfers)
+70 -61
View File
@@ -1,16 +1,20 @@
As well as ANSI terminals, the text BBS serves two other kinds of
terminal from the BBS era: Commodore 64s and 128s in **PETSCII**, and
**RIPscrip** terminals, which draw graphics and clickable buttons. Both
get the same BBS as everyone else: messages, mail, files, chat, paging,
and the sysop's menus and screens.
The text BBS serves ANSI terminals. It also serves two other types of
terminal from the BBS era:
- Commodore 64s and 128s in **PETSCII**.
- **RIPscrip** terminals, which draw graphics and buttons that the
caller can click.
Both types get the same BBS as all other callers: messages, mail, files,
chat, paging, and the menus and screens of the sysop.
## PETSCII: Commodores
Commodore callers use CCGMS, Novaterm, CGTerm, a C64 with a WiFi modem,
SyncTERM or another terminal in C64 mode, or a real C64 calling a modem
line through [app_dmodem](Modem-Callers).
SyncTERM or a different terminal in C64 mode. They can also use a real
C64 that calls a modem line through [app_dmodem](Modem-Callers).
Each listener says which of its callers are Commodores:
Each listener tells which of its callers are Commodores:
```ini
[listen c64]
@@ -22,56 +26,58 @@ petscii = yes
| `petscii` | Meaning |
|---|---|
| `no` (the default) | no Commodores on this listener |
| `yes` | every caller is a Commodore (for a port or modem line just for C64s) |
| `auto` | a caller whose terminal is not ANSI (and not known by its type) is watched while it logs in, as described below |
| `yes` | all callers are Commodores (for a port or modem line only for C64s) |
| `auto` | the BBS monitors a caller whose terminal is not ANSI (and not known by its type) during the login, as the text below tells |
On any listener, a telnet terminal type of `petscii`, `c64`, `c128`,
`commodore` or `cbm` is taken as a Commodore.
On all listeners, the BBS reads a telnet terminal type of `petscii`,
`c64`, `c128`, `commodore` or `cbm` as a Commodore.
### How `auto` finds a Commodore
A Commodore's terminal answers no questions (a C64 has no status
reports, attributes or answerback), so the BBS watches its keys instead.
Until it knows, the logon screen and the name prompt are in capitals,
which both a C64 in its power-on character set and any other terminal can
read. Then:
The terminal of a Commodore answers no questions (a C64 has no status
reports, attributes or answerback). Thus, the BBS monitors its keys. Until
the BBS knows, the logon screen and the name prompt are in capitals.
Both a C64 in its power-on character set and all other terminals can
read capitals. Then:
| If the caller | The BBS |
|---|---|
| presses a key only a Commodore has: DEL (0x14), a cursor key (not down, 0x11, which is XON), F1-F8 (0x85-0x8C), CLR (0x93), or types a shifted letter (0xC1-0xDA, unless a UTF-8 continuation byte follows it at once) | switches to PETSCII there and then: the screen cleared (and the questions' leftovers with it), the logon screen and the name prompt again |
| types a name in lower case | knows it is not a Commodore (whose unshifted letters arrive as ASCII's capitals); nothing is asked |
| types a name all in capitals | asks `PRESS DEL (OR BACKSPACE)`: a Commodore's DEL makes it PETSCII (and the name, which was typed in lower case, is taken so), anything else leaves it ASCII |
| pushes a key that only a Commodore has: DEL (0x14), a cursor key (not down, 0x11, which is XON), F1-F8 (0x85-0x8C), CLR (0x93), or types a shifted letter (0xC1-0xDA, unless a UTF-8 continuation byte comes immediately after it) | changes to PETSCII immediately. It clears the screen (also the remaining characters of the questions), and shows the logon screen and the name prompt again |
| types a name in lower case | knows that it is not a Commodore (the unshifted letters of a Commodore arrive as ASCII capitals). It asks nothing |
| types a name all in capitals | asks `PRESS DEL (OR BACKSPACE)`. The DEL of a Commodore changes it to PETSCII (and the BBS reads the name as lower case, as it was typed). All other keys keep ASCII |
A caller who is still undecided at the end of the login (for example, one
logged in by rlogin or a trusted header) gets ASCII. The questions sent
before the name prompt to find an ANSI terminal or a VT52 leave a few
characters on a C64's screen; switching to PETSCII clears them.
If the BBS does not know at the end of the login, the caller gets ASCII
(for example, a caller who logged in by rlogin or a trusted header). The
BBS sends questions before the name prompt to find an ANSI terminal or a
VT52. These questions leave some characters on the screen of a C64. The
change to PETSCII clears them.
A Commodore caller gets:
- the lower/upper case character set (and shift + C= kept from switching
it), the screen cleared
- 40 columns and 25 rows (the profile's `[W]idth` switches to a C128's
80): menus in one column, lists that fit (who's online, users, areas,
messages, mail, files), text wrapped at 39
- colours as the C64's colour codes, reverse, clearing, cursor movement;
box drawing and block characters as its graphics characters; letters
with accents without them; what it has no character for as `?`
- what is typed read back: letters as the set has them, RETURN, DEL to
erase
- display files: `NAME.seq` (PETSCII art, as C64 editors save it) sent as
it is, else `NAME.asc` or `.txt` translated (see
[Customization](Customization))
- The lower/upper case character set, and a cleared screen. The BBS
prevents shift + C= from a change of the character set.
- 40 columns and 25 rows (the `[W]idth` of the profile changes to the 80
columns of a C128). Menus are in one column. Lists fit the screen
(who's online, users, areas, messages, mail, files). Text wraps at 39.
- Colours as the colour codes of the C64, reverse, clear, and cursor
movement. Box drawing and block characters as its graphics characters.
Letters with accents without the accents. `?` for characters that it
does not have.
- Typed text read back: letters as the set has them, RETURN, and DEL to
erase.
- Display files: the BBS sends `NAME.seq` (PETSCII art, as C64 editors
save it) as it is. If not, it translates `NAME.asc` or `.txt` (refer to
[Customization](Customization)).
Doors are not offered, because they are ANSI programs. File transfers
use the usual XMODEM, YMODEM, ZMODEM and Kermit (CCGMS and Novaterm have
XMODEM); Punter is not supported.
The BBS does not offer doors, because they are ANSI programs. File
transfers use the usual XMODEM, YMODEM, ZMODEM and Kermit (CCGMS and
Novaterm have XMODEM). Punter is not supported.
## RIPscrip
RIPterm, and SyncTERM with RIP turned on, draw RIPscrip 1.54: vector
graphics on a 640x350 EGA screen, with buttons that send keys when
clicked.
RIPterm, and SyncTERM with RIP enabled, draw RIPscrip 1.54. This is
vector graphics on a 640x350 EGA screen, with buttons that send keys when
the caller clicks them.
```ini
[listen telnet]
@@ -82,28 +88,31 @@ rip = auto
| `rip` | Meaning |
|---|---|
| `auto` (the default) | an ANSI terminal that is not a modern one (`xterm`, `screen`, `putty` and friends are not asked) is asked with `ESC [ !`; one that answers `RIPSCRIP...` has RIP |
| `yes` | every ANSI caller has it |
| `no` | none is asked |
| `auto` (the default) | the BBS sends `ESC [ !` to an ANSI terminal that is not a modern terminal (it does not ask `xterm`, `screen`, `putty` and similar terminals). A terminal that answers `RIPSCRIP...` has RIP |
| `yes` | all ANSI callers have RIP |
| `no` | the BBS asks no terminal |
The question costs one round trip. The BBS sends a position request
straight after it, which every ANSI terminal answers, and a RIP terminal's
answer arrives first.
The question adds one round trip. The BBS sends a position request
immediately after it, which all ANSI terminals answer. The answer of a
RIP terminal arrives first.
A RIP caller gets:
- every menu (the main menu, and the sysop's own) as a scene: a title
bar, a button for each item (its key underlined, clicking it the same
as pressing it) and the prompt in a text window below. When a choice
is made the scene is cleared and the BBS goes on in text, full screen;
whatever that printed waits for a key before the next menu covers it
- display files: `NAME.rip` first (RIPscrip, with ANSI in it, in CP437,
@-codes filled), then `.ans`, `.asc`, `.txt`. A menu showing a `.rip`
screen of the sysop's has its buttons, not the built-in ones
- everything else as on any ANSI terminal
- Each menu (the main menu, and the menus of the sysop) as a scene. A
scene has a title bar, a button for each item, and the prompt in a text
window below. The key of each button has an underline, and a click on
the button is the same as a push of the key. When the caller makes a
selection, the BBS clears the scene and continues in text, full screen.
The BBS waits for a key before the next menu covers that text.
- Display files: first `NAME.rip` (RIPscrip, with ANSI in it, in CP437,
with @-codes filled), then `.ans`, `.asc`, `.txt`. If a menu shows a
`.rip` screen from the sysop, the menu has the buttons of that screen,
not the built-in buttons.
- All other items as on all ANSI terminals.
A caller can turn RIP off and on in their profile (`[R]IP`; it can only
be turned on if the terminal answered). Their choice, like a Commodore's
width, is kept for their next call ([Terminal identification](Terminal-Identification#what-a-caller-sets)).
A caller can disable and enable RIP in the profile (`[R]IP`). The caller
can enable it only if the terminal answered. The BBS keeps the
selection for the next call, as it keeps the width of a Commodore
([Terminal identification](Terminal-Identification#what-a-caller-sets)).
**See also:** [Customization](Customization), [Configuration](Configuration), [Modem callers](Modem-Callers)
+46 -33
View File
@@ -1,6 +1,6 @@
This page covers starting the BBS for the first time, running it under
systemd, and running it as a user of its own. For day-to-day work once it
is running, see [Administration](Administration).
This page tells you how to start the BBS for the first time, how to run
it under systemd, and how to run it as its own user. For daily work after
the BBS starts, refer to [Administration](Administration).
## First start
@@ -12,28 +12,32 @@ bbs -config /etc/bbs/bbs.conf user add sysop -sysop
bbs -config /etc/bbs/bbs.conf serve
```
Without `-config`, bbs runs with its defaults: telnet and TN3270 on port
2300, modem callers (raw) on 127.0.0.1:2323, and the database in `bbs.db`
in the current directory. The database can also be PostgreSQL, MySQL or
MariaDB: see [Databases](Databases).
Without `-config`, bbs uses its defaults:
- Telnet and TN3270 on port 2300.
- Modem callers (raw) on 127.0.0.1:2323.
- The database in `bbs.db` in the current directory.
The database can also be PostgreSQL, MySQL or MariaDB. Refer to
[Databases](Databases).
## Under systemd
[bbs.service.sample](https://github.com/D-Modem/bbs/blob/HEAD/bbs.service.sample)
runs the BBS under systemd as its own user, with the database in
`/var/lib/bbs` and its sockets in `/run/bbs`. `systemctl reload bbs` applies
the settings that can change while callers are on (see
runs the BBS under systemd as its own user. The database is in
`/var/lib/bbs` and the sockets are in `/run/bbs`. `systemctl reload bbs`
applies the settings that you can change while callers are on (refer to
[Configuration](Configuration#changing-it-while-callers-are-on)).
## Running as a user of its own
Ports below 1024 (telnet's 23, finger's 79, gopher's 70) need root or the
`CAP_NET_BIND_SERVICE` capability. There are two ways to give the BBS
those ports without running it as root:
Ports below 1024 (23 for telnet, 79 for finger, 70 for gopher) must have
root or the `CAP_NET_BIND_SERVICE` capability. There are two methods to
give these ports to the BBS without root:
- systemd starts the BBS as its own user with that capability
(bbs.service.sample's `User=bbs` and `AmbientCapabilities=`), or
- the BBS is started as root and gives up root itself:
(`User=bbs` and `AmbientCapabilities=` in bbs.service.sample).
- You start the BBS as root, and the BBS then stops its root access:
```
[general]
@@ -41,25 +45,34 @@ user = bbs
; group = bbs (the user's own group by default)
```
When it is started as root, `bbs serve` reads the configuration and binds
every port and unix socket it listens on (the listeners, the HTTP API and
metrics, FTP, NNTP, IRC, finger, gopher, Gemini and binkp). Then it gives up root,
takes the user's supplementary groups (such as `socket_group`'s and
docker's), and runs itself again as the user. It stays the same process,
with the same PID for systemd and `systemctl reload`, and keeps the
sockets. Nothing is written as root: the database, logs, host keys and
backups all belong to the user. A unix socket without `socket_group`
belongs to the user too.
If you start `bbs serve` as root, it reads the configuration. It then
binds all the ports and unix sockets on which it listens (the listeners,
the HTTP API and metrics, FTP, NNTP, IRC, finger, gopher, Gemini and
binkp). Then it stops its root access and takes the supplementary groups
of the user (for example, the group of `socket_group` and the docker
group). Then it runs itself again as the user. It stays the same process,
with the same PID for systemd and `systemctl reload`, and it keeps the
sockets.
Other commands started as root (`bbs user add`, `bbs init`, `bbs backup`)
also give up root first, so that the database stays the user's. `bbs
check` and `bbs config` stay root, because the configuration file is
root's to write. `bbs backup restore` restores files as root and then
hands them to the user, except the configuration.
The BBS writes nothing as root. The database, logs, host keys and backups
all belong to the user. A unix socket without `socket_group` also belongs
to the user.
The user must be able to read the configuration (`chown root:bbs
/etc/bbs/bbs.conf; chmod 0640`), write where the database and files are
kept, and run the program. Under systemd, leave `User=` out when you use
this method; bbs.service.sample explains how.
If you start other commands as root (`bbs user add`, `bbs init`, `bbs
backup`), they also stop their root access first. Thus, the database
stays with the user. `bbs check` and `bbs config` keep root access,
because only root can write the configuration file. `bbs backup restore`
restores files as root. Then it gives them to the user, but not the
configuration.
The user must have these permissions:
- Read the configuration (`chown root:bbs
/etc/bbs/bbs.conf; chmod 0640`).
- Write in the locations of the database and the files.
- Run the program.
Under systemd, do not use `User=` with this method. bbs.service.sample
tells you how.
**See also:** [Configuration](Configuration), [Administration](Administration)
+59 -46
View File
@@ -1,7 +1,7 @@
Callers can reach the text BBS over SSH, encrypted, and log in with their
BBS password or with a key. Modern BBS terminals (SyncTERM, NetRunner,
MagiTerm) and a plain `ssh` client all speak SSH, and unlike telnet and
rlogin it keeps passwords off the wire.
Callers can connect to the text BBS over SSH, with encryption. They log
in with their BBS password or with a key. Modern BBS terminals
(SyncTERM, NetRunner, MagiTerm) and a plain `ssh` client all use SSH.
Telnet and rlogin send passwords in clear text, but SSH does not.
```ini
[listen ssh]
@@ -17,26 +17,28 @@ ssh -p 2222 alice@bbs.example.org
| SSH user | Logs in with | Then |
|---|---|---|
| a user's name | their BBS password (SSH `password` or `keyboard-interactive`) | the main menu |
| a user's name | one of their keys | the main menu |
| `new` | nothing | the BBS's own login prompt: `NEW` to sign up (only when `new_users = yes`) |
| the name of a user | the BBS password of the user (SSH `password` or `keyboard-interactive`) | the main menu |
| the name of a user | one of the keys of the user | the main menu |
| `new` | nothing | the login prompt of the BBS: `NEW` to sign up (only when `new_users = yes`) |
For a name with spaces, use `_` or `.` in their place (`Alice_Smith`).
Names are not case-sensitive. Wrong passwords count against the caller's
address just as they do on a terminal (`fail_delay` and throttling), and a
locked account cannot log in with either a password or a key.
For a name with spaces, use `_` or `.` in place of the spaces
(`Alice_Smith`). Names are not case-sensitive. Incorrect passwords count
against the address of the caller, as on a terminal (`fail_delay` and
throttling). A locked account cannot log in with a password or with a
key.
## Keys
Users add their own keys in one of these ways:
- on the text BBS, in *Your profile* (`K`), after giving their password
again (for an account modemmenu made, its modemmenu password or a
[sign-in code](Web-Forum#sign-in-codes));
- through the [HTTP API](HTTP-API), with `POST /api/v1/me/keys` and a
login's session token (not an API key).
- On the text BBS, in *Your profile* (`K`), after they type their
password again. For an account that modemmenu made, this is the
modemmenu password or a
[sign-in code](Web-Forum#sign-in-codes).
- Through the [HTTP API](HTTP-API), with `POST /api/v1/me/keys` and the
session token of a login (not an API key).
The sysop can also add them:
The sysop can also add keys:
```
bbs sshkey add alice ~alice/.ssh/id_ed25519.pub # each line of the file (- : stdin)
@@ -44,26 +46,31 @@ bbs sshkey list [USER]
bbs sshkey del ID
```
The BBS accepts ed25519, ECDSA (including the security-key `sk-` kinds)
and RSA keys of 2048 bits or more, but not DSA. A key belongs to one user
only, a user can have up to 20, and keys carry no options (`command=`,
`from=`). The log records each key added, deleted or used to log in, by
its SHA-256 fingerprint.
The BBS accepts ed25519, ECDSA (also the security-key `sk-` types) and
RSA keys of 2048 bits or more. It does not accept DSA. A key belongs to
one user only. A user can have up to 20 keys. Keys have no options
(`command=`, `from=`). The log records each key that a user adds,
deletes or uses to log in, by its SHA-256 fingerprint.
## The session
The listener offers only a terminal session: a shell request, with a pty
if the client asks for one. The pty's terminal type and size go to the
text BBS just as telnet's do (`xterm-256color` means ANSI and UTF-8,
`ansi` and `syncterm` mean ANSI and CP437, and for anything else the
caller is asked). `ansi`, `utf8` and `sixel` on the listener set them as
they do on telnet. Commands (`ssh host ls`), SFTP and SCP, port and agent
forwarding, X11 and a second session on the same connection are all
refused. Resizing the window does not change the size the session began
with.
if the client asks for one. The terminal type and size of the pty go to
the text BBS, as for telnet:
A client has 30 seconds after connecting to ask for its shell.
`max_per_ip` limits connections from one address, as on telnet.
- `xterm-256color` means ANSI and UTF-8.
- `ansi` and `syncterm` mean ANSI and CP437.
- For all other types, the BBS asks the caller.
`ansi`, `utf8` and `sixel` on the listener set these values, as they do
on telnet. The listener refuses these items: commands (`ssh host ls`),
SFTP and SCP, port and agent forwarding, X11 and a second session on the
same connection. If the caller changes the size of the window, the size
of the session does not change.
After a client connects, it has 30 seconds to ask for its shell.
`max_per_ip` sets the limit of connections from one address, as on
telnet.
## Host keys
@@ -71,14 +78,19 @@ A client has 30 seconds after connecting to ask for its shell.
host_keys = /etc/bbs/ssh_host_ed25519_key /etc/bbs/ssh_host_rsa_key
```
By default the listener uses an ed25519 key and an RSA key beside the
database, `ssh_host_ed25519_key` and `ssh_host_rsa_key`. If they are not
there, it creates them (mode 0600) the first time it starts, and the log
and `bbs check` show their fingerprints. Keys made by `ssh-keygen`
(OpenSSH or PEM format, without a passphrase) work too. A missing key is
created according to its name: RSA (3072 bits) if the name says `rsa`,
ECDSA P-256 if it says `ecdsa`, and ed25519 otherwise. Like sshd, the BBS
refuses a key file that other users can read.
By default, the listener uses an ed25519 key and an RSA key adjacent to
the database, `ssh_host_ed25519_key` and `ssh_host_rsa_key`. If they are
not there, the listener creates them (mode 0600) when it starts for the
first time. The log and `bbs check` show their fingerprints. Keys from
`ssh-keygen` (OpenSSH or PEM format, without a passphrase) also operate.
The listener creates a missing key according to its name:
- RSA (3072 bits) if the name contains `rsa`.
- ECDSA P-256 if the name contains `ecdsa`.
- ed25519 for all other names.
As sshd does, the BBS refuses a key file that other users can read.
## Old clients
@@ -86,11 +98,12 @@ refuses a key file that other users can read.
legacy = yes
```
This adds the AES-CBC and 3DES-CBC ciphers and the 1024-bit
`diffie-hellman-group1-sha1` key exchange to the usual algorithms, for old
clients that have nothing newer (old SyncTERM and PuTTY builds, cryptlib).
These algorithms are weak, and `bbs check` warns about them. Without
`legacy`, the server offers curve25519, ECDH and DH of 2048 bits or more,
with AES-GCM, ChaCha20-Poly1305 and AES-CTR.
This setting adds some algorithms to the usual algorithms: the AES-CBC
and 3DES-CBC ciphers and the 1024-bit `diffie-hellman-group1-sha1` key
exchange. These algorithms are for old clients that have no newer
algorithms (old SyncTERM and PuTTY builds, cryptlib). These algorithms
are weak, and `bbs check` gives a warning about them. Without `legacy`,
the server offers curve25519, ECDH and DH of 2048 bits or more, with
AES-GCM, ChaCha20-Poly1305 and AES-CTR.
**See also:** [Configuration](Configuration), [Security](Security), [HTTP API](HTTP-API)
+56 -49
View File
@@ -1,9 +1,9 @@
Sysops can add their own screens and features to the BBS in JavaScript.
A script draws the same kinds of screen as the rest of the BBS (menus,
tables, forms, panels, messages and the editor), so it works on every
terminal: a text terminal in ANSI, ASCII or PETSCII, a RIP terminal (where
menus become buttons), and a 3270. A script acts as its caller, with the
caller's access.
Sysops can add their own screens and functions to the BBS in JavaScript.
A script draws the same types of screen as the other parts of the BBS
(menus, tables, forms, panels, messages and the editor). Thus, it
operates on all terminals: a text terminal in ANSI, ASCII or PETSCII, a
RIP terminal (where menus become buttons), and a 3270. A script operates
as its caller, with the access of the caller.
```
; bbs.conf
@@ -16,25 +16,28 @@ p = script:poll Today's poll
```
A menu item `script:NAME` runs `NAME.js` from `scripts_dir` (names are
lower-case letters, digits, `_` and `-`). A `logon.js` there runs after
every login, before the menus. `bbs check` compiles every script, and
refuses a configuration if a script does not compile or a menu names a
script that does not exist. A script changed while the BBS runs is
compiled again the next time it runs. `scripts.sample` has two scripts to
start from: one-liners and a poll.
lower-case letters, digits, `_` and `-`). A `logon.js` in that directory
runs after each login, before the menus. `bbs check` compiles all
scripts. It refuses a configuration if a script does not compile, or if
a menu names a script that does not exist. If you change a script while
the BBS runs, the BBS compiles it again at its next run.
`scripts.sample` has two scripts that you can use as a start: one-liners
and a poll.
## What a script is
Scripts run in [goja](https://github.com/dop251/goja), which supports
ECMAScript 5.1 and much of ECMAScript 6 (`let`, arrow functions, classes,
`Map`, template strings), in strict mode. A script cannot reach files, the
network, processes or timers; it has only the objects described below.
Scripts run in [goja](https://github.com/dop251/goja), in strict mode.
goja supports ECMAScript 5.1 and much of ECMAScript 6 (`let`, arrow
functions, classes, `Map`, template strings). A script cannot get to
files, the network, processes or timers. It has only the objects that
the text below gives.
A script may compute for up to two seconds between one screen and the
next (time the caller spends at a screen does not count). Beyond that it
is stopped and the caller is told. A script that fails is logged and the
caller is told (a sysop is also told why). If the caller hangs up or goes
idle, the script ends, whatever it catches. `exit()` ends a script early.
A script can compute for a maximum of two seconds between one screen and
the next. The time that the caller is at a screen does not count. After
two seconds, the BBS stops the script and tells the caller. If a script
fails, the BBS logs it and tells the caller (it also tells a sysop the
reason). If the caller hangs up or is idle, the script ends, also if it
catches the error. `exit()` ends a script before its end.
```js
// a guestbook in eight lines
@@ -51,42 +54,46 @@ if (k === "S") {
| Function | Returns | Notes |
|---|---|---|
| `ui.menu({title, intro, items: [{key, label}], prompt, screen})` | the key chosen (upper case), `""`, or `ui.BACK` (a 3270's PF3) | `intro`: lines before the items; `screen`: a display file in their place |
| `ui.table({title, note, columns: [{title, width, right, wide}], rows, empty, pick, prompt, actions, more, less})` | `{action, row, num, text}` | `rows`: arrays of cells, or `{num, cells, mark, hot}`; `pick` makes rows choosable (`action` is `ui.PICK`, `row` the index, -1 for a number not shown, `num` what was typed); `wide` columns only on screens of 60 columns or more; `more`/`less` say there are pages after and before (`ui.MORE`, `ui.LESS`) |
| `ui.message({where, from, to, subject, date, body, actions, default, quit})` | the action chosen | |
| `ui.form({title, intro, fields: [{name, label, prompt, width, secret, value}], submit})` | the values by name, or `null` if the caller gave up | one question a field on a text terminal, one screen on a 3270 |
| `ui.panel({title, lines, actions})` | the action chosen, `ui.BACK`, or `""` | |
| `ui.edit({title, to, subject, body, quote})` | `{to, subject, body}`, or `null` | the full-screen editor, the line editor or the 3270's; `quote` is for the quote window |
| `ui.menu({title, intro, items: [{key, label}], prompt, screen})` | the selected key (upper case), `""`, or `ui.BACK` (PF3 of a 3270) | `intro`: lines before the items. `screen`: a display file in place of the items |
| `ui.table({title, note, columns: [{title, width, right, wide}], rows, empty, pick, prompt, actions, more, less})` | `{action, row, num, text}` | `rows`: arrays of cells, or `{num, cells, mark, hot}`. `pick` lets the caller select rows (`action` is `ui.PICK`, `row` is the index, -1 for a number that is not shown, `num` is the typed value). `wide` columns show only on screens of 60 columns or more. `more`/`less` tell that there are pages after and before (`ui.MORE`, `ui.LESS`) |
| `ui.message({where, from, to, subject, date, body, actions, default, quit})` | the selected action | |
| `ui.form({title, intro, fields: [{name, label, prompt, width, secret, value}], submit})` | the values by name, or `null` if the caller stopped | one question for each field on a text terminal, one screen on a 3270 |
| `ui.panel({title, lines, actions})` | the selected action, `ui.BACK`, or `""` | |
| `ui.edit({title, to, subject, body, quote})` | `{to, subject, body}`, or `null` | the full-screen editor, the line editor or the editor of the 3270. `quote` is for the quote window |
| `ui.confirm(question, default)` | true or false | |
| `ui.say(text, tone)` | | a line now (a 3270: on the next screen's message line) |
| `ui.show(title, lines)` | | lines until read |
| `ui.screen(name)` | whether there was one | a display file of `screens_dir` |
| `ui.kind`, `ui.pageSize`, `ui.narrow` | | `"text"` or `"3270"`; rows a table shows; under 60 columns |
| `ui.say(text, tone)` | | shows a line now (on a 3270: on the message line of the next screen) |
| `ui.show(title, lines)` | | shows lines until the caller reads them |
| `ui.screen(name)` | true if there was a display file | a display file of `screens_dir` |
| `ui.kind`, `ui.pageSize`, `ui.narrow` | | `"text"` or `"3270"`. The number of rows that a table shows. True if under 60 columns |
Lines are strings (`\n` starts a new line) or objects
`{label, text, tone, bar}`, which give a label and its value, a tone
(`plain`, `dim`, `bright`, `good`, `bad` or `warn`), and a bar from 0 to 1.
Actions are `{id, label, key, pf, short}`: `key` is the key on a text
terminal, `pf` is the PF key on a 3270 (an action without one does not
appear on a 3270), and `short` is its name on the 3270's key line. On a
text terminal, `Q` (or Enter at an empty prompt) goes back; on a 3270, PF3
goes back.
`{label, text, tone, bar}`. An object gives a label and its value, a tone
(`plain`, `dim`, `bright`, `good`, `bad` or `warn`), and a bar from 0 to
1. Actions are `{id, label, key, pf, short}`:
- `key` is the key on a text terminal.
- `pf` is the PF key on a 3270. An action without `pf` does not show on
a 3270.
- `short` is its name on the key line of the 3270.
On a text terminal, `Q` (or Enter at an empty prompt) goes back. On a
3270, PF3 goes back.
## The BBS
| Object | What it gives |
|---|---|
| `bbs.name`, `bbs.sysop`, `bbs.location`, `bbs.log(text)` | the system; a line in its log |
| `user.id`, `.name`, `.location`, `.level`, `.flags`, `.sysop`, `.calls`, `.posts`, `.since`, `.lastCall`, `user.has(require)` | the caller; `has` takes an [access requirement](Access-Levels) such as `"20 A"` (level 20 or more, and flag A) |
| `node.number`, `node.doing(text)`, `node.who()`, `node.message(n, text)` | the caller's node: what *Who's online* says they are doing; the nodes; a line to a node |
| `msg.areas()`, `msg.list(area, after, limit)`, `msg.get(id)` | the message areas the caller reads, their messages (up to 200 at a time, from after an id), one message (`null` if not theirs to read) |
| `msg.post(area, {to, subject, body, replyTo})`, `msg.mail({to, subject, body})` | post (the message's id) and mail, as the caller: refusals are thrown |
| `data.get(name)`, `data.set(name, value)`, `data.remove(name)`, `data.keys(prefix)` | what the script keeps for everyone: any JSON value up to 64 KB under a name of up to 100 characters, 1000 names |
| `data.user.get` ... | the same, for the caller alone (100 names) |
| `console.log(...)` | the BBS's log |
| `bbs.name`, `bbs.sysop`, `bbs.location`, `bbs.log(text)` | the system. A line in its log |
| `user.id`, `.name`, `.location`, `.level`, `.flags`, `.sysop`, `.calls`, `.posts`, `.since`, `.lastCall`, `user.has(require)` | the caller. `has` takes an [access requirement](Access-Levels), for example `"20 A"` (level 20 or more, and flag A) |
| `node.number`, `node.doing(text)`, `node.who()`, `node.message(n, text)` | the node of the caller. The activity of the caller that *Who's online* shows. The nodes. A line to a node |
| `msg.areas()`, `msg.list(area, after, limit)`, `msg.get(id)` | the message areas that the caller reads. Their messages (up to 200 at a time, after an id). One message (`null` if the caller cannot read it) |
| `msg.post(area, {to, subject, body, replyTo})`, `msg.mail({to, subject, body})` | post (gives the id of the message) and mail, as the caller. Refusals are thrown as errors |
| `data.get(name)`, `data.set(name, value)`, `data.remove(name)`, `data.keys(prefix)` | the data that the script keeps for all users: a JSON value of up to 64 KB under a name of up to 100 characters, with a maximum of 1000 names |
| `data.user.get` ... | the same, for the caller only (100 names) |
| `console.log(...)` | the log of the BBS |
A script's data is kept in the database (`script_data`) under the
script's name, so a renamed script starts afresh. A user's data is
deleted with their account.
The BBS keeps the data of a script in the database (`script_data`) under
the name of the script. Thus, if you change the name of a script, it
starts with no data. The BBS deletes the data of a user with the account.
**See also:** [Customization](Customization), [Development](Development#screens)
+155 -121
View File
@@ -1,97 +1,127 @@
This page lists what the BBS guards against and how, service by service,
and then the settings for keeping unwanted callers out and for telnet
over TLS.
This page lists the risks against which the BBS gives protection, and
how, for each service. Then it gives the settings to keep unwanted
callers out, and the settings for telnet over TLS.
## What is guarded, and how
- Passwords are stored with bcrypt (cost 12). Unknown users take as long
to refuse as wrong passwords, each failure waits `fail_delay`, and after
`attempts` failures the BBS hangs up. `throttle_failures` turns away an
address or caller ID that keeps failing (or keeps signing up).
- Everything users write is cleaned before it is stored and again before
it is shown: no escape sequences, control characters, C1 controls,
bidirectional overrides or invalid UTF-8 reach another caller's
terminal. On a 3270 these would become 3270 orders once converted to
EBCDIC, and go3270 does not filter them itself.
- Limits everywhere: name, subject and line lengths, message size, telnet
subnegotiations, session headers, rlogin fields, 64 KB for a 3270
screen's answer; timeouts for every step (telnet and TN3270 negotiation,
headers, the login, idle callers, writes to callers who stopped
reading); `max_nodes` callers at once and `max_per_ip` from one address.
- The database is created 0600; unix sockets are made private and then
opened to `socket_mode`, never wider in between.
- Private mail is read only by its recipient (every query asks for the
user's own); a locked account is said to be locked only to someone who
knows its password.
- Telnet and rlogin carry passwords in the clear, as they always have:
keep rlogin to 127.0.0.1 or a socket, and offer [SSH](SSH) beside
telnet (or put telnet behind a VPN) where that matters.
- SSH: host keys made 0600 and refused when others may read them; modern
algorithms only unless `legacy = yes` (which `bbs check` warns about);
passwords checked, throttled and delayed as a terminal's; a key logs in
only its own user, only if not locked, and is decided by the key the
client proved (never one it merely offered); keys are added only with
the password (on the BBS) or a login's session (the API), not by an
API key. Commands, SFTP, forwarding of any kind and second sessions
are refused, and a client has 30 seconds to get to its shell.
- Passwords: the BBS stores them with bcrypt (cost 12). The refusal of
an unknown user takes the same time as the refusal of an incorrect
password. After each failure, the BBS waits `fail_delay`. After
`attempts` failures, the BBS hangs up. `throttle_failures` refuses an
address or caller ID that continues to fail (or continues to sign up).
- Text from users: the BBS cleans all text before it stores it, and
again before it shows it. No escape sequences, control characters, C1
controls, bidirectional overrides or invalid UTF-8 get to the terminal
of a different caller. On a 3270, these items become 3270 orders after
conversion to EBCDIC, and go3270 does not filter them.
- Limits on all items: lengths of names, subjects and lines, message
size, telnet subnegotiations, session headers, rlogin fields, and 64 KB
for the answer of a 3270 screen. Timeouts for each step (telnet and
TN3270 negotiation, headers, the login, idle callers, writes to callers
who stopped to read). `max_nodes` callers at one time and `max_per_ip`
from one address.
- The BBS creates the database with mode 0600. It makes unix sockets
private and then opens them to `socket_mode`. They are never wider
between these steps.
- Only the recipient can read private mail (each query asks for the
mail of the user). The BBS tells that an account is locked only to a
person who knows its password.
- Telnet and rlogin send passwords in clear text, as they always did.
Keep rlogin on 127.0.0.1 or a socket. Where security is important,
offer [SSH](SSH) together with telnet (or put telnet behind a VPN).
- SSH:
- The BBS makes host keys with mode 0600. It refuses them when other
users can read them.
- Only modern algorithms, unless `legacy = yes` (`bbs check` gives a
warning about it).
- The BBS checks, throttles and delays passwords as for a terminal.
- A key logs in only its own user, and only if the user is not locked.
The decision uses the key that the client proved (never a key that
the client only offered).
- Users can add keys only with the password (on the BBS) or a login
session (the API), not with an API key.
- The BBS refuses commands, SFTP, all types of forwarding and second
sessions. A client has 30 seconds to get to its shell.
- A modem line is as private as the phone network.
- News: a reader's article is posted as its user whatever its From says,
with the BBS's own Message-ID, Date and Path; only the headers a reader
may choose (Subject, References, the body) are kept. `IHAVE` is taken
only from a peer's `accept_from` addresses, and peers' articles are
checked (the headers RFC 5536 requires, sizes of the article, its
headers and lines) and cleaned before a caller sees them. `tls =
required` refuses `AUTHINFO` before `STARTTLS`; `no` and `optional` make
`bbs check` warn. Commands, lines and articles are limited, and so are
clients at once and from one address.
- FidoNet: a link is known by its address and its password (CRAM-MD5;
in the clear only if allowed); a wrong password waits and is refused,
an address that is not a link is turned away, and a system calling with
a link's address but not its password gets nothing. Packets are tossed
only from a link's own inbound, only if from its address to ours, with
its packet password if it has one. Received file names are reduced to a
safe base name; files, sessions, packets, bundles and messages have size
limits. Netmail's sender is what the message says, as anywhere in
FidoNet: it is not proof of who wrote it.
- Doors: a DOS door runs in a container with no network, as the BBS's
user, seeing only the doors' directory and its node's; the caller's
line is joined to it only through COM1. Hanging up, the time limit and
the idle time stop it. The drop files carry no password.
- Chat: what callers say is cleaned like anything else they write, and
limited (200 characters a line, 8 lines in 10 seconds); a caller pages
at most once a minute; a page's private room is the caller's and the
sysops' only. `page_command` runs without a shell, the caller's words
as whole arguments.
- Finger tells no addresses or caller IDs and forwards nothing; gopher
- News:
- The BBS posts the article of a reader as its user, for all values of
its From. It uses the Message-ID, Date and Path of the BBS. It keeps
only the headers that a reader can select (Subject, References, the
body).
- The BBS accepts `IHAVE` only from the `accept_from` addresses of a
peer. It checks the articles of peers (the headers that RFC 5536
requires, the sizes of the article, its headers and lines). It cleans
them before a caller sees them.
- `tls =
required` refuses `AUTHINFO` before `STARTTLS`. With `no` and
`optional`, `bbs check` gives a warning.
- Commands, lines and articles have limits. Clients at one time and
from one address also have limits.
- FidoNet:
- The BBS knows a link by its address and its password (CRAM-MD5. In
clear text only if permitted). After an incorrect password, the BBS
waits and refuses. It refuses an address that is not a link. A system
that calls with the address of a link but not its password gets
nothing.
- The BBS tosses packets only from the inbound of the link, only if
they are from its address to our address, with its packet password
if it has one.
- The BBS changes received file names to a safe base name. Files,
sessions, packets, bundles and messages have size limits.
- The sender of netmail is the sender that the message gives, as on
all of FidoNet. It is not a proof of the author.
- Doors: a DOS door runs in a container with no network, as the user of
the BBS. It sees only the directory of the doors and the directory of
its node. The line of the caller connects to it only through COM1. A
hang-up, the time limit and the idle time stop it. The drop files
contain no password.
- Chat: the BBS cleans the text of callers as it cleans all other text
from them. The text has limits (200 characters for each line, 8 lines
in 10 seconds). A caller can page a maximum of one time each minute.
The private room of a page is only for the caller and the sysops.
`page_command` runs without a shell, with the words of the caller as
full arguments.
- Finger gives no addresses or caller IDs, and forwards nothing. Gopher
shows no message or file area unless the sysop names it (and `bbs
check` warns when they do), and its selectors are database records, not
paths. Gemini shows what gopher would, under its own `areas` and
`files`, and finger's users. All three limit connections at once and
from one address, and all time out.
- The HTTP API: TLS by default (`bbs check` warns when it is off on an
address others reach); tokens of 32 random bytes kept only as hashes,
never in URLs, limited by scope (`sysop` only for sysops), expiring
and revocable; rate limits per token and per address; JSON bodies
limited and strict; one CORS origin at most, and WebSockets only from
it and the API's own host. Metrics are on an address of their own.
- Databases: SQLite's file is made 0600; a server's password is never
logged (`bbs check` and the log show `xxxxx`); the configuration file
holding it should be 0640. Every query takes its values as parameters.
- Access levels: checked in the BBS's core, so the text BBS, 3270s, FTP,
NNTP and the API keep them alike; an area a user may not read is not
listed, opened, or found by a message's number or Message-ID; no user
changes their own level or flags (`PATCH /api/v1/me` refuses them; only
sysops' tokens reach `/admin`); a requirement that does not read shuts
everyone but the sysop out.
- The web terminal: the page's scripts only from the BBS (a Content
Security Policy: no inline scripts, no other hosts, no framing); its
WebSocket only from the BBS's own pages (or the `cors` origin), with
the HTTP server's TLS, connection and rate limits; the caller logs in
at the BBS's prompt like any terminal caller.
- Screens: display files are read only from `screens_dir`, by names of
letters, digits, `_` and `-` (no paths), at most 256 KB. The values of
@-codes are cleaned, so no escape sequence gets into a screen through
a user's name or location.
check` gives a warning when the sysop names one). Its selectors are
database records, not paths. Gemini shows the same items as gopher,
under its own `areas` and `files`, and the users of finger. All three
have limits for connections at one time and from one address, and all
have timeouts.
- The HTTP API:
- TLS by default (`bbs check` gives a warning when TLS is disabled on
an address that others can get to).
- Tokens of 32 random bytes. The BBS keeps them only as hashes, never
in URLs. They have a scope (`sysop` only for sysops), they expire,
and you can revoke them.
- Rate limits for each token and each address.
- JSON bodies have limits and strict rules.
- A maximum of one CORS origin. WebSockets only from that origin and
from the host of the API.
- Metrics are on a different address.
- Databases: the BBS makes the SQLite file with mode 0600. It never logs
the password of a server (`bbs check` and the log show `xxxxx`). The
configuration file that contains it must be 0640. Each query takes its
values as parameters.
- Access levels: the core of the BBS checks them. Thus, the text BBS,
3270s, FTP, NNTP and the API apply them in the same way. If a user
cannot read an area, the BBS does not list it or open it, and does not
find it by the number or Message-ID of a message. No user can change
their own level or flags (`PATCH /api/v1/me` refuses them. Only the
tokens of sysops get to `/admin`). If the BBS cannot read a
requirement, it lets only the sysop in.
- The web terminal:
- The scripts of the page come only from the BBS (a Content Security
Policy: no inline scripts, no other hosts, no framing).
- Its WebSocket accepts connections only from the pages of the BBS (or
the `cors` origin), with the TLS, connection and rate limits of the
HTTP server.
- The caller logs in at the prompt of the BBS, as all terminal callers
do.
- Screens: the BBS reads display files only from `screens_dir`, by names
of letters, digits, `_` and `-` (no paths), with a maximum of 256 KB.
The BBS cleans the values of @-codes. Thus, no escape sequence gets
into a screen through the name or location of a user.
- The log has logins, failures, posts and mail sent (never passwords or
message text).
@@ -106,29 +136,33 @@ hack_log = /var/log/bbs/hack.log ; who tried what
ban_minutes = 60 ; a throttled address is banned this long
```
- `deny_file` lists addresses and networks, one per line (`192.0.2.7`,
`198.51.100.0/24`, `2001:db8::/32`; `#` or `;` begins a comment). A
connection from one is closed at once on every service: the terminal
listeners and SSH, FTP, NNTP, the HTTP API and web terminal, finger,
gopher, Gemini and binkp. Callers through unix sockets (a modem server, an
upstream menu) are never refused. The file is read again when it
changes; `bbs check` warns of lines that are not addresses.
- Mail from the internet (`[mx]`) can also be checked against DNS
blocklists (`dnsbl = zen.spamhaus.org`), and is checked for SPF, DKIM and
DMARC: see [E-mail](E-mail#spam-dns-blocklists).
- `ban_minutes`: an address that `throttle_failures` turns away is banned
outright for that long, from every service (not a caller ID: those are a
modem server's callers, and a ban would not stop them). Bans are kept
in memory; `GET /api/v1/admin/bans` lists them and `DELETE
/api/v1/admin/bans/{ip}` lifts one.
- `name_deny_file` has patterns, one per line, in any case, `*` for any run
of characters (`*sysop*`, `admin*`): no new user, nor an account an
upstream menu makes, may take a name that matches. Names such as
`sysop`, `root` and `new` are refused anyway.
- The hack log has failed logins (and the names tried), logins to locked
accounts, throttled and banned addresses, refused connections and
refused names, one per line with the time; `GET /api/v1/admin/hacklog`
shows its end. It is opened for each line, so it may be rotated.
- `deny_file` lists addresses and networks, one on each line
(`192.0.2.7`, `198.51.100.0/24`, `2001:db8::/32`. `#` or `;` starts a
comment). The BBS closes a connection from one of them immediately on
all services: the terminal listeners and SSH, FTP, NNTP, the HTTP API
and web terminal, finger, gopher, Gemini and binkp. The BBS never
refuses callers through unix sockets (a modem server, an upstream
menu). The BBS reads the file again when it changes. `bbs check` gives
a warning about lines that are not addresses.
- The BBS can also check mail from the internet (`[mx]`) against DNS
blocklists (`dnsbl = zen.spamhaus.org`). It also checks SPF, DKIM and
DMARC. Refer to [E-mail](E-mail#spam-dns-blocklists).
- `ban_minutes`: if `throttle_failures` refuses an address, the BBS bans
it fully for that time, from all services. This does not apply to a
caller ID: caller IDs are the callers of a modem server, and a ban
does not stop them. The BBS keeps bans in memory.
`GET /api/v1/admin/bans` lists them. `DELETE
/api/v1/admin/bans/{ip}` removes one.
- `name_deny_file` has patterns, one on each line, with upper or lower
case. `*` is for a sequence of characters (`*sysop*`, `admin*`). No
new user, and no account that an upstream menu makes, can have a name
that matches. The BBS always refuses names such as `sysop`, `root` and
`new`.
- The hack log has failed logins (and the names that callers tried),
logins to locked accounts, throttled and banned addresses, refused
connections and refused names. Each has one line with the time.
`GET /api/v1/admin/hacklog` shows its end. The BBS opens the file for
each line. Thus, you can rotate it.
## Telnet over TLS
@@ -140,17 +174,17 @@ tls_cert = /etc/bbs/cert.pem
tls_key = /etc/bbs/key.pem
```
A telnet or raw listener with `tls_cert` and `tls_key` accepts TLS (1.2 or
later) and then telnet (or TN3270) as usual. SyncTERM (TelnetS) and
`c3270 L:host:992` both speak it. A client has 15 seconds to finish the
handshake. `tls_cert = acme` uses the [ACME client's](Certificates)
certificate instead of files.
A telnet or raw listener with `tls_cert` and `tls_key` accepts TLS (1.2
or later). Then it accepts telnet (or TN3270) as usual. SyncTERM
(TelnetS) and `c3270 L:host:992` both use it. A client has 15 seconds to
complete the handshake. `tls_cert = acme` uses the certificate of the
[ACME client](Certificates) in place of files.
## Certificates
Every TLS server reads its certificate again when the file changes, so a
renewal needs no restart. The BBS's own [ACME client](Certificates) gets
and renews certificates from Let's Encrypt or ZeroSSL for all of them.
Each TLS server reads its certificate again when the file changes. Thus,
a renewal does not need a restart. The [ACME client](Certificates) of
the BBS gets and renews certificates from Let's Encrypt or ZeroSSL for
all of them.
**See also:** [SSH](SSH), [Configuration](Configuration), [Sysop tools](Sysop-Tools)
+23 -20
View File
@@ -1,27 +1,30 @@
Telnet callers whose terminal has sixel graphics (xterm `-ti vt340`,
mlterm, foot, WezTerm, Windows Terminal, iTerm2, SyncTERM and others) see
the logo as a picture above the system's name. The logo is
`logo = /etc/bbs/logo.png`, or, if that is not set, the system's name drawn
in a pixel font.
Some terminals have sixel graphics (xterm `-ti vt340`, mlterm, foot,
WezTerm, Windows Terminal, iTerm2, SyncTERM and others). Telnet callers
with these terminals see the logo as a picture above the name of the
system. The logo is `logo = /etc/bbs/logo.png`. If you do not set it, the
logo is the name of the system, drawn in a pixel font.
The BBS asks every ANSI terminal for its device attributes (`CSI c`;
sixel is attribute 4) and for its character cell size in pixels
(`CSI 16 t`, to fit the logo to the window), so nothing changes for
terminals without sixel. A caller can turn sixel off (or on, if their
terminal has it) in their profile, and the choice is kept for their later
calls.
The BBS asks each ANSI terminal for its device attributes (`CSI c`.
Sixel is attribute 4). It also asks for the size of the character cell in
pixels (`CSI 16 t`), to fit the logo to the window. Thus, nothing changes
for terminals without sixel. A caller can disable sixel (or enable it, if
the terminal has it) in the profile. The BBS keeps this selection for the
later calls of the caller.
`sixel = auto` is the default for telnet listeners, and `no` for raw and
rlogin listeners, because a picture is slow over a modem.
`sixel = auto` is the default for telnet listeners. `no` is the default
for raw and rlogin listeners, because a picture is slow over a modem.
## Pictures
Pictures on the [image boards](Image-Boards) are shown with sixel too.
Terminals without sixel get the best they can show: kitty's graphics
protocol on kitty and Ghostty, iTerm2's inline images on iTerm2 and
mintty, and coloured half blocks on any other UTF-8 terminal with colour.
*Pictures on/off* (**M**) in the profile turns them off for a caller.
3270s have their own ways of showing pictures, with vector graphics or
blocks (see [TN3270](TN3270#pictures)).
The BBS also uses sixel to show pictures on the [image boards](Image-Boards).
Terminals without sixel get the best format that they can show:
- The graphics protocol of kitty on kitty and Ghostty.
- The inline images of iTerm2 on iTerm2 and mintty.
- Coloured half blocks on all other UTF-8 terminals with colour.
*Pictures on/off* (**M**) in the profile disables pictures for a caller.
3270s have their own methods to show pictures, with vector graphics or
blocks (refer to [TN3270](TN3270#pictures)).
**See also:** [TN3270 graphics](TN3270), [Configuration](Configuration), [Image boards](Image-Boards)
+31 -26
View File
@@ -1,20 +1,22 @@
Sysop tools is the sysop's menu inside the BBS, reached with `*` on a
sysop's main menu (a custom menu can also have a `sysop` item). It works on
any terminal, although watching a node needs a text terminal.
Sysop tools is the menu of the sysop inside the BBS. To open it, push `*`
on the main menu of a sysop (a custom menu can also have a `sysop` item).
It operates on all terminals. But to watch a node, you must have a text
terminal.
| Tool | Key | What it does |
|---|---|---|
| watch a node | `W` | what a text caller is sent, as it is sent, on your screen: their menus, their door, their typing echoed. A key stops; their leaving ends it. Their screen size and character set are theirs |
| chat with a node | `C` | the caller is told you would like a word, and taken into a private chat with you at their next menu (their page's room, `sysop-N`); you wait there |
| kick a node | `K` | throw a caller off, after a yes |
| users | `U` | every user's level, flags and state; for one: their level, flags (`+AB -C` adds and takes), lock or unlock, sysop rights given or taken, a new password. Not your own lock or rights |
| statistics | `S` | totals (users, messages, mail, files; logins, posts, pages and failed logins since the start), and calls, new users, posts and uploads for each of the last 14 days, as bars |
| hack log and bans | `H` | the addresses banned now (a number lifts its ban), and `L` the [hack log](Security#keeping-callers-out)'s last 100 lines |
| scheduled events | `E` | the events, when they run next and how their last run went; one's command and output, and `R` runs it now |
| configuration | `F` | the setup screens (blue windows and pull-down menus on ANSI terminals): the board, the system, connections, internet and online services, messengers, e-mail, networks, time, users and groups, maintenance; nothing changes until F10 saves (F9 quits), and then what may change while callers are on is put in force at once ([Configuration](Configuration#editing-it-the-configuration-screens)). Shown when the BBS runs with `-config` |
| available | `A` | whether pages reach you; when not, a caller who pages is told you are not available and may leave you a message |
| watch a node | `W` | shows on your screen the data that the BBS sends to a text caller, at the same time: their menus, their door, the echo of their keys. A key stops it. It also stops when the caller leaves. The screen size and character set are those of the caller |
| chat with a node | `C` | at the next menu, the BBS tells the caller that you want to talk. Then it takes the caller into a private chat with you (the room of their page, `sysop-N`). You wait there |
| kick a node | `K` | disconnects a caller, after a yes |
| users | `U` | shows the level, flags and state of all users. For one user, you can set: the level, the flags (`+AB -C` adds and removes), lock or unlock, sysop rights given or removed, a new password. You cannot change your own lock or rights |
| statistics | `S` | shows totals (users, messages, mail, files, and logins, posts, pages and failed logins since the start). It also shows calls, new users, posts and uploads for each of the last 14 days, as bars |
| hack log and bans | `H` | shows the addresses that are banned now (a number removes its ban). `L` shows the last 100 lines of the [hack log](Security#keeping-callers-out) |
| scheduled events | `E` | shows the events, their next run and the result of their last run. For one event, it shows the command and the output. `R` runs it now |
| configuration | `F` | the setup screens (blue windows and pull-down menus on ANSI terminals): the board, the system, connections, internet and online services, messengers, e-mail, networks, time, users and groups, maintenance. Nothing changes until F10 saves (F9 quits). Then the BBS applies immediately the settings that can change while callers are on ([Configuration](Configuration#editing-it-the-configuration-screens)). This tool shows only when the BBS runs with `-config` |
| available | `A` | sets if pages get to you. If you are not available, the BBS tells a caller who pages that you are not available. The caller can leave a message for you |
Validating new users stays on the main menu (`V`, when some wait).
The validation of new users stays on the main menu (`V`, when new users
wait).
## Scheduled events
@@ -32,25 +34,28 @@ every = 60
timeout = 300
```
A scheduled event is a program the BBS runs for you, either `at` a time
each day or `every` so many minutes (the first run comes that many minutes
after the BBS starts). The command is a program and its arguments,
separated by spaces; `"..."` or `'...'` keep spaces inside one argument.
It runs without a shell, with `BBS_EVENT` set to the event's name, and only
one event runs at a time. A run that goes past `timeout` is stopped.
A scheduled event is a program that the BBS runs for you. It runs `at` a
time each day, or `every` a number of minutes. The first run comes that
number of minutes after the BBS starts. The command is a program and its
arguments, with spaces between them. `"..."` or `'...'` keep spaces
inside one argument.
Every run is logged. The last run's result and output (its last 4 KB) are
kept for the sysop tools and the API. `bbs check` warns about a program it
cannot find.
The BBS runs the command without a shell, with `BBS_EVENT` set to the
name of the event. Only one event runs at a time. If a run continues
after `timeout`, the BBS stops it.
The BBS logs each run. It keeps the result and the output (the last 4 KB)
of the last run for the sysop tools and the API. If `bbs check` cannot
find a program, it gives a warning.
## The API
| Request | What it does |
|---|---|
| `GET /api/v1/admin/events` | the events, their next and last runs |
| `POST /api/v1/admin/events/{name}/run` | run one now, and wait for it |
| `PUT /api/v1/admin/available` | `{"available": false}`: pages reach no one |
| `GET /api/v1/admin/events` | gives the events, and their next and last runs |
| `POST /api/v1/admin/events/{name}/run` | runs one event now, and waits for it |
| `PUT /api/v1/admin/available` | `{"available": false}`: pages go to no one |
| `GET /api/v1/admin/bans`, `DELETE /api/v1/admin/bans/{ip}`, `GET /api/v1/admin/hacklog` | bans and the hack log |
| `POST /api/v1/admin/nodes/{n}/kick` | throw a caller off |
| `POST /api/v1/admin/nodes/{n}/kick` | disconnects a caller |
**See also:** [Administration](Administration), [Security](Security), [Chat and paging](Chat-and-Paging)
+84 -73
View File
@@ -1,108 +1,119 @@
IBM 3270 terminals and their emulators get full 3270 screens, with PF
keys and, where the terminal has them, graphics. This page covers how the
BBS recognises a 3270, the keys, and how it draws pictures.
keys. If the terminal has graphics, they also get graphics. This page
tells how the BBS recognises a 3270, the keys, and how the BBS draws
pictures.
A 3270 client connects to the telnet listener like any other client. The
BBS asks every client for its terminal type. A client that says
`IBM-3278-*`, `IBM-3279-*`, `IBM-3277-*` or `IBM-DYNAMIC` is handed to
[go3270](https://github.com/D-Modem/go3270), which negotiates binary and
end-of-record mode and finds the screen size (from 24x80 up to the model
5's 27x132, or what IBM-DYNAMIC says) and the code page. The caller then
gets the 3270 screens:
A 3270 client connects to the telnet listener in the same way as all
other clients. The BBS asks each client for its terminal type. If a
client says `IBM-3278-*`, `IBM-3279-*`, `IBM-3277-*` or `IBM-DYNAMIC`,
the BBS gives it to [go3270](https://github.com/D-Modem/go3270). go3270
negotiates binary and end-of-record mode. It finds the screen size (from
24x80 up to the 27x132 of the model 5, or the size that IBM-DYNAMIC
gives) and the code page. Then the caller gets the 3270 screens:
| Key | What it does |
|---|---|
| Enter | log on, choose a menu's option (by its letter), select (type `S` by a line), save |
| Enter | log on, select an option of a menu (by its letter), select (type `S` adjacent to a line), save |
| PF3 | back, log off |
| PF5 | new user (at the logon); new scan (the areas); read new (in an area); send (in the editor); reply by mail (in a message); change where you call from (the profile) |
| PF5 | new user (at the logon). New scan (the areas). Read new (in an area). Send (in the editor). Reply by mail (in a message). Change your location (the profile) |
| PF6 | post (in an area), new mail (in the mail), add an area (the sysop), your password (the profile) |
| PF7 / PF8 | up / down a page, or the message's text |
| PF4 | reply; messages to you (the areas) |
| PF7 / PF8 | up / down a page, or the text of the message |
| PF4 | reply. Messages to you (the areas) |
| PF9 | delete, remove |
| PF10 / PF11 | previous / next message; find messages / scan setup (the areas) |
| PF10 / PF11 | previous / next message. Find messages / scan setup (the areas) |
The key line at the bottom of each screen shows which of these keys it
accepts. The screens are the same as the text BBS's (see
[Development](Development#screens)), with the same choices made by PF key
instead of by letter.
The key line at the bottom of each screen shows which of these keys the
screen accepts. The screens are the same as the screens of the text BBS
(refer to [Development](Development#screens)). The selections are the
same, but you make them with PF keys, not with letters.
```
c3270 localhost:2300
x3270 -model 3279-4 localhost:2300
```
With `tn3270 = no` on a listener, 3270s are sent the text BBS instead,
which they cannot show.
With `tn3270 = no` on a listener, the BBS sends the text BBS to 3270s.
They cannot show it.
## 3270 graphics
When a terminal connects, the BBS reads everything it reports about
itself (its query replies) and uses whatever graphics it has:
When a terminal connects, the BBS reads all the data that the terminal
reports about itself (its query replies). It uses all the graphics that
the terminal has:
| Feature | Terminals | Used for |
|---|---|---|
| graphic escape (code page 310) | nearly all: x3270, c3270, wc3270, PCOMM, Vista | the box around the main menu, rules, bar charts in System info; ASCII otherwise; pictures in blocks where there are no vector graphics |
| programmed symbols | IBM PCOMM, HostExplorer, Quick3270 | the logo on the logon screen: the system's name in a pixel font, or `tn3270_logo` (a PNG), cut into character cells and loaded as a symbol set; pictures where there are no vector graphics |
| vector graphics | PCOMM (host graphics, native protocol), HostExplorer | pictures, in the terminal's own colours, and the logo as a bitmap image instead of symbols (`tn3270_vector`, on by default) |
| graphic escape (code page 310) | almost all: x3270, c3270, wc3270, PCOMM, Vista | the box around the main menu, rules, bar charts in System info. ASCII if not. Pictures in blocks where there are no vector graphics |
| programmed symbols | IBM PCOMM, HostExplorer, Quick3270 | the logo on the logon screen: the name of the system in a pixel font, or `tn3270_logo` (a PNG), cut into character cells and loaded as a symbol set. Pictures where there are no vector graphics |
| vector graphics | PCOMM (host graphics, native protocol), HostExplorer | pictures, in the colours of the terminal, and the logo as a bitmap image in place of symbols (`tn3270_vector`, enabled by default) |
### Pictures
Pictures from the image boards (a post's thumbnail, and the full image)
are drawn in the best way the terminal supports, in this order:
The BBS draws pictures from the image boards (the thumbnail of a post,
and the full image) with the best method that the terminal supports. It
uses this sequence:
- **Vector graphics** (PCOMM): the picture as bitmaps, a pel for a pixel,
error-diffused to the terminal's own palette: PCOMM's 16 colours (its
Graphic Color reply), orange, purple, the dark shades and grey among
them. Each colour is overpainted: PCOMM's exclusive or does not combine
blue with the other colours. The cells under a picture are left empty,
and the cursor elsewhere: on PCOMM a character over a picture clears it
in its cell.
- **Vector graphics** (PCOMM): the picture as bitmaps, one pel for each
pixel. Error diffusion changes the picture to the palette of the
terminal: the 16 colours of PCOMM (its Graphic Color reply), which
include orange, purple, the dark shades and grey. The BBS paints each
colour over the other colours, because the exclusive or of PCOMM does
not combine blue with the other colours. The BBS keeps the cells below
a picture empty, and puts the cursor in a different location. On
PCOMM, a character over a picture clears the picture in its cell.
- **Programmed symbols** (HostExplorer, Quick3270, PCOMM with vector
graphics off): the picture cut into character cells, each cell a
symbol, loaded into the terminal's symbol sets before the screen. A set
holds 190 symbols, so the picture is as large as its cells fit in the
sets there are; a blank cell needs no symbol, and cells alike share one.
graphics disabled): the BBS cuts the picture into character cells. Each
cell is a symbol. The BBS loads the symbols into the symbol sets of
the terminal before the screen. A set holds 190 symbols. Thus, the
size of the picture is the number of cells that fit in the available
sets. A blank cell does not need a symbol, and identical cells share
one symbol.
- With **triple-plane (colour) sets**, and the extended Load PS that
loads one plane at a time (PCOMM with programmed symbols alone has 3
such sets and 3 single-plane ones): every pel in any of 8 colours, its
blue, red and green planes added, the picture error-diffused to them.
A cell of several colours goes in a triple-plane set, its planes
loaded one by one and shown neutral (X'F7', which shows a cell's
planes); a cell of one colour and black goes in a single-plane set in
that colour while there is room, saving the colour sets for the rest.
- With single-plane sets alone (PCOMM with vector graphics on as well
has 2: 380 cells): each cell one of the 3270's 7 colours, the one
nearest its pels, and a symbol of its pels on or off, error-diffused.
loads one plane at a time (PCOMM with only programmed symbols has 3
such sets and 3 single-plane sets): each pel can be one of 8
colours, from the sum of its blue, red and green planes. Error
diffusion changes the picture to these colours. A cell of more than
one colour goes in a triple-plane set. The BBS loads its planes one
at a time and shows them neutral (X'F7', which shows the planes of a
cell). While there is space, a cell of one colour and black goes in
a single-plane set in that colour. This keeps the colour sets for
the other cells.
- With only single-plane sets (PCOMM with vector graphics also enabled
has 2: 380 cells): each cell has one of the 7 colours of the 3270,
the colour nearest to its pels. Its symbol has its pels on or off,
with error diffusion.
`tn3270_symbols = no` turns them off, for pictures and the logo.
- **Blocks** (x3270, and any colour 3270 with graphic escape): ▀ ▄ ▌ ▐ █
in the 3270's 7 colours, a cell two pixels by two, each cell the colour
and block nearest its four pixels.
- **Words** on the rest: `[cat.png, 640x480, 52 KB]`, which every
terminal shows under the picture too.
`tn3270_symbols = no` disables them, for pictures and the logo.
- **Blocks** (x3270, and all colour 3270s with graphic escape): ▀ ▄ ▌ ▐
█ in the 7 colours of the 3270. A cell is two pixels by two. Each cell
has the colour and block nearest to its four pixels.
- **Words** on all other terminals: `[cat.png, 640x480, 52 KB]`. All
terminals also show this text below the picture.
A caller can turn pictures off and on in their profile (M, or PF11). The
profile's terminal line shows how they are drawn.
A caller can disable and enable pictures in the profile (M, or PF11).
The terminal line of the profile shows the method that the BBS uses.
PCOMM sends its graphics query replies (the Segment reply that says it
has vector graphics, and its colours) only when they are asked for by
name. So the BBS sends a Query List for anything PCOMM's Summary reply
lists that did not come with the first Query. `cmd/gfxtest` in
[go3270](https://github.com/D-Modem/go3270) is a 3270 server for trying
vector graphics on an emulator, and it logs every record in both
directions.
PCOMM sends its graphics query replies (the Segment reply that says that
it has vector graphics, and its colours) only when the host asks for
them by name. Thus, the BBS sends a Query List for each item in the
Summary reply of PCOMM that did not come with the first Query.
`cmd/gfxtest` in [go3270](https://github.com/D-Modem/go3270) is a 3270
server to try vector graphics on an emulator. It logs each record in the
two directions.
Option T of the 3270 main menu, *Your terminal*, shows what the terminal
reported: its code page, cell size, graphic escape, symbol sets and Load
PS formats, vector graphics, and every query reply in hex. The log has a
line with this for each 3270 that connects. This is the place to start
when an emulator does not show the logo.
Option T of the 3270 main menu, *Your terminal*, shows the data that the
terminal reported: its code page, cell size, graphic escape, symbol sets
and Load PS formats, vector graphics, and all query replies in hex. The
log has a line with this data for each 3270 that connects. If an
emulator does not show the logo, start your checks here.
In PCOMM, programmed symbols and vector graphics need host graphics turned
on in the session's configuration, with the native protocol for vector
graphics (see PCOMM's *3270 Emulator User's Reference*, "Host Graphics").
The formats come from IBM's
In PCOMM, programmed symbols and vector graphics must have host graphics
enabled in the configuration of the session. Vector graphics must also
have the native protocol (refer to the *3270 Emulator User's Reference*
of PCOMM, "Host Graphics").
The formats come from the
[3270 Data Stream Programmer's Reference, GA23-0059-07](https://bitsavers.org/pdf/ibm/3174/GA23-0059-07_3270_Data_Stream_Programmers_Reference_199206.pdf)
and Greg Price's [3270 Graphics](https://www.prycroft6.com.au/misc/3270grfx.html).
of IBM and the [3270 Graphics](https://www.prycroft6.com.au/misc/3270grfx.html)
of Greg Price.
**See also:** [File transfers (IND$FILE)](File-Transfers), [Sixel graphics](Sixel-Graphics)
+67 -54
View File
@@ -1,10 +1,14 @@
The BBS asks each caller's terminal what it is, in the way DEC's terminals
were asked, and adapts to the answer. Real VTs (and emulators set up as
one) get their own line drawing and character set, monochrome terminals
get bold instead of colour, and a VT52 gets its own escape codes. The
terminal's answer appears in *Who's online* through the
[HTTP API](HTTP-API) (`terminal`), in the caller's profile, and in the
log:
The BBS asks the terminal of each caller what it is, in the same way as
DEC terminals were asked. Then it adapts to the answer:
- Real VTs (and emulators that are configured as a VT) get their own
line drawing and character set.
- Monochrome terminals get bold in place of colour.
- A VT52 gets its own escape codes.
The answer of the terminal shows in *Who's online* through the
[HTTP API](HTTP-API) (`terminal`), in the profile of the caller, and in
the log:
```
node 3: terminal VT220 (DA1 62;1;2;6;7;8;9, DA2 1;10;0)
@@ -14,58 +18,66 @@ node 5: terminal tmux 3.4 (DA1 1;2;4, DA2 84;0;0, version tmux 3.4)
## The questions
An ANSI terminal is sent all of these questions at once:
The BBS sends all of these questions together to an ANSI terminal:
| Sent | Asks for | Answered by |
|---|---|---|
| `ENQ` | the answerback message | terminals with one set (PuTTY says `PuTTY`) |
| `CSI c` | primary device attributes (DA1): the VT level and options | every VT100 and later, xterm, most emulators; SyncTERM in its CTerm form |
| `ENQ` | the answerback message | terminals that have one (PuTTY says `PuTTY`) |
| `CSI c` | primary device attributes (DA1): the VT level and options | all VT100 and later, xterm, most emulators. SyncTERM in its CTerm form |
| `CSI > c` | secondary device attributes (DA2): the model and firmware | VT220 and later, xterm, VTE, tmux, screen, mintty |
| `CSI > 0 q` | XTVERSION: name and version | xterm, tmux, foot, kitty, WezTerm, iTerm2 |
| `CSI 16 t` | the character cell in pixels (for sixel) | xterm and others |
| `CSI 6 n` | the cursor position | every ANSI terminal; by the time it arrives, the other answers have too |
| `CSI 6 n` | the cursor position | all ANSI terminals. When it arrives, the other answers are also there |
The position report comes last, so the BBS waits only for it rather than
for a timeout, even on a terminal that answers none of the others. If a
terminal is not ANSI (it did not answer the BBS's first question, the
cursor position), the BBS sends it a VT52's identify request, `ESC Z`. A
VT52 answers with `ESC / Z`; any other terminal shows a `Z`, which the BBS
then wipes.
The position report comes last. Thus, the BBS waits only for it, and not
for a timeout, also on a terminal that does not answer the other
questions. The first question of the BBS is the cursor position. If a
terminal does not answer it, the terminal is not ANSI. Then the BBS
sends the identify request of a VT52, `ESC Z`. A VT52 answers with
`ESC / Z`. All other terminals show a `Z`, which the BBS then erases.
## What it is called
The BBS names the terminal from the first of these that applies:
The BBS gives the terminal a name from the first of these items that
applies:
1. the name in its XTVERSION answer;
2. SyncTERM, from its CTerm attributes;
3. a VT52;
4. a DEC terminal, from its DA2 model (VT100, VT220, VT240, VT320, VT330,
1. The name in its XTVERSION answer.
2. SyncTERM, from its CTerm attributes.
3. A VT52.
4. A DEC terminal, from its DA2 model (VT100, VT220, VT240, VT320, VT330,
VT340, VT382, VT420, VT510, VT520, VT525, DECterm) with a DEC firmware
version;
5. an emulator, from its DA2 (tmux, screen, mintty, rxvt, xterm by its
patch number, VTE);
6. its answerback;
7. the VT class from DA1 (VT100, VT102, VT200 class ... VT500 class).
version.
5. An emulator, from its DA2 (tmux, screen, mintty, rxvt, xterm by its
patch number, VTE).
6. Its answerback.
7. The VT class from DA1 (VT100, VT102, VT200 class ... VT500 class).
## What it changes
- **DEC character sets.** A VT (DA1 says VT100 or later) whose terminal
type does not say UTF-8 and which is not a PC's BBS terminal (`ansi`,
`syncterm` and the like, which want CP437) gets line drawing and
blocks in DEC Special Graphics (`ESC ( 0`, the `lqkxjm` characters),
Latin-1 letters as 8-bit characters on a VT220 or later (DEC
Multinational has them) on an 8-bit line, and ASCII look-alikes for
the rest. ANSI art in CP437 is drawn the same way. Typed Latin-1
letters are read as such. The profile says `DEC graphics`.
- **Monochrome.** A DEC terminal by its model and firmware (not an
emulator) without ANSI colour (DA1 option 22), from the VT100 to the
VT520, gets bold for the bright colours and plain text for the rest.
- **Sixel** is known from DA1 option 4 (a VT240, VT330, VT340, xterm
with it on, foot, WezTerm, mlterm), and the cell size from `CSI 16 t`.
- **VT52.** A VT52 (or a VT100 in VT52 mode) gets clearing and cursor
movement as `ESC H`, `ESC J`, `ESC K`, `ESC Y`, `ESC A`-`D`, no
attributes, ASCII only; its cursor and keypad keys are not taken as
commands.
- **DEC character sets.** These rules apply to a VT (DA1 says VT100 or
later) if its terminal type does not say UTF-8, and if it is not a BBS
terminal of a PC (`ansi`, `syncterm` and similar types, which use
CP437):
- Line drawing and blocks use DEC Special Graphics (`ESC ( 0`, the
`lqkxjm` characters).
- On a VT220 or later on an 8-bit line, Latin-1 letters go as 8-bit
characters (DEC Multinational has them).
- All other characters become ASCII characters that look almost the
same.
The BBS draws ANSI art in CP437 in the same way. It reads typed
Latin-1 letters as Latin-1. The profile says `DEC graphics`.
- **Monochrome.** A DEC terminal from the VT100 to the VT520, known by
its model and firmware (not an emulator), without ANSI colour (DA1
option 22), gets bold for the bright colours. It gets plain text for
the other colours.
- **Sixel.** The BBS knows of sixel from DA1 option 4 (a VT240, VT330,
VT340, xterm with sixel enabled, foot, WezTerm, mlterm). It knows the
cell size from `CSI 16 t`.
- **VT52.** A VT52 (or a VT100 in VT52 mode) gets the clear and cursor
movement as `ESC H`, `ESC J`, `ESC K`, `ESC Y`, `ESC A`-`D`. It gets no
attributes, and ASCII only. The BBS does not read its cursor and
keypad keys as commands.
## Turning it off
@@ -76,26 +88,27 @@ address = 127.0.0.1:2323
vt = no
```
With `vt = no` the BBS asks none of these questions and changes nothing
(it still checks for sixel with DA1 alone). `auto`, the default, asks.
With `vt = no`, the BBS asks none of these questions and changes nothing
(it still checks for sixel with DA1 only). `auto`, the default, asks the
questions.
## What a caller sets
Settings a caller changes in their profile are kept with their account
and apply from their next call:
The BBS keeps the settings that a caller changes in the profile with the
account. They apply from the next call:
| Setting | Values | At the next call |
|---|---|---|
| `ansi` | `on`, `off` | ANSI as they set it, whatever the terminal answered (`off` turns RIP off too) |
| `ansi` | `on`, `off` | ANSI as the caller set it, for all answers from the terminal (`off` also disables RIP) |
| `utf8` | `on`, `off` | UTF-8, or CP437 (ASCII where there is no ANSI) |
| `sixel` | `on`, `off` | `off` keeps sixel off; `on` only where the terminal says it has it |
| `sixel` | `on`, `off` | `off` keeps sixel disabled. `on` enables it only if the terminal says that it has sixel |
| `rip` | `on`, `off` | the same for RIPscrip |
| `width` | `40`, `80` | a Commodore's columns |
| `width` | `40`, `80` | the columns of a Commodore |
| `editor` | `full`, `line` | the full-screen editor or the line editor |
| `expert` | `on`, `off` | menus as their prompt alone, `?` for the rest |
| `expert` | `on`, `off` | menus show only as their prompt. `?` shows the remainder |
A Commodore or a VT52 uses only the settings that apply to it. The
settings appear as `prefs` at `GET /api/v1/me` and are changed with
`PATCH /api/v1/me` (see [HTTP API](HTTP-API)).
settings show as `prefs` at `GET /api/v1/me`. To change them, use
`PATCH /api/v1/me` (refer to [HTTP API](HTTP-API)).
**See also:** [PETSCII and RIP](PETSCII-and-RIP), [Sixel graphics](Sixel-Graphics), [Configuration](Configuration)
+76 -63
View File
@@ -1,11 +1,11 @@
The BBS can keep its own time and serve it. It can follow time servers
over NTP, NTS (NTP secured with keys from a TLS exchange) and PTP. It can
also be an NTP server, an NTS-KE server and a PTP grandmaster. All of it
is off unless its section is in the configuration.
over NTP, NTS (NTP with keys from a TLS exchange) and PTP. It can also be
an NTP server, an NTS-KE server and a PTP grandmaster. All of these
functions are disabled until you put their section in the configuration.
The protocols' packets come from Meta's
[facebook/time](https://github.com/facebook/time) (Apache-2.0). The
servers and clients are the BBS's own.
The packets of the protocols come from
[facebook/time](https://github.com/facebook/time) of Meta (Apache-2.0).
The servers and clients are part of the BBS.
## Following time servers
@@ -16,37 +16,43 @@ poll = 64
set_clock = no
```
Each poll, every server is asked. NTP and NTS servers are asked four
times, and the answer with the shortest round trip counts. The clock then
takes the median of the servers' offsets, so one wrong server is outvoted.
At each poll, the BBS asks all servers. It asks NTP and NTS servers four
times, and the answer with the shortest round trip counts. Then the clock
uses the median of the offsets of the servers. Thus, the other servers
outvote one incorrect server.
- `ntp HOST[:PORT]` is plain NTP.
- `nts HOST[:PORT]` is NTS. The port is the NTS-KE port (4460 if none).
The key exchange gives eight cookies, each request spends one and asks
for one back, and a new exchange is made when cookies run out or the
server stops knowing them. `root_cas` names a PEM file to trust instead
of the system's roots, for a private server.
- `nts HOST[:PORT]` is NTS. The port is the NTS-KE port (4460 if you do
not give a port). The key exchange gives eight cookies. Each request
uses one cookie and asks for one back. The BBS makes a new exchange
when no cookies remain or when the server does not know them.
`root_cas` names a PEM file to trust in place of the roots of the
system, for a private server.
- `ptp HOST` asks a PTP grandmaster for unicast transmission (announce
every 2 s, sync every 1 s, for 60 s at a time, renewed). It needs ports
319 and 320, so the BBS must start as root (it binds them before it
becomes `[general] user`).
every 2 s, sync every 1 s, for 60 s at a time, renewed). It must have
ports 319 and 320. Thus, the BBS must start as root (it binds the ports
before it becomes `[general] user`).
With `set_clock = no` (the default), the system clock is left alone. The
BBS keeps the offset it measures and serves the corrected time. With
`set_clock = yes` (Linux), it steps the system clock when it is more than
128 ms out and slews it otherwise, and tells the kernel the clock is
synchronised. That needs root, or `CAP_SYS_TIME` kept after the BBS gives
up root (systemd: `AmbientCapabilities=CAP_SYS_TIME`). Don't turn it on
next to chrony or ntpd, which would fight it. If it can't set the clock,
it says so once in the log and falls back to correcting its own time.
With `set_clock = no` (the default), the BBS does not change the system
clock. The BBS keeps the offset that it measures and serves the
corrected time.
With no servers, the BBS tells of the system clock: stratum 3 while the
kernel says it is synchronised, unsynchronised otherwise. `stratum` says
otherwise, for example `stratum = 1` and `refid = GPS` on a machine whose
clock a GPS keeps.
With `set_clock = yes` (Linux), the BBS steps the system clock when the
clock has an error of more than 128 ms. If the error is smaller, it slews
the clock. It also tells the kernel that the clock is synchronised. This
must have root, or `CAP_SYS_TIME` kept after the BBS stops its root
access (systemd: `AmbientCapabilities=CAP_SYS_TIME`). Do not enable it
with chrony or ntpd, because they will change the clock in opposite
directions. If the BBS cannot set the clock, it writes this one time in
the log. Then it corrects only its own time.
`bbs time` asks the configured servers once and prints each offset.
`bbs time nts time.cloudflare.com` asks one server instead:
If there are no servers, the BBS reports the system clock: stratum 3
while the kernel says that the clock is synchronised, and unsynchronised
if not. `stratum` sets a different value. For example, use `stratum = 1`
and `refid = GPS` on a machine with a clock that a GPS controls.
`bbs time` asks the configured servers one time and prints each offset.
`bbs time nts time.cloudflare.com` asks only that server:
```
$ bbs time nts time.cloudflare.com ntp pool.ntp.org
@@ -63,10 +69,11 @@ rate = 2 ; requests a second an address may make (0: no limit)
burst = 16 ; and at once
```
Only client requests (mode 3) are answered, so the control and private
modes used for amplification attacks get nothing. Addresses banned by the
guard (`[security]`) get nothing either. The stratum told is one past the
server followed, and the reference ID is that server's address.
The server answers only client requests (mode 3). Thus, the control and
private modes that amplification attacks use get no answer. Addresses
that the guard (`[security]`) banned also get no answer. The stratum
that the server gives is one more than the stratum of the server that it
follows. The reference ID is the address of that server.
## NTS-KE server
@@ -78,14 +85,17 @@ tls_key = /etc/bbs/key.pem
ntp_host = time.example.org ; told to clients ("": this host)
```
NTS needs `[ntp]` too: the key exchange hands out cookies, and the NTP
server answers requests that carry them, authenticated. The cookie key
changes each day, and the last week's keys are kept, so cookies stay good.
A restart makes new keys. Clients then get an NTS NAK and exchange keys
again by themselves. The certificate is read again when its file changes,
so a renewal needs no restart. AES-SIV-CMAC-256, AES-128-GCM-SIV and
AES-SIV-CMAC-512 are offered. GCM-SIV goes only to clients that say they
make its keys as the RFC says (chrony before 4.4 did not).
NTS must also have `[ntp]`. The key exchange gives cookies, and the NTP
server answers requests that contain them, with authentication. The
cookie key changes each day. The BBS keeps the keys of the last week, so
that the cookies stay valid. A restart makes new keys. Then clients get
an NTS NAK and do the key exchange again automatically.
The BBS reads the certificate again when its file changes. Thus, a
renewal does not need a restart. The server offers AES-SIV-CMAC-256,
AES-128-GCM-SIV and AES-SIV-CMAC-512. It gives GCM-SIV only to clients
that say that they make its keys as the RFC specifies (chrony before 4.4
did not).
A chrony client:
@@ -107,23 +117,24 @@ timestamping = software
The BBS is a two-step, end-to-end grandmaster on UDP ports 319 and 320.
- **Multicast** (with `interface`): announce and sync go to 224.0.1.129.
Delay requests are answered to the client directly, the hybrid mode
linuxptp and others accept.
- **Unicast**: clients that ask (linuxptp's `unicast_master_table`,
Meta's ptp4u clients, `ptp HOST` on another BBS) are granted announce,
sync and delay responses, up to `max_clients`, no faster than
`log_min_interval`.
The BBS sends the answers to delay requests directly to the client.
This is the hybrid mode that linuxptp and other clients accept.
- **Unicast**: the BBS gives announce, sync and delay responses to
clients that ask for them (the `unicast_master_table` of linuxptp, the
ptp4u clients of Meta, `ptp HOST` on a different BBS). It accepts up
to `max_clients`, not faster than `log_min_interval`.
Time on the wire is TAI (UTC + `utc_offset`, 37). The clock class is 6
while the BBS's clock is synchronised, 248 otherwise. The time source
says where the time comes from (NTP, PTP, GNSS, or the internal
The time on the wire is TAI (UTC + `utc_offset`, 37). The clock class is
6 while the clock of the BBS is synchronised, and 248 if not. The time
source tells the source of the time (NTP, PTP, GNSS, or the internal
oscillator).
Timestamps are the kernel's on Linux (`SO_TIMESTAMPING`). Elsewhere
packets are stamped as they are read and written. `timestamping =
hardware` uses the network card's clock, which has to be kept on the
system clock (`phc2sys -s CLOCK_REALTIME -c eth0 -O 0`). The card is set
up as root, before the BBS gives root up.
On Linux, the kernel makes the timestamps (`SO_TIMESTAMPING`). On other
systems, the BBS stamps packets when it reads and writes them.
`timestamping = hardware` uses the clock of the network card. You must
keep that clock on the system clock
(`phc2sys -s CLOCK_REALTIME -c eth0 -O 0`). The BBS configures the card
as root, before it stops its root access.
A linuxptp client, by unicast:
@@ -141,12 +152,14 @@ unicast_master_table 1
## Tested with
- chrony 4.5 as an NTP and NTS client of the BBS, and as an NTP and NTS
server the BBS follows (port negotiation included).
server that the BBS follows (also port negotiation).
- linuxptp 4.0 `ptp4l` as a multicast and as a unicast client of the
grandmaster (within about a microsecond, software timestamps, over a
virtual Ethernet link), and as a unicast grandmaster the BBS follows.
- Meta's NTS-KE server, whose cookies the BBS's NTP server opens.
grandmaster (with an error of about a microsecond, software
timestamps, over a virtual Ethernet link), and as a unicast
grandmaster that the BBS follows.
- The NTS-KE server of Meta. The NTP server of the BBS opens its cookies.
In that test, the BBS read a `ptp4l` grandmaster on software timestamps
37 seconds off: that grandmaster sends the system clock's UTC as PTP's
TAI. A grandmaster whose card's clock is on TAI doesn't have this problem.
with an error of 37 seconds. The cause is that this grandmaster sends the
UTC of the system clock as the TAI of PTP. A grandmaster with a card
clock on TAI does not have this problem.
+131 -82
View File
@@ -1,13 +1,15 @@
The HTTP API's server also serves the message areas as a web forum, at
`/forum/` (and `/`, which goes there). It is laid out like the bulletin
boards of their day: categories of forums, topics, and posts with their
authors beside them, in one of several [themes](#themes). The look is the
BBS's own CSS, built into the `bbs` binary; nothing is loaded from
elsewhere, and no script runs on the pages.
The server of the HTTP API also shows the message areas as a web forum.
The forum is at `/forum/`. The path `/` also goes to the forum. The layout
is similar to the bulletin boards of their time. The forum has categories
of forums, topics, and posts. The name of the author is adjacent to each
post. You can select one of many [themes](#themes). The CSS is the BBS's
own CSS, and it is in the `bbs` binary. The pages load nothing from other
locations, and no script runs on the pages.
It is the same BBS: the same accounts, areas and messages. A post on the
forum is a message on the terminals, in QWK packets, on NNTP and FidoNet
(as its area is), and a terminal caller's reply shows in its topic.
The forum is the same BBS. It has the same accounts, areas and messages.
A post on the forum is also a message on the terminals, in QWK packets,
on NNTP and on FidoNet (if its area is on these networks). When a
terminal caller replies, the reply shows in the topic.
```ini
[http]
@@ -21,68 +23,91 @@ address = :8443
| Setting | Default | What it sets |
|---|---|---|
| `forum` | `yes` | the forum at `/forum/` (with `no`, `/` goes to the web terminal again) |
| `forum_guests` | `yes` | those not logged in may read the areas anyone may read (areas with a `read` requirement never) |
| `forum_theme` | `ipb3` | the theme callers get until they choose one ([below](#themes)) |
| `forum_flags` | `yes` | posters' countries' flags by their names ([below](#flags)) |
| `forum_guests` | `yes` | users who are not logged in can read the areas that all users can read (never areas with a `read` requirement) |
| `forum_theme` | `ipb3` | the theme that callers get until they select a theme ([below](#themes)) |
| `forum_flags` | `yes` | the flag of the poster's country adjacent to the name ([below](#flags)) |
## The pages
| Page | What it shows |
|---|---|
| `/forum/` | the board: the areas by their group (the areas' `group`, else *Message Areas*), each with its topics, replies, newest post and whether it has any new; the board's statistics; who is online |
| `/forum/area/N` | an area's topics, newest activity first, 20 to a page; *Mark this forum read* |
| `/forum/area/N/new` | a new topic, with a poll if wanted |
| `/forum/topic/N` | a topic's posts, 20 to a page, and a reply box; the poll, if it has one |
| `/forum/post/N` | a message, found in its topic (links to a message from elsewhere) |
| `/forum/user/NAME` | a user's profile and recent posts |
| `/forum/online` | who is online, on every kind of line |
| `/forum/search?q=` | messages with the words (three letters at least) |
| `/forum/login`, `/forum/register` | logging in, and signing up (when `new_users` allows it) |
| `/forum/` | the board: the areas in their group (the `group` of the area, or *Message Areas*), each with its topics, replies, newest post and an indication of new posts; the statistics of the board; the users who are online |
| `/forum/area/N` | the topics of an area, newest activity first, 20 on each page; *Mark this forum read* |
| `/forum/area/N/new` | a new topic, with an optional poll |
| `/forum/topic/N` | the posts of a topic, 20 on each page, and a reply box; the poll, if the topic has one |
| `/forum/post/N` | a message, in its topic (for links to a message from other locations) |
| `/forum/user/NAME` | the profile and recent posts of a user |
| `/forum/online` | the users who are online, on all types of line |
| `/forum/search?q=` | messages that contain the words (minimum three letters) |
| `/forum/login`, `/forum/register` | log in, and sign up (when `new_users` permits it) |
A *Terminal* tab goes to the [web terminal](HTTP-API#the-web-terminal)
when it is on.
When the [web terminal](HTTP-API#the-web-terminal) is on, a *Terminal* tab
goes to it.
## Topics
A topic is a message that replies to nothing in its area, and every reply
to it or to its replies, however deep. Replies on the terminals thread
into topics as they do here. When the first post of a topic is deleted,
the next oldest becomes its first. Topics are marked read as they are
read (per user, per topic), and an area's as the BBS's new scan counts
them; *Mark this forum read* marks the area read to its newest message,
on the terminals' new scan too.
A topic is a message that is not a reply to a message in its area. The
topic also includes all replies to it and all replies to these replies, at
all levels. Replies on the terminals go into topics in the same way. If a
user deletes the first post of a topic, the next oldest post becomes the
first post.
Posting needs what posting on the terminals needs (the area's `post`
requirement; news-only areas take no posts). Posts are as on the BBS:
text, quoted with `> `, links made links when shown. Lines longer than a
terminal's (79 columns) are wrapped at spaces, not cut, so that the
terminals see the whole paragraph. The user's signature is added as on
the terminals, and an area that allows aliases lets the post be under one
(the real name is not shown).
The forum marks topics as read when a user reads them (for each user and
each topic). It marks an area as read in the same way as the new scan of
the BBS. *Mark this forum read* marks the area as read up to its newest
message. This also applies to the new scan on the terminals.
To post, a user must have the same permissions as for a post on the
terminals (the `post` requirement of the area). News-only areas do not
accept posts. Posts are the same as on the BBS:
- Posts are text. Quotes start with `> `.
- Links show as links.
- The forum wraps lines that are longer than a terminal line (79 columns)
at spaces. It does not cut them. Thus, the terminals show the full
paragraph.
- The forum adds the user's signature, as on the terminals.
- If an area permits aliases, a user can post under an alias. The forum
does not show the real name.
On a post:
- **Quote** begins a reply with the post quoted (`name wrote:` and the
lines with `> `), shown as a quote box.
- **Like** is the BBS's vote on a message (not on one's own).
- **Delete** is for the post's writer and the sysop.
- A poll is answered by those who may post in its area; answering again
changes the answer.
- **Quote** starts a reply that quotes the post (`name wrote:` and the
lines with `> `). The quote shows in a quote box.
- **Like** is the BBS's vote on a message. Users cannot vote on their own
messages.
- **Delete** is for the writer of the post and for the sysop.
- Users who can post in the area of a poll can answer the poll. A second
answer replaces the first answer.
## Flags
With a country database (`[general] geoip`) each post keeps its poster's
country, found when it is posted: by the address for those on the web,
telnet or SSH, by the caller ID for modem callers (`[general]
phone_country`, see [Modem Callers](Modem-Callers#where-callers-are)).
The forum shows it as a flag by the poster's name, in every theme (an
emoji, the country's name on hovering), and by each caller's line on
*Online Users*. Only the country is kept, never the address or number;
posts from before, from elsewhere (FidoNet, Usenet, QWK) or from where the
database does not know have none. `forum_flags = no` shows none (what is
kept stays). The database's `geoip_credit` goes at the foot of each page
while flags are shown. Behind a reverse proxy, name it in
`[http] trusted_proxies`, or every poster is in the proxy's country.
If you set a country database (`[general] geoip`), each post keeps the
country of its poster. The BBS finds the country when the user posts:
- For users on the web, telnet or SSH, it uses the address.
- For modem callers, it uses the caller ID (`[general]
phone_country`, refer to [Modem Callers](Modem-Callers#where-callers-are)).
The forum shows the country as a flag adjacent to the poster's name, in
all themes. The flag is an emoji. When you move the pointer over it, it
shows the name of the country. *Online Users* also shows a flag adjacent
to the line of each caller.
The BBS keeps only the country. It never keeps the address or the number.
These posts have no flag:
- Posts from before you set the database.
- Posts from other sources (FidoNet, Usenet, QWK).
- Posts from locations that the database does not know.
`forum_flags = no` shows no flags (the BBS keeps the data). While the
forum shows flags, the `geoip_credit` of the database shows at the bottom
of each page.
If the BBS is behind a reverse proxy, put the proxy in
`[http] trusted_proxies`. If you do not do this, all posters get the
country of the proxy.
## Themes
@@ -123,39 +148,63 @@ while flags are shown. Behind a reverse proxy, name it in
| `ipb4` | modern: a community suite of the late 2010s in the manner of Invision Community 4.7: a pale page, a white header with the board's name and the user's menu, a blue navigation bar with white tabs and a search box, white boxes with soft shadows, big round forum icons, stacked post counts, round photos, *Who's Online* and statistics beside the forums, posts with the author's pane on the left, *2 hours ago* times, likes as reactions, a reply box with the poster's photo |
| `ipb2` | classic: a board of the mid-2000s in the manner of Invision Power Board 2: a white page, boxes outlined in navy, blue gradient title bars, pale blue rows, small Verdana; *Logged in as* and *Welcome Guest* bars, *Last Post Info*, *Fast Reply*, big blue buttons |
All are this BBS's own CSS and templates, drawn to look like the boards
they recall; no code or images are taken from them. `forum_theme` is the
forum's; anyone (guests too) may choose another at the foot of every page,
kept in a cookie (`bbs_forum_theme`) for a year. A theme lays out the
board, topic lists, topics and profiles its own way, and shows the rest
(posting, searching, signing in) in its colours. A theme may build on another's templates (the phpBB 3.2 and 3.3 themes wear 3.1's, vBulletin 6's wears 5's, SMF 3.0's and 2.1's wear Curve's, XenForo 2.3's wears 2's, MyBB 1.8's wears 1.6's, which wears 1.2's, FluxBB 1.5's wears PunBB 1.2's, and YaBB 2.5's wears 2's, which wears 1's, with stylesheets of their own).
All themes are this BBS's own CSS and templates. Their appearance is
similar to the boards that they recall. They contain no code or images
from those boards.
`forum_theme` sets the theme of the forum. All users (also guests) can
select a different theme at the bottom of each page. The forum keeps the
selection in a cookie (`bbs_forum_theme`) for one year. A theme has its
own layout for the board, the topic lists, the topics and the profiles.
The other pages (posting, searching, signing in) show in the colors of
the theme.
Some themes use the templates of a different theme, with their own
stylesheets:
- The phpBB 3.2 and 3.3 themes use the templates of 3.1.
- vBulletin 6 uses the templates of 5.
- SMF 3.0 and 2.1 use the templates of Curve.
- XenForo 2.3 uses the templates of 2.
- MyBB 1.8 uses the templates of 1.6, and 1.6 uses the templates of 1.2.
- FluxBB 1.5 uses the templates of PunBB 1.2.
- YaBB 2.5 uses the templates of 2, and 2 uses the templates of 1.
## Logins
A login is the HTTP API's session token (lasting `session_hours`), kept in
an `HttpOnly`, `SameSite=Lax` cookie for `/forum` alone (`Secure` with
TLS). Logins are throttled and logged as anywhere else; a token for the
API is not taken as a cookie. Logging out revokes the token. Every form a
logged-in user sends carries a token of their session's, and is refused
without it.
A login is the session token of the HTTP API (it lasts `session_hours`).
The forum keeps the token in an `HttpOnly`, `SameSite=Lax` cookie that is
only for `/forum` (`Secure` with TLS). The BBS limits and logs logins as
it does for all other logins. The forum does not accept an API token as a
cookie. When a user logs out, the BBS revokes the token. Each form that a
logged-in user sends contains a token from the user's session. The forum
refuses a form without this token.
### Sign-in codes
Signed in on the BBS (telnet, SSH, a modem by modemmenu, a 3270), a user
asks *Your profile*, `C` (PF10), for a sign-in code: eight letters and
digits, `ABCD-EFGH`, good once, for five minutes; a new one ends the last.
The Sign In page takes the code alone, with no name or password: a
password typed nowhere on the machine at hand, or for a user whose
password is modemmenu's. Anywhere else a password is asked (the web
terminal, the image boards, the API, FTP), the code serves once for the
password, with the user's name.
A user who is signed in on the BBS (telnet, SSH, a modem by modemmenu, a
3270) can get a sign-in code from *Your profile*, `C` (PF10). The code has
eight letters and digits, `ABCD-EFGH`. You can use it one time, for five
minutes. A new code cancels the previous code.
Codes are kept in memory (a restart ends them) as their SHA-256, never
logged; a wrong one is a failed login, throttled and in the hack log like
any other; a locked account's opens nothing.
The Sign In page accepts the code alone, with no name or password. Use it
in these conditions:
The pages allow nothing from elsewhere (`Content-Security-Policy:
default-src 'self'`), no framing, and keep no copies (`no-store`).
Requests count against the API's `rate` per address.
- You do not want to type a password on the computer that you use.
- The user's password is the password of modemmenu.
**See also:** [HTTP API](HTTP-API), [Message areas](Message-Areas), [Writing messages](Writing-Messages)
At all other locations that ask for a password (the web terminal, the
image boards, the API, FTP), you can use the code one time in place of
the password, with the user's name.
The BBS keeps the codes in memory as their SHA-256 (a restart cancels
them). It never logs them. A wrong code is a failed login. The BBS limits
it and writes it in the hack log, as for all other failed logins. A code
for a locked account opens nothing.
The pages permit nothing from other locations (`Content-Security-Policy:
default-src 'self'`). They do not permit framing, and they keep no copies
(`no-store`). Requests count against the `rate` of the API for each
address.
**Refer to:** [HTTP API](HTTP-API), [Message areas](Message-Areas), [Writing messages](Writing-Messages)
+37 -31
View File
@@ -1,12 +1,17 @@
Posts and mail are written in one of three editors, depending on the
terminal: the full-screen editor on ANSI terminals, the line editor on
other text terminals, and the editor screen on a 3270. Each one first asks
for `To` (Enter keeps what is offered) and `Subject`.
Callers write posts and mail in one of three editors. The editor
changes with the terminal:
- The full-screen editor on ANSI terminals.
- The line editor on other text terminals.
- The editor screen on a 3270.
Each editor first asks for `To` and `Subject`. For `To`, Enter keeps the
value that the editor shows.
## The full-screen editor
On an ANSI terminal (not a VT52 or a Commodore) of 40 columns and 12
rows or more:
The full-screen editor is for an ANSI terminal (not a VT52 or a
Commodore) of 40 columns and 12 rows or more:
```
To: alice Subject: Re: The meeting
@@ -23,44 +28,45 @@ _
| Key | What it does |
|---|---|
| typing | goes in at the cursor; a word that passes the edge wraps to the next line |
| cursor keys, Home, End, PgUp, PgDn | move about |
| Enter | a new line (the line breaks at the cursor) |
| Backspace, Delete (or ^D) | take away a character, or join two lines |
| ^Y | delete the line |
| ^Q | the quote window (a reply): Up and Down choose a line of the message replied to, Enter takes it into yours, ^Q or ESC closes the window |
| ^Z | save (`/S` alone on a line and Enter does too) |
| ^X (or ^A) | give up, after a Y |
| ^L | draw the screen again |
| typed text | goes in at the cursor. If a word goes past the edge, it wraps to the next line |
| cursor keys, Home, End, PgUp, PgDn | move the cursor |
| Enter | starts a new line (the line breaks at the cursor) |
| Backspace, Delete (or ^D) | removes a character, or joins two lines |
| ^Y | deletes the line |
| ^Q | opens the quote window (for a reply). Up and Down select a line of the initial message. Enter copies it into your message. ^Q or ESC closes the window |
| ^Z | saves the message (`/S` alone on a line, then Enter, also saves it) |
| ^X (or ^A) | stops the message without a save, after a Y |
| ^L | draws the screen again |
Lines can be up to 79 characters (fewer on a narrower screen), and a
message can have as many lines as the line editor allows. Messages from
other nodes are held until the message is saved.
A line can have up to 79 characters (fewer on a narrower screen). A
message can have the same number of lines as the line editor permits.
The BBS holds messages from other nodes until you save the message.
## The line editor
The line editor is used on other terminals, or by choice. Each line is
typed and sent with Enter, and words wrap at the edge. These commands work
on a line of their own:
The BBS uses the line editor on other terminals, or if the caller selects
it. Type each line and send it with Enter. Words wrap at the edge. These
commands operate when they are alone on a line:
| Command | What it does |
|---|---|
| `/S` | save |
| `/A` | give up |
| `/L` | list what is written |
| `/D` | delete the last line |
| `/C` | clear all |
| `/S` | saves the message |
| `/A` | stops the message without a save |
| `/L` | lists the text that you wrote |
| `/D` | deletes the last line |
| `/C` | clears all the text |
A reply starts with the message being answered, quoted.
A reply starts with a quote of the message that you answer.
## Choosing
On an ANSI terminal, `[E]ditor full/line` in *Your profile* switches
between the two editors, and the choice is kept ([`editor`](Terminal-Identification#what-a-caller-sets)).
On an ANSI terminal, `[E]ditor full/line` in *Your profile* changes
between the two editors. The BBS keeps the selection ([`editor`](Terminal-Identification#what-a-caller-sets)).
## On a 3270
A 3270 has an editor screen with `To`, `Subject` and a screen of lines to
type in. PF5 sends and PF3 gives up. A reply starts with its quote.
A 3270 has an editor screen with `To`, `Subject` and a screen of lines
for the text. PF5 sends the message. PF3 stops the message without a
save. A reply starts with its quote.
**See also:** [TN3270](TN3270), [Terminal identification](Terminal-Identification)
+120 -109
View File
@@ -1,10 +1,12 @@
The BBS has a Yahoo! Messenger server (YMSG, the protocol of Yahoo's
pager), beside its [IRC](IRC), [AIM](AIM-and-ICQ) and
[MSN](MSN-Messenger) servers and on the same chat. Someone signed in with
Yahoo! Messenger sees their BBS friends as buddies, IMs anyone on the BBS
(other Yahoo users, IRC, AIM and MSN users, and callers on telnet, SSH,
3270s and the web terminal), and joins the BBS's chat rooms as Yahoo chat
rooms.
The BBS has a Yahoo! Messenger server (YMSG, the protocol of the pager
of Yahoo). This server is adjacent to the [IRC](IRC), [AIM](AIM-and-ICQ)
and [MSN](MSN-Messenger) servers of the BBS, and it uses the same chat.
A user who signs in with Yahoo! Messenger can do these actions:
- See BBS friends as buddies.
- Send IMs to all users on the BBS (other Yahoo users, IRC, AIM and MSN
users, and callers on telnet, SSH, 3270s and the web terminal).
- Join the chat rooms of the BBS as Yahoo chat rooms.
```ini
[ymsg]
@@ -14,149 +16,158 @@ http_address = :80
| Setting | Default | What it sets |
|---|---|---|
| `address` | `:5050` | where the pager listens |
| `http_address` | none | the web half (the capacity lookup, the room list and file transfer), plain HTTP; port 80 for file transfer |
| `https_address` | none | the web half over HTTPS: the login of Y!M 9 and later |
| `address` | `:5050` | the address on which the pager listens |
| `http_address` | none | the web part (the capacity lookup, the room list and file transfer), plain HTTP. Port 80 for file transfer |
| `https_address` | none | the web part over HTTPS: the login of Y!M 9 and later |
| `tls_cert`, `tls_key` | none | the certificate for `https_address` (for `login.yahoo.com`) |
| `host` | the address each client asked on | the pager's address the capacity lookup gives; set it behind NAT |
| `max_clients` | `256` | connections at once |
| `max_per_ip` | `4` | from one address |
| `system` | `bbs` | the Yahoo ID the BBS's notices come from |
| `max_file_mb` | `16` | the largest file users may send each other, in MB; `0` turns file transfer off |
| `old_login` | `no` | `yes` gives Y!M 6 to 8 the Y!M 5 login instead of their own |
| `host` | the address on which each client asked | the address of the pager that the capacity lookup gives. Set it behind NAT |
| `max_clients` | `256` | the maximum number of connections at one time |
| `max_per_ip` | `4` | the maximum from one address |
| `system` | `bbs` | the Yahoo ID from which the notices of the BBS come |
| `max_file_mb` | `16` | the largest file that users can send to each other, in MB. `0` disables file transfer |
| `old_login` | `no` | `yes` gives Y!M 6 to 8 the Y!M 5 login in place of their own login |
## Versions served
YMSG 9 to 16. Three logins are served:
The BBS serves YMSG 9 to 16, with three logins:
- **The Y!M 5 challenge login** ("auth type 0", YMSG 9): Yahoo!
Messenger 5.x.
- **The Y!M 6 to 8 challenge login** ("auth type 1", YMSG 10 to 15):
Yahoo! Messenger 6, 7 and 8, and the third-party clients of that time
(Gaim, Kopete, libyahoo2's), which take whichever login the server
offers. Yahoo's version of this login ran the challenge through a set
of lookup tables; the BBS writes its challenges so that the client
runs through the tables zero times, so it needs no copy of them. If a
client turns out not to take these challenges, `old_login = yes`
offers it the Y!M 5 login instead.
- **The token login** (YMSG 16): Yahoo! Messenger 9 and later, and
the later Pidgin 2.x releases. The client sends the password over HTTPS to
`login.yahoo.com`, gets a token, and proves it on the pager. This
needs `https_address`.
(Gaim, Kopete, the client of libyahoo2). These clients use the login
that the server offers. The version of this login from Yahoo sent the
challenge through a set of lookup tables. The BBS writes its challenges
so that the client goes through the tables zero times. Thus, the BBS
does not need a copy of the tables. If a client does not accept these
challenges, `old_login = yes` offers it the Y!M 5 login.
- **The token login** (YMSG 16): Yahoo! Messenger 9 and later, and the
later Pidgin 2.x releases. The client sends the password over HTTPS to
`login.yahoo.com`, gets a token, and proves it on the pager. This login
must have `https_address`.
## Pointing a client at the BBS
The clients were made for Yahoo's servers, so each must be pointed at
the BBS. None of this has been tried with the real clients yet.
The clients were made for the servers of Yahoo. Thus, you must point
each client at the BBS. We did not try these procedures with the real
clients yet.
- With the BBS's [DNS server](DNS) (`[dns]`), the callers' machines that
use it are sent here for all of these names, with no hosts file.
- With the [DNS server](DNS) of the BBS (`[dns]`), the machines of
callers that use it come here for all of these names, with no hosts
file.
- Yahoo! Messenger 5 to 8: under `HKEY_CURRENT_USER\Software\Yahoo\Pager`
in the registry, set the string values `socket server` and
`IPLookup` to the BBS's host (community guides also set `Conn Server`
and `Host Name`). Or send `scs.msg.yahoo.com` and
`scsa.msg.yahoo.com` to the BBS in the machine's hosts file.
- Yahoo! Messenger 9 and later: the hosts file sends
`IPLookup` to the host of the BBS (community guides also set
`Conn Server` and `Host Name`). Or, in the hosts file of the machine,
send `scs.msg.yahoo.com` and `scsa.msg.yahoo.com` to the BBS.
- Yahoo! Messenger 9 and later: in the hosts file, send
`vcs1.msg.yahoo.com`, `vcs2.msg.yahoo.com`, `scsa.msg.yahoo.com` and
`login.yahoo.com` to the BBS; the machine must trust the certificate
given in `tls_cert` for `login.yahoo.com` (make a small certificate
authority of your own and add its certificate to the machine's trusted
roots). The HTTPS server takes the TLS 1.0 and old ciphers Windows XP
has.
- `insider.msg.yahoo.com` sent to the BBS gives the chat room browser
the BBS's rooms.
- Third-party clients (Pidgin, Kopete, Miranda, Trillian) take a pager
server in the account's settings.
`login.yahoo.com` to the BBS. The machine must trust the certificate
in `tls_cert` for `login.yahoo.com`. To do this, make a small
certificate authority of your own, and add its certificate to the
trusted roots of the machine. The HTTPS server accepts the TLS 1.0 and
the old ciphers of Windows XP.
- If you send `insider.msg.yahoo.com` to the BBS, the chat room browser
shows the rooms of the BBS.
- Third-party clients (Pidgin, Kopete, Miranda, Trillian) accept a pager
server in the settings of the account.
The deny list and bans in `[security]` apply as they do everywhere else.
The deny list and bans in `[security]` apply, as on all other routes.
## Signing in
Every Yahoo user is a BBS user. Their Yahoo ID is their BBS name in lower
case without its spaces (`carolann` is Carol Ann), and the password is
their BBS password. Failed sign-ins count towards the throttle and the
hack log, like any other login, and the user's access level must allow
chat. One account is signed in on one Yahoo client at a time: signing in
again signs the older one out.
Each Yahoo user is a BBS user. The Yahoo ID is the BBS name in lower
case without its spaces (`carolann` is Carol Ann). The password is the
BBS password. Failed sign-ins count towards the throttle and the hack
log, as all other logins do. The access level of the user must permit
chat. One account can be signed in on one Yahoo client at a time. A new
sign-in signs out the older one.
The challenge login proves the password by two digests of it, which the
BBS's password hashes can't check. So the BBS keeps each account's Yahoo
digests too, made whenever the password is known: when the account is
made, when its password is set, and at any login by password. An account
from before `[ymsg]` was set up has none yet: its user logs in once some
other way (telnet, SSH, IRC, AIM, the web) and can then sign in with
Yahoo. The log says so when that is why a sign-in failed. The digests are
kept only while `[ymsg]` is set up; anyone who read them from the
database could sign in by Yahoo as that user. The token login checks the
password itself, as any login does. The pager's connection is not
encrypted.
The challenge login proves the password with two digests of it. The
password hashes of the BBS cannot check these digests. Thus, the BBS
also keeps the Yahoo digests of each account. It makes them each time
that it knows the password: when the account is made, when the password
is set, and at all logins by password. An account from before the
configuration of `[ymsg]` has no digests yet. Its user must log in one
time by a different method (telnet, SSH, IRC, AIM, the web). Then the
user can sign in with Yahoo. If this is the cause of a failed sign-in,
the log tells you.
The BBS keeps the digests only while `[ymsg]` is configured. A person who
reads them from the database can sign in by Yahoo as that user. The
token login checks the password itself, as all logins do. The connection
of the pager is not encrypted.
## Buddies
The buddy list is the user's [friends list](Chat-and-Paging#friends),
the same list the BBS's chat, IRC, AIM and MSN show, with its groups
(`Friends` for friends in none). A buddy is always a BBS user: adding
anyone else is refused, and the BBS says so. Adding a buddy asks no one's
permission. A friend added or moved elsewhere comes to a client that is
on at once, and one added, moved or removed on Yahoo is changed
everywhere.
The buddy list is the [friends list](Chat-and-Paging#friends) of the
user. It is the same list that the chat of the BBS, IRC, AIM and MSN
show, with its groups (`Friends` for friends that are not in a group). A
buddy is always a BBS user. The BBS refuses all other buddies, and it
tells you. To add a buddy, no permission is necessary. If you add or
move a friend on a different route, a client that is on gets the change
immediately. If you add, move or remove a buddy on Yahoo, the change
applies on all routes.
The ignore list is the user's [blocked list](Chat-and-Paging#blocking):
a blocked user's messages are refused however they come, and the user
appears offline to them.
The ignore list is the [blocked list](Chat-and-Paging#blocking) of the
user. The BBS refuses the messages of a blocked user on all routes. The
user shows as offline to the blocked user.
A buddy is online while they are on the BBS by any route: with the
status their Yahoo client set (busy, be right back, a custom message,
invisible), or, on another route, with "on the BBS by telnet" (or IRC,
AIM, MSN...) as their status message.
A buddy is online while the buddy is on the BBS by any route. The buddy
has the status that the Yahoo client of the buddy set (busy, be right
back, a custom message, invisible). On a different route, the status
message is "on the BBS by telnet" (or IRC, AIM, MSN...).
## IMs
An IM to a BBS user is a [private
message](Chat-and-Paging#private-messages): a `PRIVMSG` on IRC, an IM on
AIM or MSN, a message line on a terminal. Yahoo's colours and fonts are
taken off. Typing notices pass between Yahoo clients only.
AIM or MSN, a message line on a terminal. The BBS removes the colours and
fonts of Yahoo. Typing notices go only between Yahoo clients.
Every line is kept. One to a user who isn't on is kept for them; they
get it when they next log in. Lines kept for a Yahoo user come when they
sign in, marked with when they were sent. The BBS's notices (new mail, a
page for the sysop, errors) come from the `system` ID.
The BBS keeps each line. If a user is not on, the BBS keeps the line for
the user. The user gets it at the next login. Lines kept for a Yahoo
user come at the sign-in, with the time that they were sent. The notices
of the BBS (new mail, a page for the sysop, errors) come from the
`system` ID.
## Sending files
Files go between Yahoo! Messenger users, through the BBS. They are held
in a temporary file only until the receiver has fetched them (an hour
at most) and are never put in the file areas. A file to someone who
isn't on Yahoo! Messenger at the time is declined, and the sender is
told to use the BBS's [file areas](Files-and-FTP) instead. So is a file
over `max_file_mb`, or to someone who blocks the sender.
Files go between Yahoo! Messenger users, through the BBS. The BBS holds
them in a temporary file only until the receiver gets them (a maximum of
one hour). It never puts them in the file areas. The BBS declines a
file to a user who is not on Yahoo! Messenger at that time. It tells the
sender to use the [file areas](Files-and-FTP) of the BBS. It does the
same for a file larger than `max_file_mb`, or for a file to a user who
blocks the sender.
This needs `http_address` on port 80, with these names sent to the BBS
(as for the other names above):
This function must have `http_address` on port 80, with these names sent
to the BBS (as for the other names above):
- `relay.msg.yahoo.com` (and `relay.yahoo.com`): Yahoo! Messenger 7 and
later. The sender offers the file, the receiver accepts, and both
connect to the relay: the sender uploads, the receiver downloads.
Set `host` if the BBS is behind NAT, as the receiver is given that
address for the relay.
later. The sender offers the file, the receiver accepts, and the two
clients connect to the relay. The sender uploads, and the receiver
downloads. If the BBS is behind NAT, set `host`, because the receiver
gets that address for the relay.
- `filetransfer.msg.yahoo.com`: Yahoo! Messenger 5 and 6. The sender
uploads the file and the receiver is sent a link to fetch it from.
uploads the file, and the receiver gets a link from which to download
it.
Neither way has been tried with the real clients yet, only with
scripted ones that do what libyahoo2 does. Direct connections between
two clients are not passed on, so clients that try one first fall back
to the relay or the upload.
We did not try these methods with the real clients yet. We tried them
only with scripted clients that do the same as libyahoo2. The BBS does
not pass on direct connections between two clients. Thus, clients that
try a direct connection first then use the relay or the upload.
## Chat rooms and conferences
A Yahoo chat room is a BBS [chat room](Chat-and-Paging): "Linux, FreeBSD,
Solaris:1" is the room `linux-freebsd-solari` (lower case, letters and
digits, the lobby number dropped, at most 20 characters), the same room
IRC calls `#linux-freebsd-solari`. The room browser lists the rooms in
use and the permanent ones.
A Yahoo chat room is a BBS [chat room](Chat-and-Paging). "Linux,
FreeBSD, Solaris:1" is the room `linux-freebsd-solari` (lower case,
letters and digits, without the lobby number, a maximum of 20
characters). IRC uses the name `#linux-freebsd-solari` for the same
room. The room browser lists the rooms in use and the permanent rooms.
A conference (Yahoo's invited group IM) is a BBS room of its own, `yc-`
and the conference's name. Yahoo users invited are asked by their
clients; anyone else invited gets a private message naming the room,
which they join from wherever they are. Anyone told the room's name can
join it.
A conference (the invited group IM of Yahoo) is a BBS room of its own,
`yc-` and the name of the conference. The clients of invited Yahoo users
ask them. Other invited users get a private message with the name of the
room. They can join it from their route. All users who know the name of
the room can join it.
+1 -1
View File
@@ -1 +1 @@
These pages live in the repository's [`docs/wiki`](https://github.com/D-Modem/bbs/tree/HEAD/docs/wiki): change them there, not here.
These pages are in the [`docs/wiki`](https://github.com/D-Modem/bbs/tree/HEAD/docs/wiki) folder of the repository. Change them there, not here.
+1 -1
View File
@@ -1,6 +1,6 @@
**[bbs](Home)**
**Getting going**
**Start here**
- [Building](Building)
- [Running](Running)
- [Administration](Administration)