Every function and method, tests included, has a doc comment: what it
is or does, what it returns and anything a caller needs to know. Only
comments are added; gofmt split a few aligned blocks of one-line
functions once each had its own comment. The generated protobuf code
is left as protoc writes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Between vector graphics and blocks: the picture cut into character
cells, each one of the 3270's 7 colors (the color that, with black,
comes nearest its pels) and a symbol of its pels, error-diffused over
the whole picture with each pel black or its cell's color. The symbols
are loaded into the terminal's single-plane sets (LCIDs 0xC2 on) before
the screen, 190 a set, so the picture is as large as its cells fit in
the sets there are (PCOMM: 2 with vector graphics on, 380 cells); a
blank cell needs none, cells alike share one. A row's runs of a set and
a color are each a Set Attribute of both (go3270's AttributeOnly
CharSet).
A picture's Set Attributes lasted the rest of the screen's write, so the
caption and body after a block picture took its last color: the
attributes are set back after a picture (the character set too after
symbols). colorTerminal read the Color reply's pair count from the
wrong byte, so PCOMM (a 3278 by its type) was not taken for color.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
An image board's pictures (a post's thumbnail, the image whole) are now
drawn on a 3270 instead of only said in words:
- vector graphics (PCOMM): bitmaps a pel a pixel, error-diffused to the
terminal's own palette (PCOMM's 16 colors, from the Graphic Color
reply go3270 now asks for), overpainted (PCOMM's exclusive or does not
combine blue), cropped and split over segments by go3270's
ImagePictures; drawn after the screen over cells left empty, since a
character over a picture clears it in its cell
- blocks (x3270, any color 3270 with graphic escape): ▀ ▄ ▌ ▐ █ in the
7 colors, a cell two pixels by two, each cell the color and block
nearest its pixels, a run of a color one Set Attribute
and in words on the rest, as before, under the picture where there is
one. Pictures on/off (M, PF11) on the profile, kept as the text
terminals' preference is; the profile's terminal line says how they are
drawn. tn3270_vector is on by default now that PCOMM draws them.
go3270-sec: GraphicColors, DitherBitmaps, ImagePictures, the Query List.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Signed in on the BBS, Your profile's Sign-in code (C, PF10) gives a code
(ABCD-EFGH, 40 bits, no 0/O/1/I), good once for five minutes; a new one
ends the last. The forum's Sign In page takes the code alone; anywhere a
password is asked (web terminal, image boards, API, FTP), it serves once
for the password with the user's name.
Codes are kept in memory as their SHA-256, never logged; a wrong one is
a failed login (throttled, the hack log), a locked account's opens
nothing (BBS.authenticate: the same path as passwords). SSH keys are now
on the profile of accounts modemmenu made too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[modemmenu] auth_socket: the accounts modemmenu logs in (external, no
password here) log in any other way (telnet, SSH, TN3270, the web forum
and terminal, the API, FTP, NNTP, IRC) with their modemmenu password:
BBS.Authenticate asks modemmenu's [authd] socket, and modemmenu its
backends (users file, LDAP, SQL, PAM) as at its own prompt. Nothing of
the password is kept here.
An account with a password of its own here is never asked of modemmenu.
create_users (yes): a user modemmenu knows and the BBS does not gets an
external account at their first login, a name the BBS takes and the
name_deny_file allows. A wrong password counts as any failed login;
modemmenu not answering is trouble, not counted against the caller.
Connections and modems has the keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[general] user (and group): started as root, bbs serve reads the
configuration, binds every socket it listens on (the listeners, TCP and
unix; the HTTP API and metrics, FTP, NNTP, IRC, finger, gopher, binkp),
gives up root (setgroups to the user's groups, setgid, setuid) and
executes itself again, the same process (its PID, for systemd and
reload), the sockets handed down; each server's listen takes the one for
its address (internal/sockets). Nothing is written as root: database,
logs, host keys, backups and a unix socket without socket_group are the
user's.
Other commands as root give root up first, so the database stays the
user's (but check and config; backup restore puts things back as root
and gives them, but the configuration, to the user). System
configuration has Run as user and group.
TestRunAs (as root) serves a port under 1024 and a unix socket as
nobody, the same process through a reload.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The SSH listeners' host keys go into every backup (key.NAME), whatever
[backup] files says, and come back with a restore like the rest (what is
there renamed aside): a BBS put back on another machine answers with the
keys its callers' clients know.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
bbs backup makes one archive (bbs-YYYYMMDD-HHMMSS.tar.gz) of bbs.conf,
the database and the files' directories, while callers are on: the
database as a SQLite file whatever its engine, taken whole at one moment
(SQLite's by VACUUM INTO, a server's in one read-only repeatable-read
transaction: store.Snapshot). It is written beside its final name and
renamed when whole; past [backup] keep the oldest go.
[backup] says where (beside an SQLite database by default), when (at =
HH:MM, daily, in serve), how many, and whether the files go too; it is
live at a reload. bbs backup list, and bbs backup restore ARCHIVE -yes
with the BBS stopped: each thing put where this system's configuration
says, what is there renamed aside (.before-restore-STAMP), a server's
database copied into a new empty one; an archive whose names climb out
is refused before anything changes.
The configuration screens' Maintenance has Back up now, the backups
made, and [backup]'s keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The configuration screens are menus by what a sysop looks for: Board
(names, location, postal address, dial-in numbers, internet addresses,
what callers see, menus and prompts), System (database, log, file
locations, security, scheduled events, every section), Connections and
modems (modem lines, listeners, login limits, caller ID, GeoIP), Services
(telnet, TN3270, SSH, RLogin, finger, gopher, FTP, IRC, news, the web,
MRC, FidoNet, QWK networks, doors), Users and groups (accounts and
access levels) and Maintenance (disk space, what areas keep, old
messages taken out, the image boards' archive, backups). Running as
another user, PAM, LDAP and database and file backups are shown as not
available yet.
Nothing changes until F10 (or Save and exit): changed lines are marked
and counted; then the file is checked and written, the accounts' and
areas' changes made, and on a running BBS the live ones put in force.
F9 (or Quit without saving) leaves it all, after a yes.
view.Sheet is the full-screen page: drawn with the cursor keys on ANSI
terminals (the terminal now reads F1-F12), with fields and PF keys on a
3270, as numbered lines elsewhere. [general] gains postal_address,
phone and addresses, in the system info and as @POSTAL@, @PHONE@ and
@ADDRESSES@.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
bbs -config FILE config is screens on the local terminal for bbs.conf:
its sections and keys, each with the sample's comment on it, its default
and examples, and whether it takes effect at once or at a restart. The
same screens are the sysop's tools' Configuration (F), on text terminals
and 3270s. Keys are edited in place, unset, or taken from the sample's
examples; sections made (uncommented where the file has them commented
out), renamed and deleted (commented out). The file is checked as the
BBS would read it, written whole with its permissions and owner kept and
the old one as bbs.conf.bak, and not over a file changed since it was
read. config get/set/unset do a key at a time, for scripts.
internal/confedit edits the file as a sysop would by hand: every comment
kept, a new key below the sample's example of it. Its catalog is read
from bbs.conf.sample (embedded); a test keeps every key the loader reads
in the sample, which gained comments where keys had none.
SIGHUP (ExecReload in bbs.service.sample), or writing on the sysop's
screen, reads the file again and puts in force what may change while
callers are on: [general]'s names, texts, limits, timeouts, GeoIP and
levels, [level], [menu], [strings], [chan] (but dir) and the forum's
options; the rest is logged as waiting for a restart. A file the BBS
would not start with changes nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The BBS, image boards and forum read their settings through an atomic
snapshot (Conf, conf, opts), so a new configuration can be swapped in
while callers are on. Menus and [strings] swap the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
As 4chan's, a thread pruned off a board's last page is archived, not
deleted: off the board's pages and catalog, whole, its files kept,
read-only. No one replies to it, staff neither (store.AddPost refuses
too, for a reply already on its way); its posts are not deleted by
their passwords (staff still can). Its page says it is archived in
place of the form and its first post wears a badge.
- /chan/b/archive lists a board's archived threads, the last first;
/chan/b/archive.json is 4chan's (the numbers, oldest first); an
archived thread's JSON has archived and archived_on, and boards.json
is_archived
- [chan] archive_days (3; 0: always) is how long they stay: then they
are deleted with their files, looked to when a thread is made and
when the archive or the thread is looked at
- a board's archive setting (bbs chan board set DIR archive no) prunes
as before, deleting at once; boards have one by default, as do
those of an older database
- the terminals: a board's thread list has Archive (A), to read them;
archived threads offer no reply
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A board takes Flash when its files say swf or flv (bbs chan board set f
files swf,flv), as 4chan's /f/ did, and [chan] ruffle names Ruffle's
self-hosted package (make ruffle fetches it from npm into ruffle/).
- SWF: FWS and CWS read for the stage, frames, rate and sounds, the
tags walked as they unpack with nothing kept (a zlib bomb costs no
memory and is refused); ZWS (LZMA) taken as 550x400 with sound
- FLV: onMetaData (AMF0) for size and length, the tags for sound and
the video codec (Sorenson, Screen, VP6, VP6 alpha, H.264); ffmpeg
thumbnails it, a movie gets a card
- sound needs the board's sound; an FLV is held to max_video
Clicking a Flash thumbnail plays it in a sandboxed frame (/chan/flash:
allow-scripts alone, by its CSP and the frame's attribute): no origin,
no cookies, nothing of the page. The page fetches the file with its own
cookies and hands the bytes over; Ruffle runs with networking, scripting
and links off. Ruffle 0.7.1 does not play a standalone FLV, so the BBS
makes a small AVM1 movie of its own (/chan/flvplayer.swf: NetStream
into a Video of the FLV's size) that plays it from a blob of the frame.
Ruffle's files are served at /chan/ruffle/ with CORS open (the frame
has no origin), only the package's .js, .wasm and .map.
Played in Chromium with Ruffle 0.7.1: a movie, and a Sorenson FLV with
sound through the player; both frames of origin "null", cookies
refused, no CSP violations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A board takes files besides images when its file types say so (bbs chan
board set DIR files webm,mp4,pdf; sound yes), as 4chan's take WebM and
/po/ PDFs. Each file is known by its bytes and read before it is kept:
- WebM: its EBML walked for the doc type (webm, not any Matroska), the
tracks' codecs (VP8, VP9, AV1; Vorbis, Opus), size and length
- MP4: its boxes walked for the movie header and tracks (H.264, AV1,
VP9; AAC, Opus); HEVC and the like refused, as browsers do not all
play them
- PDF: whole (%PDF- to %%EOF), its pages counted and first page's size
found where its objects are not compressed
Videos are at most 4096 pixels a side and [chan] max_video seconds long
(120; one that does not say is refused while there is a limit), and
silent unless the board takes sound. Thumbnails come from [chan]
ffmpeg (the first frame, the container named to it) and pdftoppm (the
first page), else a card saying what the file is.
In the page a video's thumbnail plays it in place with [Close]; a PDF's
opens it in a tab, served without the boards' CSP (a viewer will not
run under it) and nosniff. The post form lists what the board takes;
posts say a video's length, a PDF's pages; the JSON has 4chan's
webm_audio and max_webm_duration, and duration_ms, page_count,
file_types. Terminals show their thumbnails.
Fuzzing the readers found an EBML element head read past its parent
(a panic); fixed, the input kept as a regression case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
TestDoorSession failed about once in 100-200 runs, two ways:
- "fork/exec door.sh: permission denied": the server made unix sockets
under a umask of 0177, and the umask is the whole process's. A file
made by another goroutine meanwhile lost its mode: here the test's
door script, written as the server started, came out 0600. In the
BBS the same could befall anything made while a listener started.
The socket is now made in a private directory beside its place, given
its mode and group there, then renamed into place: still no moment
when others could connect, and no umask touched. Closing the
listener removes the socket.
- the door's last output lost ("Bye from the door" never came): a door
without a pty wrote to cmd.StdoutPipe, which Wait closes as soon as
the door exits, while the reader may not have drained it. The door
now writes to a pipe of the runner's own, read to its end.
TestOutputAfterExit (door) lost 28-48 KB of a door's last output on
every run before; TestSocketLeavesUmask (server) saw 0755 files made
0600 within a few dozen tries. Both pass now, and TestDoorSession
passed 500 runs in a row under -race.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- the reader gives an address's region (the first subdivision) and city
where the database has them: GeoLite2/GeoIP2 City and DB-IP's City
Lite as MaxMind DBs; DB-IP's city CSV and IP2Location LITE DB3 and up
as CSVs (now read with encoding/csv, quoted fields and all)
- CSVs stream in (gzipped or not) and are kept small: each place once,
each range by its start, IPv4 apart in 4 bytes; DB-IP's city list,
7.8 million ranges, in 135 MB
- geoip.File reads the first time at once and later changes in the
background, the old reader answering meanwhile; the server reads the
database when it starts; the image boards share the BBS's when the
file is the same
- bbs.Place has the city; 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
- checked against MaxMind's reader on DB-IP's city database of October
2026 in both formats: the same country, region and city for 200,000
addresses
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
NANPA's site was out of reach, so the hand-made tables were checked
against Google's libphonenumber (its data of 2026-10-08, kept up from
NANPA and the national regulators) and then replaced by it:
- the area-code check found 273 (Quebec) and 633 (Canadian personal)
missing, and nine US codes it has nowhere (357, 436, 457, 483, 624,
679, 837, 861, 924): those are gone with the old tables
- internal/phone/gen makes metadata.go (every territory's calling code,
international and trunk prefixes, shared-code rules, number kinds and
formats) and places.gz (269,198 prefixes to places, 151 calling codes)
from a libphonenumber checkout: make phone-data
- Parse follows libphonenumber's rules: national prefixes taken off and
transformed, shared codes told apart by leading digits and plans,
the kind of number (fixed line, mobile, toll-free...), the place to
the exchange where known, and numbers written as each country does
(+44 20 7123 4567, +81 3-1234-5678)
- checked against nyaruka/phonenumbers on 34,362 numbers: the same
country, kind and place for all; formats differ only for the Faroes,
where its bundled data is older
- the tables load when first wanted (about 6 MB); the sysop's node list
says which callers are on mobiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- internal/phone reads modem caller IDs with its own tables: the ITU's
country calling codes (shared ones told apart), the NANP's area codes
by state and province, toll-free and other services, and how each
country dials, so national numbers read as [general] phone_country
- [general] geoip (with geoip_credit) is the BBS's country database;
[chan] geoip falls back to it. geoip.File keeps a database file up
to date for both
- bbs.Locate and Node.Place: a caller's place by caller ID, else by
address; the connect log, who's online (the country), the sysop's node
list (number and state) and the API's /who show it
- messages keep the poster's country (messages.country); the web forum
shows its flag by the poster's name in every theme and on Online
Users, with the database's credit at the foot ([http] forum_flags)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Checked on DB-IP's IP to Country Lite (October 2026) against MaxMind's
own reader: 200,000 addresses, IPv4 and IPv6, every country and name
alike from the .mmdb (plain or gzipped). From its CSV: ZZ (and XX, --)
is no country; IPv6 that carries an IPv4 address (6to4, Teredo) is
looked up by it, as a MaxMind DB's tree does; plainer names for the
countries ISO names formally (Russia, DR Congo, Vatican City...).
[chan] geoip_credit and geoip_credit_url put the credit the database's
licence asks for (DB-IP's CC BY 4.0, GeoLite2's) at each page's foot.
An ID's + is escaped in its attribute: the test reads the page as a
browser does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A board with ids gives each poster an ID in each thread, as 4chan's: a
keyed hash of their address, the board and the thread, the same all
through a thread, another in the next. Each has its colour; hovering
counts its posts, clicking marks them.
A board with flags shows each poster's country's flag (an emoji, its
name on hovering), from [chan] geoip: a country database read by the
new internal/geoip, which reads MaxMind DB files (GeoLite2, DB-IP
Lite, IPinfo's...; tested on files made by MaxMind's own writer in
each record size, and broken ones) and CSVs of ranges (DB-IP's,
IP2Location LITE's), plain or gzipped, read again when the file
changes. Country names from ISO 3166.
Both are kept with each post, shown on the terminals by the name, and
given in the JSON as 4chan's id, country and country_name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[chan] captcha_length (4 to 10), captcha_level (easy, normal, hard:
how far the letters turn and wave, the lines and specks) and
captcha_lifetime; options = yes|no for the post form's Options line
(sage, nonoko: without it posts bump, on the web and the terminals).
A board's own captcha and options (yes, no, default) say otherwise
than [chan]'s.
A board's login is now no, post (only users post, as before; yes
still means it) or all: only the BBS's users see the board, its pages
redirecting others to sign in, its JSON refused, its images not
there, its front-page images left out and the board marked (members).
boards.json says login and captcha.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Posting without signing in takes a captcha, drawn here: crooked
letters over noise, its answer sealed in its token (AES-GCM with the
boards' secret), good once and for ten minutes, a new one by script.
[chan] captcha = yes (the default) or no. Signed-in users and the
terminals' callers post without one.
Posts by signed-in users are marked as a member's (a check by the
name, member in the JSON, [member] on the terminals); ticking Sign it
as NAME posts under the account's own name, which no one else can use
(account in the JSON, [signed] on the terminals). forced_anon boards
mark but never sign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The text BBS and 3270s have the image boards (B on the main menu, or a
menu's boards): the boards, threads by bump order, posts read as
messages with who posted, the thread, and the posts that quote them.
Callers post as the web's posters do (names, tripcodes, sage, staff's
capcodes), through the same checks: posting is now Submit, shared by
the web's form and bbs.ImageBoards. A thread's image comes by the
terminal's transfer protocol.
Pictures (view.Picture, on messages and panels) are shown as well as
the terminal can: kitty's graphics protocol (kitty, Ghostty), sixel,
iTerm2's inline images (iTerm2, mintty), or coloured half blocks in 256
colours on other UTF-8 terminals; described in words elsewhere and on
3270s. V shows the image whole; pictures on/off is on the profile. The
web terminal has xterm.js's image addon, so sixel there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Boards by directory with anonymous posts and images: thumbnails made
in Go (JPEG, PNG, GIF, WebP, told by their bytes), JPEG metadata
stripped, duplicates refused by MD5. Threads bump until a bump limit,
sage, image limits, pruning off the last page, stickies and closed
threads. Tripcodes are 2channel's (a DES crypt(3) of our own, checked
against libc's) and secure ones; greentext, >>quotes with backlinks,
cross-board links, spoilers and code. Index, thread pages, catalog,
password deletion, reports; staff (sysops, a board's mods) delete,
ban by address or range, and post with capcodes. Yotsuba, Yotsuba B,
Futaba, Burichan, Photon and Tomorrow styles, and 4chan's read-only
JSON. bbs chan board|ban on the command line; [chan] in bbs.conf.
[http] trusted_proxies: requests from those take their caller's
address from X-Forwarded-For (Forwarded, X-Real-IP), the last hop that
is not a trusted proxy, for rate limits, logs, the deny lists and the
image boards' bans; a proxy's connections are not held to max_per_ip.
secure_cookies for TLS at the proxy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A link with areafix = yes manages what it has here: netmail to AreaFix
(AreaMgr) or FileFix (FileMgr, AllFix) with its areafix_password as the
subject is answered, not delivered: +TAG, -TAG, patterns (+FSX_*), -ALL,
%LIST, %QUERY, %UNLINKED, %HELP, the answer back by netmail. Such a
link carries the echoes it has linked (within echoes), kept in the
database; others carry their echoes as before. Requests from systems
that are not links are dropped.
bbs fido areafix|filefix LINK COMMAND... asks a link's robot (our hub's),
with the password we share; bbs fido subs, link, unlink, filelink and
fileunlink show and set a link's by hand. create = yes makes the area
for an echo a link sends that is not here (named by its tag). The
store gains the subscriptions, and file areas' file echo tags and files'
origins, for TIC.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[fido] nodelist = one or more files or patterns (NODELIST.*): the newest
of each is read, as it is or out of an archive (ZIP, ARC, ARJ, LHA),
the lists merged, and read again when a newer one comes. FTS-5000:
zones, regions, hosts, hubs, Pvt, Hold and Down nodes, flags.
- Netmail is checked before it is written: to a node the list lacks
(where it has the zone) or has down it is refused, to links always
taken; when it goes, the caller is told whose system it reached.
- In the inbox, N finds systems by name, place, sysop or address, and
one picked is written to (its sysop, by netmail).
- A link with host = nodelist is called where its IBN (or INA) flag says.
- bbs fido node ADDRESS and bbs fido nodes WORDS look in it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/archive reads ZIP, ARC (stored, packed, squeezed, crunched,
squashed), ARJ (methods 0 to 4) and LHA (-lh0-, -lh4- to -lh7-, header
levels 0 to 2) in Go, with no other programs, and writes ARC, ARJ and
LHA stored. Sizes are checked before memory is given to them and every
entry against its CRC; it was fuzzed, and stressed with 350,000 damaged
archives (none slower than 30 ms). The test archives were made by the
real programs (arc 5.21q, ARJ32 3.10, jlha), and what is written here
passes their own tests.
Bundles from links are tossed whatever their format (known by their
first bytes, not their names); packer = arc, arj or lha bundles in those
(stored). A test packs packets with the real programs, compressing,
where they are installed. The file base lists and takes FILE_ID.DIZ
from ARC, ARJ and LHA archives too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A menu's title and labels now carry their tags, marked, to the front
ends as its prompt does. A text terminal shows them as its escape
sequences, each label fitted to its column by what shows (screens.Fit:
marks take no width) and ending plain so its colors stay in it. A 3270
shows a label's colors as a .3270 line's (spanFields, shared with
lineFields), and its title plain; a RIP terminal's buttons and Who's
online get them plain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Text screens (.asc, .txt), the [strings] and a menu's prompt take tags
such as {clear}, {pause}, {red}, {on blue}, {bright}, {underline} and
{reset}, as .3270 files take {color}: ANSI escape sequences on an ANSI
terminal, bold alone on one without color, a Commodore's colors through
the PETSCII translator, the clears and cursor moves on a VT52, nothing
on a plain terminal. A 3270 shows a text screen's color tags as its
colors and drops the rest, and .3270 files take the text terminals'
names (magenta, cyan, reset) and {clear}/{pause} too.
Only the sysop's text has tags: values of @-codes (a caller's name) are
never read for them. Strings carry their tags to the terminal as
control-character marks, which values cannot contain, and are dropped
wherever they cannot be shown (Who's online, the 3270). .3270 lines now
take their colors from those marks as well, so a caller named "{red}"
no longer colors a 3270 screen.
Text screens keep their lines' indentation (it was trimmed), and a line
holding only a clear or a pause leaves no blank line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The forum can wear more than one look. A theme is a stylesheet and,
in themes/NAME/, templates of its own for the pages it lays out
differently, parsed over the default's.
- ipb2: a board of the mid-2000s in the manner of Invision Power Board
2's default skin: white page, navy-outlined boxes, gradient title and
sub-title bars, pale blue rows, Logged in as / Welcome Guest bars,
Last Post Info, topic folders, post tables with Member No. and Top,
quote boxes, big blue buttons, Fast Reply, the footer bar. Its own
CSS and templates; no code or images taken from IPB.
- ipb3: the existing look (its stylesheet now ipb3.css)
- a theme chooser at the foot of every page, for guests too, kept in a
cookie; [http] forum_theme sets the forum's own, checked by bbs check
- docs: Web-Forum themes, configuration, development
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The HTTP API's server serves /forum/ (and / when it is on): the areas as
categories of forums, topics and posts with their authors beside them,
laid out in the manner of Invision Power Board 3's default skin with CSS
of its own (no code or assets taken from it, no scripts on the pages).
- store: messages carry their topic (thread), set on posting, found for
messages from before, mended when a topic's first post or a reply's
parent goes; per-user topic read marks; topic lists and counts
- forum: board index with groups, statistics and who's online; area
topic lists with unread marks and pages; topics with quotes, likes
(the BBS's votes), polls, deleting, replies; new topics with polls and
aliases; profiles, search, who's online, login and sign-up
- logins are the API's session tokens in an HttpOnly, SameSite cookie;
every logged-in form carries a CSRF token; strict CSP, no framing
- [http] forum and forum_guests settings
- bbs.WrapBody: text typed in paragraphs (the forum, the API's posts and
mail) wrapped to the terminals' 79 columns instead of cut, quotes
carried onto wrapped lines
- docs: Web-Forum wiki page, configuration, HTTP API, development
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/mrc joins the BBS to MRC as its own connector: one connection
to the MRC server ([mrc]: address, TLS) carries all its users. The
chat rooms beginning mrc- are MRC's (mrc-lobby is its lobby), so
callers on terminals, 3270s, the web and IRC (#mrc-lobby) chat with
other BBSes there under their names.
The protocol is as Synchronet's mrc-connector.js and mrc-session.js
speak it: the SYSTEM~PLATFORM handshake, INFO, IMALIVE and
CAPABILITIES; IMALIVE to the server's PING; each user's IAMHERE every
minute, NEWROOM:old:new, arrival and leaving notices, LOGOFF; lines as
<name> text and actions; Mystic's pipe colors taken out of what comes.
!COMMAND in a room goes to the MRC server, its answer to the asker
alone; private messages likewise. A dropped line is retried, those
here put back. [mrc] require limits who may go in.
The chat hub gains a Relay: told of joins, leaves and lines in the
rooms it carries, giving them what comes (RelayEvent, RelayTo). On
IRC, MRC's users show as nick_Site!mrc@site, and room notices go to
the channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A door may be elsewhere ([door NAME] type = telnet, rlogin, bbslink or
doorparty): the caller's line is joined to it over the network, with
the same time limit, idle time, access and CP437 translation as a door
run here (Door.Run's bridge now drives either).
- telnet: the server's negotiation answered (a binary ANSI terminal of
the caller's size), none of it shown to the caller; IACs doubled
- rlogin: RFC 1282's start ({user} and the rest filled in)
- bbslink: a token from BBSLink's web server, authenticated with the
BBS's codes (MD5s with the token), then telnet to games.bbslink.net
- doorparty: an SSH tunnel with DoorParty's account (no connector
needed), then RLogin through it as [TAG]user with the door's code;
host_key pins the server's key, else each call logs it
The protocols are as Synchronet's and ENiGMA's modules use them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
/msg BBSServ (or /BS) INFO shows the account: level, location, alias,
signature, settings, unread mail, keys, tokens, the new scan. SET
changes the profile's fields (location, about, alias, signature) and
the terminal and menu settings, with the BBS's own checks; PASSWD the
password; SCAN the areas of the new scan; KEYS lists, adds (with the
password) and deletes SSH keys; TOKENS lists and revokes API tokens.
Its framework (command table, parameters, HELP, CTCP) is adapted from
ergo's services, under its MIT license. The bot's nick is [irc]
service (default BBSServ); it answers WHOIS and ISON.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/ircd serves IRC ([irc]: plain and TLS listeners, limits at
once and per address, the deny list and bans). Users log in with
their BBS names and passwords, by SASL PLAIN or PASS name:password,
throttled and hack-logged like any login; their nicks are their names.
Each connection is a node (via irc): in who's online, reached by node
messages, thrown off by the sysop.
#ROOM is the chat room ROOM: IRC clients talk with callers on
terminals, the web and the API. PRIVMSG to a nick is a node message;
/me is an emote; pages, mail and notices come as NOTICEs, and a sysop
answers a page by joining #sysop-N. NAMES, WHO, WHOIS, LIST, ISON,
USERHOST, MOTD, LUSERS; IRCv3 sasl, server-time (history replayed on
join with its times), echo-message, multi-prefix, userhost-in-names.
The protocol's parts are ergo's: messages read and written by its
irc-go library (ircmsg, ircreader, ircfmt), the numerics and the
ISUPPORT list taken from its source under the MIT license
(internal/ircd/LICENSE.ergo). A node may now be in several rooms at
once (JoinAlso, SayIn, Part) for IRC's channels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
As a hub: an account flagged qwk_node (bbs user qwknode NAME, or the
API's qwk_node) is another BBS's. What its REPs bring is posted under
its writers' names, with its access checked, and its packets leave out
what came from it.
As a node: [qwknet NAME] calls the hub by FTP (FTPS explicit or
implicit) every so often, or on bbs qwknet call and POST
/api/v1/admin/qwknet/call. It puts a REP of what was written here in
the network's areas since the last call (nothing from before joining,
nothing that came by a network or peer), then takes the hub's packet
and posts it in the areas of its conferences (CONFERENCE = AREA).
Messages are known by conference and number (qwk_msgs), so nothing
comes twice and answers keep their threads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
internal/qwk reads and writes QWK packets and REPs: MESSAGES.DAT's
blocks, CONTROL.DAT, conference and personal indexes (MBF floats),
QWKE kludges for long names and subjects, CP437 text.
A caller's packet holds their unread mail (conference 0) and the new
messages of the areas in their new scan (an area's ID its conference);
they count as read only once the packet has gone. A REP's messages are
posted and mailed as the caller, with their access checked; one brought
twice posts once (qwk_seen, kept 90 days). BBSID: qwk_id, or made of
the name.
Offline mail is O on the main menu (qwk in the sysop's menus): by
X/Y/ZMODEM or Kermit on the text BBS, IND$FILE GET and PUT on a 3270,
/qwk over FTP, and GET /api/v1/qwk, POST /api/v1/qwk/rep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
For every front end (internal/app), the API and the CLI:
- Threads: from a message, the one it answers (O, PF2) and its whole
thread (T, PF6), replies under what they answer; GET
/messages/{id}/thread.
- Votes: up, down or none on a message (V, PF1), shown by its number;
POST /messages/{id}/vote.
- Polls: a question and 2 to 10 answers posted in an area (L, PF9),
answered (A, PF12) and shown with each answer's share; POST with
"poll", POST /messages/{id}/answer.
- Aliases: a user's alias (checked like a new name, no one's name or
alias) posted under in areas that allow it; the message's From is the
alias everywhere, newsgroup articles included (they used the real
name), while the sysop keeps whose it is.
- Signatures: up to three lines under posts and mail written on the BBS.
- Groups: areas listed by group, with a Group column.
- Retention: an area keeps its newest N messages and/or those of the
last D days, purged hourly and by bbs area purge.
Tested on SQLite, PostgreSQL, MySQL and MariaDB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A sysop's main menu has * (and custom menus a sysop action), on every
terminal:
- Watch a node: what a text caller is sent, as it is sent (the text
terminal's connection echoes to bbs.Node.Echo; a slow watcher misses
some, never slows the caller). A key stops; the caller leaving ends
it. Text terminals only.
- Chat with a node: the caller is told and taken into a private chat
(their page's room) at their next menu; the sysop waits there.
- Kick a node.
- Users: level, flags, lock, sysop rights, a new password (not one's
own lock or rights).
- Statistics: totals, and calls, new users, posts and uploads for each
of the last 14 days as bars.
- The bans (lifted by number) and the hack log.
- Scheduled events ([event NAME]: a program run without a shell, daily
at a time or every N minutes, with a timeout; internal/events): when
they run next, the last run's end and output, run now.
- Available: whether pages reach the sysop; when not, a caller who pages
may leave a message.
The API: GET /admin/events, POST /admin/events/{name}/run, PUT
/admin/available. Sysop-Tools is the wiki page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- Last callers (L, and a callers menu action): each login is recorded
(calls: the newest 10000 kept); GET /api/v1/callers.
- Feedback to the sysop (K, a feedback action): mail any caller may
send, whatever their level allows.
- The user list picks a user: their details (a sysop sees their access
and files too), and mail to them from there.
- A line about oneself, on the profile (Y; - clears it) and PATCH /me's
about, shown with one's details.
- Expert menus (the expert setting, X on a text terminal's profile): a
menu is its prompt, "Command (? for the menu): ", and ? shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[security] in bbs.conf (internal/guard):
- deny_file: addresses and networks (IPv4, IPv6, CIDR) whose
connections every service closes at once: the terminal listeners and
SSH, FTP, NNTP, the HTTP API, finger, gopher and binkp. Read again
when it changes; bbs check warns of bad lines. Unix-socket callers
(modem servers, menus) are never refused.
- ban_minutes: an address the login throttle turns away is banned from
every service for that long. The API lists bans and lifts them.
- name_deny_file: name patterns (* wildcards, any case) no new account,
nor one an upstream menu makes, may take; the text BBS says so as the
name is typed.
- hack_log: failed logins and the names tried, locked accounts,
throttles, bans, refused connections and names, one a line; the API
shows its end.
A telnet or raw listener with tls_cert and tls_key is telnet over TLS
(1.2 or later; port 992), with 15 seconds for the handshake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
A script (scripts_dir/NAME.js, run by a menu's script:NAME, and logon.js
after each login) draws the BBS's shared screens through ui (menus,
tables, forms, panels, messages, the editor, confirmations), so one
script works on text, RIP and 3270 terminals. It acts as its caller,
with their access: msg (areas, messages, posting, mail), node (who's
online, node messages, its activity), user, bbs; and keeps JSON values
in data, for everyone or (data.user) for the caller, in the database
(script_data).
goja runs it in strict mode, with no files, network or processes. A
watchdog stops a script that computes more than two seconds between
screens (the caller's time at a screen is not counted); the caller
hanging up ends a script whatever it catches; failures are logged and
told (to a sysop, with why). Scripts are compiled once, again when
changed; bbs check refuses scripts that do not compile and menus naming
missing ones.
goja is pinned to its June 2026 commit (the last that builds with Go
1.24; it is changing quickly now).
scripts.sample has one-liners and a poll; both are tested, the
one-liners on a text terminal and on a 3270 (s3270). That test found
3270 forms broken since the shared screens: the input field began
under its label's last character, whose attribute byte erased it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
- FILE_ID.DIZ: an archive uploaded by any way (the BBS, IND$FILE, FTP,
the API, the CLI) is described by its DIZ, kept as the file's longer
description (CP437 decoded, colors and control characters out, at
most 20 lines); its first line that says something is the description
unless the uploader gave one.
- Archives: what is in a ZIP, tar or tar.gz, from a file's details (V,
PF6) and GET /files/{id}/listing.
- New files since the caller's last call (N, PF5) and finding files by
name and descriptions (F, PF10), across the areas they may see; the
API's GET /files?since= and ?q=.
- A batch: files tagged (T, by numbers such as 1 3 5-7, or from a
file's details) download together by YMODEM, ZMODEM or Kermit; a file
counts once the protocol has gone on past it. Frontend.Download takes
a list of files.
- Ratios: [level] ratio and ratio_free (files downloadable for each
upload, and before the ratio counts), checked with the day's limit for
a whole batch. Users' lifetime downloads and uploads are counted.
The store gains a {plain} token: PostgreSQL's LIKE refuses the
case-insensitive collation of {name} columns. Tested on SQLite,
PostgreSQL, MySQL and MariaDB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
In the message areas, for every front end (internal/app):
- Scan setup (S, PF11): which areas the new scan goes through, kept per
user (scan_off: the areas left out; all are in until taken out).
- To you (T, PF4): the newest 100 messages addressed to the caller, in
any case, in the areas they read, unread ones marked.
- Find (F, PF10): messages whose subject, text or author has the words,
in any case, newest first; LIKE's wildcards are taken as text.
Reading what these found leaves the areas' last-read points as they
were. A 3270's key line closes up when a screen has many actions.
Tested through internal/app and in the store on SQLite, PostgreSQL,
MySQL and MariaDB. Message-Areas is the callers' wiki page for the
areas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Posts and mail on an ANSI terminal (40x12 or more, not a VT52 or a
Commodore) are written on the whole screen: the cursor and editing keys
(Term.EditKey reads them now, where other prompts still drop them),
words wrapping as typed, Backspace and Delete joining lines, ^Y
deleting one, ^Z (or /S on a line) saving, ^X giving up. A reply's
quote is no longer put in the body to cut: ^Q opens a window of the
message replied to, and Enter takes a line from it. Messages from
other nodes wait until the editor is left.
view.Draft gains Quote; the line editor and the 3270's editor begin the
body with it, as before. The profile switches between the full-screen
and line editors (kept as the editor setting).
The editor's text is its own type, tested by itself; an SSH caller
posts, replies quoting and switches editors. Writing-Messages is the
wiki page for the editors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
What a caller switches on their profile (ANSI, UTF-8, sixel, RIP, a
Commodore's width) is kept with their account as settings (users.prefs,
"key=value" pairs) and applied after the next login: ANSI and UTF-8 as
set, sixel and RIP kept off when turned off and on only where the
terminal has them. An editor setting (full or line) is there for the
full-screen editor.
The API shows them at GET /me and changes them with PATCH /me ("":
forgets one); unknown settings and values are refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
The screens after the login (menus, message areas, reading and
writing, mail, file areas, who's online, the user list, system info,
the profile and SSH keys, validation, paging the sysop) were written
twice, once for text terminals and once for 3270s. They are now
written once in internal/app, as descriptions in internal/view's terms
(menus, tables, messages, forms, panels, drafts), and each front end
draws them its own way: prompts and keys a page at a time (RIP buttons
for menus) on a text terminal, fields and PF keys on a 3270.
What only a front end can do stays with it, behind app.Frontend: the
logins, display files, chat, doors, transfers (protocols, or IND$FILE),
the terminal's line on the profile and the goodbye.
The 3270 gains what it lacked: the main menu by letter like the text
BBS's, a new scan, messages to other nodes from who's online,
validation, SSH keys, editing and removing files, paging with a
message left when the sysop is away. The text prompts are as before.
Tests: internal/app driven by a scripted front end; the column layout
and text key labels; a 3270 (s3270) through areas, posting, reading
and the profile, with a text caller reading its post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[general] database = takes SQLite's file as before, or a server's
address: postgres://... (pgx) or mysql://... / mysql:DSN
(go-sql-driver). The store's SQL is written once; internal/store's
dialect gives each engine its forms of what differs: ? placeholders
($1 for PostgreSQL), ids returned by RETURNING or LastInsertId, upserts
(ON DUPLICATE KEY UPDATE), INSERT OR IGNORE, GREATEST, booleans, unique
violations, column checks for migrations, indexes. The schema is one
list with types per engine: names match in any case (NOCASE, an ICU
collation made on PostgreSQL, utf8mb4_0900_as_ci), MySQL keeps indexed
text in VARCHARs and connects with the SQL mode the store wants (ANSI
quotes for "read" and "key", strict, rows matched not changed).
Existing SQLite databases are kept as they are.
bbs db copy DATABASE copies every table into a new database of any
engine, keeping ids (PostgreSQL's sequences set after). Logs and bbs
check never show a server's password.
Under go test, BBS_TEST_DATABASE puts every test's store on a
PostgreSQL or MySQL server (a schema or database each, dropped after):
the whole suite passes on PostgreSQL 16 and MySQL 8.4 as on SQLite.
The store's own tests check what the engines do differently, and
copying from SQLite into each.
Also: the FTP tests' readiness probe now waits to be counted out, so the
per-address limit test no longer fails at random.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Users have a level (0-255) and flags (A-Z). [level N] sections say what
a range of levels may do: time online a day (warned at 5 and 1 minutes,
hung up at the end; doors' limits cut to what is left), downloads a day
(counted by every way: the BBS, 3270, FTP, the API), and whether they
may post, mail (else only the sysop), chat, page, download, upload and
open doors.
Requirements ("30 F !X", "sysop") are put on message areas (reading and
posting), file areas (downloading and uploading), doors, menus and menu
items ("x = menu:extras Extras | 50 X"). They are checked in the 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 number or
Message-ID.
New users start at new_user_level and are told they wait; the sysop
validates them on the BBS (V on the main menu), by bbs user
waiting/validate/level/flags, or by PATCH /api/v1/admin/users. Users
see their access in the profile and /api/v1/me; no one changes their
own. Drop files carry the caller's level.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[http] serves /terminal (and / goes there): a page with xterm.js 5.5 and
its fit addon, built into the binary (MIT licensed, license included),
joined by a WebSocket (/terminal/ws, subprotocol bbs.terminal, binary
frames) to the text BBS, run in-process as for a telnet caller: a node
shown as "web terminal", the BBS's own login, ANSI and UTF-8, the size
the page fitted.
The page has a strict Content Security Policy (scripts only from the
BBS, no inline scripts, no framing); the WebSocket is taken only from
the BBS's own pages (or the cors origin), under the HTTP server's TLS,
connection and rate limits. terminal = no turns it off.
The WebSocket's own stream closes the connection when a read deadline
passes, which the text BBS uses for idle time and notices: the line
adapter SSH sessions had (reads with deadlines that only end the read)
now serves both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr