Skip to content

Commit a509f41

Browse files
awehttamclaude
andcommitted
docs: document Caddy handle-block and BinkP schedule status fixes in UPGRADING_1.10.5
- Installation > Caddy Reverse Proxy Example: covers 98d7eaa, the /ws and /dosdoor proxies being shadowed by the surrounding handle blocks - Messaging/FTN > BinkP Schedule Status Panel: covers 99c208c, the status panel showing "next poll: Unknown" or returning HTTP 500 for schedules with irregular whitespace or malformed cron fields Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 439e21c commit a509f41

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

docs/UPGRADING_1.10.5.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Make sure you have a current backup of your database and files before upgrading.
1515
- [Messaging / FTN](#messaging--ftn)
1616
- [NNTP Server](#nntp-server)
1717
- [AreaFix Reply Sync](#areafix-reply-sync)
18+
- [BinkP Schedule Status Panel](#binkp-schedule-status-panel)
1819
- [Terminal Server](#terminal-server)
1920
- [Registration House Rules](#registration-house-rules)
2021
- [Full-Screen Editor Flicker](#full-screen-editor-flicker)
@@ -31,6 +32,8 @@ Make sure you have a current backup of your database and files before upgrading.
3132
- [Helper Function Loading](#helper-function-loading)
3233
- [Documentation](#documentation)
3334
- [Community Mods List](#community-mods-list)
35+
- [Installation](#installation)
36+
- [Caddy Reverse Proxy Example](#caddy-reverse-proxy-example)
3437
- [Upgrade Instructions](#upgrade-instructions)
3538
- [From Git](#from-git)
3639
- [Using the Installer](#using-the-installer)
@@ -59,6 +62,7 @@ Make sure you have a current backup of your database and files before upgrading.
5962
- **AreaFix reply sync:** inbound AreaFix / FileFix area-list replies received over an **authenticated (secure) BinkP session** are now synced into the local `echoareas` / `file_areas` tables automatically as packets are processed. Replies arriving over an insecure session, or whose packet origin does not match the configured uplink address, are ignored.
6063
- **AreaFix reply sync:** **Admin → AreaFix** gains a **Sync Areas to Local BBS** button on the latest-reply preview, backed by a new `POST /api/admin/areafix/sync-latest` endpoint, for manually syncing the most recent area list on demand.
6164
- **AreaFix reply sync:** box-art / decorative-line detection in the parser no longer discards area rows whose description contains accented UTF-8 characters.
65+
- **BinkP schedule status panel:** the BinkP status view in the admin **System Information** area no longer breaks when an uplink's poll schedule has extra or irregular whitespace between its cron fields. Such a schedule previously showed **next poll: Unknown**, and a badly-formed field (for example a stray `/` or an empty step) could make `GET /api/binkp/status` return HTTP 500 so the whole panel failed to load. The schedule string is now split the same way the rest of the scheduler splits it, so leading, trailing, and repeated whitespace are tolerated.
6266

6367
### Terminal Server
6468

@@ -89,6 +93,10 @@ Make sure you have a current backup of your database and files before upgrading.
8993

9094
- **Community mods list:** a new `docs/MODS.md` file is a curated list of third-party mods and extensions for BinktermPHP, linked from the Customization section of the README. It seeds with two mods by TheWebExpert: the Door Button Filter Mod (category filter bar on `/games`) and the Echo Area Button Mod (network-filter and quick-action bar on `/echolist`). Contributors add their own mods by pull request. Listed mods are maintained by their individual authors and have not necessarily been reviewed or tested by the BinktermPHP maintainer; review a mod's source before installing it.
9195

96+
### Installation
97+
98+
- **Caddy reverse proxy example:** the Caddy site block in `docs/INSTALL.md` now wraps the `/ws` (realtime WebSocket) and `/dosdoor` (DOS door bridge) proxies in their own `handle` blocks. In the previous example these were bare `reverse_proxy` directives; mixed in with the `handle` blocks used for the rest of the site they were shadowed by the catch-all handler, so WebSocket requests fell through to PHP and stalled while holding the per-user session lock, making every following page load hang for several seconds. If you copied the old block, update your `Caddyfile` to match.
99+
92100
---
93101

94102
## Web Interface
@@ -241,6 +249,16 @@ The endpoint finds the most recent incoming area-list reply from that uplink, pa
241249

242250
This change bumps the service-worker cache version. Users should hard-reload the admin interface, or clear the browser and service-worker cache, so the updated AreaFix page and its new button load.
243251

252+
### BinkP Schedule Status Panel
253+
254+
The admin **System Information** area shows a BinkP status panel, fed by `GET /api/binkp/status`, that lists each configured uplink with its poll schedule, last poll time, and computed next poll time. The next poll time is worked out by reading the uplink's `poll_schedule` — a five-field cron expression such as `0 */4 * * *` — and finding the next minute that matches.
255+
256+
The routine that computes the next poll time split the schedule on single spaces only. A schedule that is functionally correct but formatted with a tab, a double space, or a leading or trailing space between fields therefore produced the wrong number of parts and the next poll time could not be computed. On the panel this appeared as **next poll: Unknown**, even though the same schedule polled correctly, because every other part of the scheduler already tolerates that whitespace.
257+
258+
A separate consequence: a schedule field that is malformed rather than just oddly spaced — for example a bare `/`, or a step of zero like `*/0` — could raise a PHP error while the panel was being built. That error was not caught by the status route, so `GET /api/binkp/status` returned HTTP 500 and the whole panel failed to render.
259+
260+
The schedule string is now tokenised with the same whitespace-normalising split the rest of the scheduler uses, so irregular spacing between fields is accepted and the next poll time is computed for any schedule that the scheduler itself accepts. A schedule that was showing **Unknown**, or a panel that was failing to load with a 500, should display correctly after upgrading without any change to the schedule itself.
261+
244262
## Terminal Server
245263

246264
### Registration House Rules
@@ -354,6 +372,42 @@ Both use the `templates/custom/header.insert.twig` customization hook.
354372

355373
Contributors with a mod to share add a section to `docs/MODS.md` by pull request against the `claudesbbs` branch, following the existing entry format. Mods in the list are written and maintained by their individual authors and **have not necessarily been reviewed or tested by the BinktermPHP maintainer** — review a mod's source code before installing it on your system.
356374

375+
## Installation
376+
377+
### Caddy Reverse Proxy Example
378+
379+
The bare-metal install guide, `docs/INSTALL.md`, includes an example Caddy site block. That block uses `handle` blocks to route requests, and in the previous version the two supporting proxies were written as plain directives outside any `handle` block:
380+
381+
```caddyfile
382+
reverse_proxy /ws 127.0.0.1:6010 { ... }
383+
reverse_proxy /dosdoor 127.0.0.1:6001 { ... }
384+
```
385+
386+
In Caddy, a bare `reverse_proxy` with a path matcher and a `handle` block are different directive types, and when both appear in one site the `handle` blocks take over routing. The bare `/ws` and `/dosdoor` proxies were shadowed by the catch-all `handle` that forwards everything else to PHP. As a result:
387+
388+
- The realtime WebSocket connection (`/ws`, served by `scripts/realtime_server.php`) was sent into PHP instead of the WebSocket daemon. The request never completed, and it held the per-user PHP session lock while it hung, so every other request for that user — normal page loads — blocked for several seconds behind it.
389+
- The DOS door bridge (`/dosdoor`, served by the multiplexing server) was likewise routed to PHP and did not work.
390+
391+
The example now wraps both proxies in their own exact-match `handle` blocks so they are matched and short-circuited before the PHP fallback:
392+
393+
```caddyfile
394+
handle /ws {
395+
reverse_proxy 127.0.0.1:6010 {
396+
header_up Host {host}
397+
header_up X-Real-IP {remote_host}
398+
}
399+
}
400+
401+
handle /dosdoor {
402+
reverse_proxy 127.0.0.1:6001 {
403+
header_up Host {host}
404+
header_up X-Real-IP {remote_host}
405+
}
406+
}
407+
```
408+
409+
If you built your `Caddyfile` from the earlier example and see slow page loads or a non-working realtime connection, copy the updated `/ws` and `/dosdoor` blocks from `docs/INSTALL.md` and reload Caddy. Nginx and Apache examples in the guide are unaffected.
410+
357411
## Upgrade Instructions
358412

359413
### From Git

0 commit comments

Comments
 (0)