Harden generic installation and startup, preserve station settings and coalesce mail reads

This commit is contained in:
alberto committed 2026-10-16 21:03:18 +02:00
1 parent 3f6d35690b
commit 5358cad695
14 files changed
+398 -146

No files matched your search

+114 -77
View File
@@ -1,136 +1,173 @@
# BPQ Console
Pannello web per una stazione BPQ32, con dashboard, BBS, Winlink, chat, monitor e telemetria modem. Backend Node.js senza dipendenze esterne; interfaccia HTML/CSS/JavaScript. Il nominativo, gli alias, il locator e le porte sono letti dalla configurazione della stazione.
A local web dashboard for BPQ32: node status, BBS, Winlink, forwarding, chat, traffic monitor, contact journal, station map and an amber Telnet terminal. Callsigns, aliases, locator and ports come from your station configuration. Node.js backend with no external npm dependencies; HTML/CSS/JavaScript frontend.
## Requisiti
## Requirements
- Windows con PowerShell e Node.js 20 o successivo disponibile nel PATH.
- BPQ32 installato e già in esecuzione, con HTTPPORT configurata nel driver Telnet.
- Almeno un USER Telnet con ruolo sysop. Le credenziali rimangono in BPQ32.cfg.
- BPQMail per la BBS e Winlink; BPQChat e TCPPORT per la chat; FBBPORT per il monitor. Questi servizi sono opzionali.
- Windows and Windows PowerShell 5.1 or later.
- Node.js 20 or later. A portable `node.exe` can be selected with `-NodeExe`.
- BPQ32 installed and running, with `HTTPPORT` configured in its Telnet driver.
- A Telnet `USER` with the `sysop` role. The panel accepts the selected sysop account; its password stays in `BPQ32.cfg`.
- Optional: BPQMail for BBS/Winlink, BPQChat and `TCPPORT` for chat, `FBBPORT` for the monitor. The terminal only needs `TCPPORT`.
## Installazione
Service detection recognises the `BBS` and `CHAT` application command names, case-insensitively. Those applications must actually be running to use their pages. The installer does not install BPQ, configure a modem, change radio frequencies or create forwarding partners.
Scaricare o clonare il repository, aprire PowerShell nella cartella del progetto e avviare BPQ. Verificare prima il rilevamento senza modificare nulla:
## Install
Clone or download and extract the project into a writable folder. Start BPQ first. Open PowerShell in the project folder and run a read-only check:
```powershell
.\Install.ps1 -CheckOnly
```
L'installer cerca BPQ32.cfg in %APPDATA%\BPQ32 e nelle cartelle dei processi BPQ attivi. Verifica che l'interfaccia HTTP BPQ risponda e mostra porte, applicazioni e profili forwarding rilevati. Se BPQ non risponde, interrompe l'installazione senza creare la configurazione.
If your normal PowerShell policy blocks local scripts, after reviewing the files you can run them with a policy limited to that process:
Installazione e avvio del pannello:
```powershell
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -File .\Install.ps1 -CheckOnly
```
This does not change your user or machine execution policy. Downloaded files may still require unblocking after review; organisation Group Policy remains authoritative.
Install and start:
```powershell
.\Install.ps1
```
Aprire http://127.0.0.1:8090 e accedere con l'utente Telnet sysop selezionato. Il primo sysop è scelto automaticamente; usare -SysopUser quando ce ne sono diversi. Non servono npm install o una compilazione.
Open **http://127.0.0.1:8090** and sign in with the selected BPQ Telnet sysop account. No `npm install` or build step is required.
Per percorsi o porte diversi e per selezionare il modem e il profilo BBS:
Detection uses an explicit `-BpqRoot`, `BPQ_ROOT`, the previously saved data folder, `%APPDATA%\BPQ32`, or the folders of running BPQ processes. The HTTP check must identify BPQ before any configuration is written. `-CheckOnly` never saves configuration, starts the panel, registers a task or changes the firewall, even if other switches are present.
Explicit settings:
```powershell
.\Install.ps1 -BpqRoot 'D:\BPQ' -Port 8090 -HttpPort 8080 -RadioPort 3 -SysopUser 'sysop' -ForwardPeer 'N1TEST'
.\Install.ps1 -BpqRoot 'D:\Radio\BPQ data' -Port 8095 -HttpPort 8080 -RadioPort 3 -SysopUser 'admin' -ForwardPeer 'N1TEST'
```
-RadioPort seleziona una porta modem rilevata; in assenza dell'opzione viene scelta la prima. -ForwardPeer deve corrispondere a un profilo esistente nella BBS. Senza un profilo selezionato il pulsante di forwarding manuale è disabilitato. L'installer non crea profili radio o modifica la configurazione BPQ.
| Option | Purpose |
| --- | --- |
| `-BpqRoot` | Folder containing `BPQ32.cfg`, not necessarily the program installation folder. |
| `-Port` | Web panel port, 1024–65535; default 8090 on first install. |
| `-HttpPort` | BPQ HTTP port; defaults to the Telnet driver setting. Must differ from the panel port. |
| `-RadioPort` | Existing BPQ radio port number. The first is selected initially; multiple modems produce a warning. |
| `-SysopUser` | Existing sysop user; defaults to the first on initial installation. |
| `-ForwardPeer` | Existing BBS forwarding partner for the dashboard shortcut. No partner is created automatically. |
| `-CmsPeer` | Existing CMS forwarding profile; defaults to `RMS`. |
| `-NodeExe` | Full path to a Node.js 20+ `node.exe`. Saved for future startup. |
| `-VaraLogPath` | Optional local `VARAHF.log` used by the journal. A running local VARA log is detected when available. |
| `-EnableRadioCAT` / `-DisableRadioCAT` | Explicitly enable/disable Winlink radio tuning through BPQ. No tuning test or transmission is performed. |
| `-Restart` | Restart this project's web panel after installation/update. Does not restart BPQ or VARA. |
Opzioni aggiuntive:
Without a selected forwarding partner the dashboard shortcut is disabled. The Forwarding page can still show and start other configured partners.
## Updates and local settings
Reinstalling for the same BPQ data folder preserves custom settings, including the panel port, CMS profile, VARA options and Winlink CAT opt-in. Changed configuration is backed up as `console.config.json.<timestamp>.backup`, then saved atomically. An unchanged configuration is not rewritten. Invalid JSON, missing selected ports/users or invalid explicit profiles stop installation with an error.
If you select a different station folder, station-specific selections are detected again. If the selected modem changes, CAT opt-in is cleared unless explicitly enabled. Use a separate project folder for each station so journals, caches and recovery state remain separate.
After updating the project:
```powershell
# Avvio automatico al login Windows
.\Install.ps1 -CheckOnly
.\Install.ps1 -Restart
```
For a normal start or restart without rerunning detection:
```powershell
.\Start-Console.ps1
.\Start-Console.ps1 -Restart
```
Startup checks the port, Node version and the new server's `/health` response. It reports failures instead of claiming success when Node exits. An existing panel on another port is not duplicated. Changed settings require a restart. A Winlink radio session awaiting profile restoration blocks `-Restart`; let that session finish first. Restarting the panel closes its browser/Telnet sessions.
Environment overrides: `BPQ_ROOT` selects the BPQ data folder; `BPQ_CONSOLE_PORT` selects the panel port; `BPQ_CONSOLE_CONFIG` selects a different local JSON configuration file. Install and startup scripts respect these overrides. Use the standard `console.config.json` without temporary environment overrides when registering automatic startup.
Station greetings, ASCII banners, radio schedules, routing and Winlink availability reports remain local BPQ settings. The installer does not overwrite them. Personal BPQ configuration and credentials are not part of this repository.
## Automatic startup and LAN
```powershell
# Start at this Windows user's logon
.\Install.ps1 -AutoStart
# Accesso dalla sottorete locale, su profilo rete Privato
# Eseguire PowerShell come amministratore per la regola firewall
# Optional access from the local subnet; requires an administrator shell
.\Install.ps1 -EnableLAN
```
-AutoStart registra la task BPQ-WebConsole. -EnableLAN apre soltanto la porta del pannello alla sottorete locale. Per usare entrambe le opzioni: .\Install.ps1 -AutoStart -EnableLAN. Se PowerShell blocca gli script scaricati, sbloccare i file dopo averne verificato il contenuto, secondo le policy del proprio PC.
`-AutoStart` registers **BPQ-WebConsole** for the current user, with interactive logon and limited privileges. It uses the saved Node path and process-scoped `RemoteSigned` execution policy. Windows policy may restrict task registration. Remove the task to disable automatic startup. BPQ must have its own startup arrangement.
La configurazione generata console.config.json contiene percorsi, porte e selezioni, senza password, ed è esclusa da Git. Il percorso Node rilevato viene salvato per l'avvio automatico. È possibile modificare il file e riavviare il solo pannello. BPQ_ROOT e BPQ_CONSOLE_PORT permettono di sovrascrivere cartella dati e porta HTTP del pannello.
`-EnableLAN` creates a firewall rule for the selected Node executable and panel port, restricted to the **Private** profile and **LocalSubnet**. Existing rules are replaced only after the new rule is created successfully. From another computer use the BPQ PC's private IPv4 address and panel port. The panel accepts loopback and private IPv4 hosts, not arbitrary DNS hostnames or public addresses.
## Modem e servizi opzionali
This is an administrative panel for a trusted PC/LAN, using HTTP. Do not expose it directly to the Internet. Authentication uses HttpOnly/SameSite cookies and writes require Origin/CSRF checks. Configuration, logs, mail files, station locations and runtime caches are excluded from Git.
Il progetto non richiede VARA. Con PACTOR o altri driver BPQ mostra la porta selezionata e i dati disponibili nell'interfaccia BPQ. Le informazioni non esposte dal driver restano non disponibili: non vengono simulate. Non vengono inviati comandi CAT specifici per una radio.
## Modems and telemetry
Il grafico TRAFFICO BPQ mostra TX/RX in bit/s calcolati dalla variazione dei contatori byte BPQ nel tempo; indica traffico utile effettivo, non il bitrate negoziato dal modem. È disponibile per le porte radio, anche senza VARA. Il grafico CPU VARA è abilitato soltanto quando la porta selezionata usa il driver VARA. La ricezione syslog del bitrate VARA resta disponibile nel backend come diagnostica, ma non alimenta il KPI principale. Per il bitrate, configurare il syslog VARA verso 127.0.0.1 UDP 18514, con CommandsLog attivo; varaSyslogPort nel file locale permette di cambiarne la porta. Non viene aperta una seconda connessione TCP al modem. Per un VARA remoto la CPU locale non è disponibile. Il bitrate deve essere emesso dalla versione VARA utilizzata.
VARA is optional. PACTOR, ARDOP, KISS and other BPQ ports show the information their driver exposes; missing data remains unavailable. VARA-specific controls are disabled for other drivers.
BBS, chat, monitor e Winlink vengono abilitati in base alle applicazioni e alle porte BPQ rilevate. Le API dei servizi assenti sono disabilitate. Winlink richiede CMS=1 e una BBS configurata; Aggiorna mail avvia il profilo RMS via Internet. cmsPeer consente di specificare un nome diverso nel file locale. Non viene installato o configurato automaticamente un gateway Winlink.
**TRAFFICO BPQ** derives TX/RX bit/s from BPQ byte-counter changes, rather than claiming to show the negotiated modem bitrate. The VARA CPU chart only applies to a local VARA process. Remote VARA CPU usage cannot be measured locally. Optional VARA bitrate diagnostics listen on loopback UDP 18514; change `varaSyslogPort` in local configuration if needed. The VARA version must emit bitrate records with CommandsLog enabled. The panel does not open a second VARA TCP control connection.
## Funzioni e dati
## BBS, mail and attachments
Dashboard scura, schermo intero, stato modem, chiamante/chiamato quando esposti, CPU di sistema, rotte NET/ROM e attività forwarding. BBS e Winlink hanno elenco sopra e lettura sotto, ricerca, composizione, risposta, cancellazione e allegati B2. Anteprime immagini, PDF e testo; HTML/SVG mostrati come testo. I messaggi 7plus multipart vengono ricostruiti automaticamente quando tutte le parti sono disponibili e i controlli CRC sono validi.
BBS and Winlink provide folders, search, composition, replies, deletion and B2 attachments, with the message list above the reader. Delete marks a message `K` in BPQ and does not recall mail already delivered elsewhere. The panel uses BPQ's interfaces for writes, never edits `DIRMES.SYS` or `.mes` files directly.
Chat nativa con sessione condivisa dell'account sysop selezionato, utenti, stanze, collegamenti e messaggi privati; fino a 300 eventi in memoria. Monitor BPQTermTCP con filtri e download TXT; fino a 1000 frame in memoria. Disconnessione dopo due minuti senza polling.
Image, PDF and text attachments have previews and downloads. HTML/SVG are treated as text. Multipart 7plus files are reconstructed from the original message bytes when all parts and CRC checks are valid. Matching uses sender, filename, size, part count, block size and 7plus timestamp, not just the subject. Missing/damaged parts prevent downloading a false result. COR/ERR repair is not implemented. Limits: 32 MB per reconstructed file, 255 parts, 2 MB per scanned message and a 64 MB memory cache. Reference format: [7PLUS 2.25 source](https://ponce.cc/slackware/sources/repo/7pl225sr.zip).
Date e ore nella timezone del browser. Notifiche per nuovi bollettini e posta mentre il sito è aperto; il suono richiede un gesto nel browser. Lettura e scrittura tramite BPQ, senza modifiche dirette a DIRMES.SYS o ai file .mes. Elimina marca il messaggio K localmente e non richiama email già consegnate al CMS.
Concurrent readers share in-flight BPQ requests. Dashboard counters and Winlink avoid loading timestamp metadata for every bulletin. The first full BBS listing can take longer on a large archive while exact BPQ timestamps are loaded; subsequent reads reuse the timestamp cache.
## Sicurezza e verifica
Dates use the browser timezone. Arrival notifications distinguish downloaded bulletins and incoming mail from messages you composed; the first load does not announce old messages as new. Sound requires a browser gesture.
Pannello amministrativo per PC e LAN fidata, in HTTP. Non esporre direttamente su Internet. Sessioni HttpOnly/SameSite, controlli Origin/CSRF e host limitati a loopback e indirizzi LAN privati. I log, la configurazione locale e i dati BBS sono esclusi dal repository. PDF.js e font/CMap mantengono le licenze in public/vendor/pdfjs.
## Winlink Internet and radio
Winlink requires `CMS=1`, the BBS application and a configured CMS forwarding profile. **Sync Internet** starts that profile; it does not create a gateway or forwarding configuration.
**Sync Radio** opens the [official public Winlink gateway directory](https://cms.winlink.org:444/GatewayChannels.aspx), without an API key. Search callsign/locator/location, filter by band and opening hours, and sort by distance, callsign or frequency. The modem family selects the directory mode. Cache: 15 minutes; manual refresh is throttled to once per minute. Calls require a directory no older than 30 minutes, an open UTC schedule and a report within six hours. A report does not guarantee reachability or a clear channel. Distance is geographical, not a propagation prediction; VOACAP is not required.
Displayed frequencies are **USB dial**, calculated as the published centre frequency minus 1500 Hz. Verify this offset against your modem setup. Scheduling is UTC; report timestamps use the browser timezone.
Radio connection requires a supported HF modem, available telemetry and working BPQ `RADIO` CAT control. Enable this deliberately:
```powershell
node --test test.mjs
.\Install.ps1 -EnableRadioCAT -Restart
```
Per riavviare, arrestare soltanto il processo Node di questo pannello ed eseguire Start-Console.ps1. Per rimuovere l'avvio automatico, eliminare la task BPQ-WebConsole. BPQ e il modem continuano a funzionare indipendentemente dal pannello.
Selecting a row does not transmit. **Connetti e sincronizza** explicitly starts the selected gateway. Busy modem/BBS sessions block startup and the panel does not override a busy channel. The CMS profile must normally use `RMS` or `C port CMS` as its Internet script.
Before changing that profile, the panel backs up `BPQMail.cfg` under `BPQMailChat/Backup-winlink-radio-*`. It temporarily disables the profile timer, sets an ATTACH/RADIO/CONNECT script and enables compressed B2 personal mail. Once BPQ streams are idle, it restores the original profile. `winlink-radio.session.json` retains recovery state across panel restarts. Concurrent manual profile edits suspend automatic restoration and expose a restore button. Keep the panel running during the exchange. The initial status confirms a request to BPQ; results and counts come from logs.
## Diario e mappa delle stazioni
## Forwarding, chat and terminal
Le sezioni Diario e Mappa ricostruiscono fino a 30 giorni dai log BPQ BBS, Chat e CMSAccess, con un massimo di 5000 sessioni. Il diario distingue servizio, direzione, trasporto, esito, frequenza quando registrata, durata del collegamento, SNR, tentativi, contatori TX/RX ed eventi. Filtri per periodo, nominativo, servizio, direzione ed esito; esportazione CSV delle righe filtrate. Si aggiorna ogni 30 secondi quando la sezione è aperta.
**Forwarding** shows configured partners in a compact table. Click a row (or Enter/Space) to expand routing rules, scripts, schedules, queue counts and recent exchanges. Only one row opens at a time; focus survives refresh. Sync buttons are authenticated, serialised and protected against duplicate requests, active sessions and modem use. The next attempt is a log-based estimate; BPQ owns the real timer. Sensitive script commands are masked. Rules remain editable in BPQ.
I log VARA possono arricchire le sessioni con byte effettivi e picchi TX/RX. Install.ps1 rileva VARAHF.log dal processo VARA locale quando disponibile; in alternativa impostare varaLogPath nel file locale console.config.json. Non è necessario usare VARA: i servizi presenti nei log BPQ rimangono disponibili. I contatori della connessione CMS e quelli radio sono distinti. Messaggi e conteggi sono quelli esplicitamente registrati: dati mancanti rimangono non disponibili. File ruotati, mancanti o incompleti possono impedire di ricostruire l'intera sessione; un esito non registrato non viene considerato riuscito. Per file oltre 16 MB viene letta la parte finale e mostrato un avviso.
**Chat** uses the selected sysop's shared session, with rooms, connected users, peer links and private messages. **Monitor** uses BPQTermTCP, with port/direction filters and TXT export. They retain up to 300 chat events and 1000 monitor frames, and disconnect after two minutes without polling.
La mappa è locale, senza servizi di tile, API key o invio dei log a terzi. Usa i poligoni pubblici [Natural Earth](https://www.naturalearthdata.com/about/terms-of-use/), inclusi nel progetto. Posizione locale da LOCATOR BPQ; per le stazioni remote selezionare un nominativo e salvare il locator Maidenhead comunicato dalla stazione (4, 6 o 8 caratteri). I locator vengono salvati nel file locale station-locations.json, escluso da Git. I punti rappresentano il centro del locator. Stazioni con lo stesso centro del locator condividono il punto, senza spostamenti artificiali. Il riquadro dettagli permette di selezionarle; non viene disegnata una traccia di distanza zero.
**Terminale** opens a real Telnet session to the local BPQ `TCPPORT`, automatically authenticating without returning login credentials to the browser. It has amber phosphor styling, scanlines, selectable text and a cursor that respects reduced-motion settings. Enter sends one command; Up/Down browse history. Pulisci clears the screen, Salva testo downloads it, and Disconnetti closes the socket. Scrolling upwards pauses following; the bottom button resumes it.
Punti e tracce sono cliccabili, con nominativo, ultimo collegamento nel periodo, servizio, orario e accesso al dettaglio di ogni sessione. Zoom con rotellina del mouse centrato sul cursore, pulsanti zoom e Inquadra rete; trascinamento della mappa e filtro per servizio/periodo. Mostra collegamenti permette di attivare o nascondere le tracce. Le tracce uniscono stazioni e non descrivono il percorso fisico radio o gli hop NET/ROM. Le stazioni senza locator rimangono nell'elenco, senza coordinate inventate.
Each web login has its own terminal/socket and in-memory transcript. Logout/expiry closes it; so do 90 seconds without terminal polling or 15 minutes without commands. Limits: 1000 characters per command, 200,000 output characters and 100 history entries. It is a BPQ line terminal, not a full-screen VT100 or binary YAPP client. Remote HTML and ANSI controls are not executed.
Il diario espone eventi strutturati, non i log grezzi: password, challenge CMS, contenuto delle email e conversazioni chat non sono restituiti dall'API.
## Journal and map
Il tipo di collegamento viene ricostruito anche dai comandi CONNECT con porta numerata e dagli accessi accettati nei log Telnet (orari locali Windows, convertiti in UTC). La correlazione usa nominativo e orario entro 20 secondi ed è indicata nei dettagli. Gli accessi locali sono distinti come Locale / Telnet. Se i log storici non archiviano il mezzo di ingresso, il diario mostra Nodo BPQ oppure Gateway Winlink e spiega il limite nei dettagli; non presume un collegamento radio o Internet. Sulla mappa tali mezzi sono distinti dal colore delle tracce radio e di rete.
The journal reconstructs up to 30 days and 5000 sessions from BPQ BBS, Chat and CMSAccess logs, with optional VARA log enrichment. It shows service, direction, transport, outcome, recorded frequency, duration, SNR, attempts, counters and events; filters and CSV export apply to the visible records. Missing/rotated/incomplete logs may prevent reconstructing older contacts. Data is not invented; unknown transport is explained in details. Credential challenges, mail bodies and chat conversations are not exposed in journal events.
## Immagini multipart 7plus
The local map uses [Natural Earth](https://www.naturalearthdata.com/about/terms-of-use/) geometry without external tiles or API keys. Your position comes from BPQ's locator. Save remote Maidenhead locators supplied by stations in `station-locations.json` (4, 6 or 8 characters). Points represent locator centres; stations sharing a locator share the point, without artificial displacement. Click a point or trace for callsign, time and contact details. Wheel zoom, drag, zoom buttons and fit-to-network are supported. Traces join stations, not propagation paths or NET/ROM hops. Stations without known locators remain unplotted.
Il lettore individua i blocchi 7plus nei file .mes originali, preservando i byte a 8 bit, e raggruppa le parti per mittente, nome, dimensione, numero di parti, dimensione del blocco e timestamp 7plus. Non usa soltanto il titolo del bollettino: file diversi con lo stesso nome non vengono uniti automaticamente. La decodifica JavaScript verifica CRC primario, CRC secondario, sequenza delle righe, intestazioni e chiusure. Il riferimento di interoperabilità è il formato 7PLUS di Axel Bauda DG1BBQ ([sorgenti originali 2.25](https://ponce.cc/slackware/sources/repo/7pl225sr.zip)); non viene eseguito o distribuito un decoder esterno.
## Verification and troubleshooting
Aprendo una qualsiasi parte completa, il file ricostruito appare fra gli allegati, con anteprima e download; le immagini vengono mostrate direttamente nel lettore e il testo codificato resta espandibile. Sono elencati i messaggi che compongono il gruppo. Parti mancanti o danneggiate bloccano il download del risultato e vengono indicate. Copie valide della stessa parte possono completare righe mancanti; righe discordanti non vengono accettate. Non è implementata la riparazione tramite file COR/ERR.
```powershell
npm test
# Or, without npm:
node --test
```
Sono considerate soltanto le parti attualmente visibili nella BBS. Nessun messaggio viene modificato, scritto o cancellato; i risultati sono conservati in memoria (cache fino a 64 MB). Limite file ricostruito 32 MB, fino a 255 parti, scansione di messaggi fino a 2 MB ciascuno. Il download usa gli stessi controlli di sessione e autorizzazione degli altri allegati.
Tests cover protocol parsing, mail/attachments, journal, gateway validation, profile restoration, generic station detection and installer behaviour. Windows tests exercise the PowerShell wrappers in temporary folders, including paths with spaces/apostrophes, duplicate starts, restart and startup failure. They do not create scheduled tasks or firewall rules.
### Forwarding
- **BPQ unreachable:** start BPQ and check its Telnet `HTTPPORT`; rerun `-CheckOnly`.
- **Missing service:** check the matching application/port and that BPQMail/BPQChat is running.
- **Wrong modem/sysop after BPQ changes:** rerun installation with the appropriate selection.
- **Port already in use:** choose a different `-Port`; do not reuse BPQ's HTTP port.
- **Changed settings:** use `Start-Console.ps1 -Restart` when no radio profile restoration is pending.
- **Startup fails:** inspect local `server-error.log`. A failed start is not reported as success.
- **Script/task policy blocks execution:** review the files and your Windows policy; organisation restrictions cannot be overridden by the installer.
La pagina Forwarding presenta i partner in una tabella compatta con sync nella riga. Un click sulla riga (oppure Invio/Spazio da tastiera) apre il dettaglio con regole, script e storico: un solo partner alla volta. Il dettaglio e il focus vengono conservati durante gli aggiornamenti automatici.
La pagina Forwarding legge i profili BBS nativi, le code aggiornate tramite BPQ, le regole TO/AT e gerarchiche, le fasce UTC (oppure locali se abilitate in BPQ), gli intervalli e gli ultimi scambi dai sette file di log BBS più recenti. Radio e Internet sono distinti usando percorso e porte configurate. Il prossimo tentativo è una stima basata sui log e non il timer interno BPQ. I comandi di connessione riservati sono oscurati.
Ogni partner con script dispone di Sincronizza ora, anche se il timer automatico è disabilitato. Le richieste sono autenticate, protette da CSRF, limitate ai partner configurati e serializzate per evitare conflitti nella sessione amministrativa BPQ; sono bloccate durante una sessione rilevata, con modem impegnato o per 30 secondi dopo una richiesta. La conferma iniziale indica una richiesta a BPQ, mentre l’esito viene aggiornato dai log. Le regole restano modificabili in BPQ. I riquadri Arrivati nella BBS e Attività forwarding sono stati rimossi dalla home.
Verifica: `node --test test.mjs forwarding.test.mjs`.
## Winlink via radio
In Winlink, **Sync Internet** conserva lo scambio CMS esistente. **Sync Radio** apre il selettore dei gateway ufficiali PUBLIC: ricerca per nominativo, locator o località, filtro banda e orario, ordinamento per distanza, nominativo o frequenza. L’elenco viene scaricato dal [CSV pubblico Winlink](https://cms.winlink.org:444/GatewayChannels.aspx), senza chiave API, con cache di 15 minuti e aggiornamento manuale. La distanza deriva dai locator e non è una previsione di propagazione; VOACAP non è richiesto.
I canali sono filtrati per il modem HF rilevato (VARA, Pactor o ARDOP). Le frequenze mostrate sono dial USB, calcolate dalla frequenza centrale pubblicata meno 1500 Hz. Prima dell’uso verificare questo offset nella configurazione del modem. Gli orari dichiarati sono UTC; il timestamp del report usa il fuso del browser. Un report recente non garantisce che il gateway sia raggiungibile o il canale libero.
Per abilitare il pulsante di connessione, il controllo CAT deve già funzionare tramite il comando BPQ RADIO. Aggiungere nel file locale console.config.json `"winlinkRadio": {"catControl": true}` e riavviare il pannello. In assenza di CAT abilitato l’elenco resta consultabile. La selezione non trasmette: **Connetti e sincronizza** avvia esplicitamente la chiamata. Sono accettati solo canali dell’elenco aggiornato, in orario e con report entro sei ore; le richieste sono autenticate e protette da CSRF.
Il profilo cmsPeer (RMS per impostazione predefinita) deve avere script Internet RMS oppure C porta CMS. Prima della chiamata viene salvato un backup di BPQMail.cfg in BPQMailChat/Backup-winlink-radio-*. Il pannello sostituisce temporaneamente lo script con ATTACH / RADIO / CONNECT, disabilita il timer del profilo e usa B2 compresso. Al termine, con gli stream BBS inattivi, ripristina i campi originali e riabilita il sync Internet. Modem e BBS impegnati bloccano l’avvio; non viene forzato il canale occupato.
Lo stato di recupero è nel file locale winlink-radio.session.json, escluso da Git. Dopo un riavvio il pannello riprende il ripristino; una modifica manuale concorrente del profilo sospende il ripristino automatico e richiede verifica tramite il pulsante dedicato. Lasciare il pannello in esecuzione durante lo scambio. Lo stato iniziale conferma la richiesta a BPQ; l’esito e i conteggi provengono dai log, senza presumere la consegna della posta.
Verifica: `node --test test.mjs forwarding.test.mjs winlink-radio.test.mjs`.
## Terminale Telnet
La sezione **Terminale** apre una sessione Telnet reale verso BPQ sullo stesso PC, usando TCPPORT rilevata in BPQ32.cfg. **Collega** esegue l’accesso automatico con l’utente sysop configurato; le credenziali di accesso non vengono incluse nel testo restituito al browser. Non richiede VARA o un modem specifico. Se manca TCPPORT, il pulsante di navigazione viene nascosto.
Il terminale usa fosfori giallo ambra, scanline leggere, bagliore e cursore lampeggiante (fermo quando il sistema richiede movimento ridotto). Invio invia il comando; ↑ e ↓ richiamano la cronologia della pagina. Il testo è selezionabile e copiabile. Pulisci svuota solo la schermata; Salva testo scarica quanto visualizzato; Disconnetti chiude il socket. Lo scorrimento automatico si sospende risalendo nel testo e riprende con Torna al fondo.
Ogni sessione web ha un proprio collegamento e buffer in memoria, senza condivisione del terminale fra accessi. Le API richiedono autenticazione e CSRF per i comandi. Il server si collega soltanto al Telnet BPQ locale: non accetta host o porte forniti dal browser. Logout e scadenza dell’accesso chiudono la sessione; il socket viene chiuso anche dopo 90 secondi senza consultazione del terminale oppure 15 minuti senza comandi. Nessun registro viene salvato automaticamente su disco.
È una console a righe per il nodo BPQ e le sue applicazioni: non emula applicazioni a schermo intero VT100. Il testo remoto viene visualizzato come testo, senza eseguire HTML o sequenze di controllo ANSI. Limiti: 1000 caratteri per comando, 200.000 caratteri di output in memoria e 100 comandi nella cronologia del browser.
Verifica: `node --test test.mjs forwarding.test.mjs winlink-radio.test.mjs terminal.test.mjs`.
Third-party PDF.js, font and CMap licences are retained under `public/vendor/pdfjs`; map attribution is in `public/WORLD-MAP-LICENSE.txt`.