- ENDPOINT must be https:// (http only for localhost); a 3xx is a
failure and is never followed, so the bearer token cannot travel in
cleartext or reach another host.
- The loop follows REPORT_INTERVAL after a config reload (the
LoopingCall's interval is updated on each tick).
- adn-server.example.yaml: the section, commented out, with
placeholders.
- Without the integrated proxy, hbp_ports skips MASTERs bound to
loopback (internal, e.g. a local gateway's master).
- Tests: reload (new token and interval, removing the section stops the
reports), https rule, redirect not followed, loopback masters, peers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jYm3g9skKGroRdrfwJsCG
@ -121,21 +121,23 @@ Look up the same stream ID in the server log:
The server can send the ADN panel its own state: version, uptime, the HBP port hotspots connect to, the ODTP and OBP proxy ports, how many peers are connected, its OpenBridge links with their keepalive state, and the plugins loaded. The panel shows it on the server's page and uses the ports in the public server list (so apps learn the ODTP port from there).
It is off unless the sysop sets it up, and it is **not** in `adn-server.example.yaml`: generate a token on your server's page in the panel (the *Server report* action), then add the section by hand:
It is off unless the sysop sets it up (`adn-server.example.yaml` has the section commented out): generate a token on your server's page in the panel (the *Server report* action), which also shows the endpoint, then add the section by hand:
```yaml
ADN_PANEL:
ENDPOINT: <showninthepanelwiththetoken>
TOKEN: adn_xxxxxxxxxxxx # belongs to this server only
ODTP_PORT: 54006 # optional: the ODTP gateway runs as its own service
```
- Without `ENDPOINT` and `TOKEN` nothing is sent.
- Without `ENDPOINT` and `TOKEN` nothing is sent. The endpoint must be `https://` (plain `http://` only for localhost), and a redirect is treated as a failure, never followed, so the token cannot leak to another host.
- The token says which server the report is from; a new token from the panel replaces the old one.
- The report carries no IP addresses, passphrases or user IDs.
- The first report goes out one minute after start, then every `REPORT_INTERVAL`. The POST runs off the reactor with a 10 s timeout, so a slow or unreachable panel never delays traffic.
- A failure is logged once as `(ADN_PANEL) Could not send the report: ...` (HTTP 401/403 means the token is wrong or was revoked), and again when it works.
- A config reload applies at once: a new token, a different `REPORT_INTERVAL`, or removing the section (which stops the reports).
- Without the integrated proxy, `hbp_ports` lists the enabled MASTER ports except those bound to loopback (internal).
@ -121,21 +121,23 @@ Busca el mismo stream ID en el log del servidor:
El servidor puede enviar al panel de ADN su propio estado: versión, tiempo encendido, el puerto HBP al que se conectan los hotspots, los puertos de ODTP y del proxy OBP, cuántos peers hay conectados, sus enlaces OpenBridge con el estado del keepalive y los plugins cargados. El panel lo muestra en la ficha del servidor y usa los puertos en la lista pública de servidores (de ahí sacan las apps el puerto ODTP).
Está apagado salvo que el sysop lo configure, y **no** viene en `adn-server.example.yaml`: genera un token en la ficha de tu servidor en el panel (la acción *Informe del servidor*) y añade la sección a mano:
Está apagado salvo que el sysop lo configure (`adn-server.example.yaml` trae la sección comentada): genera un token en la ficha de tu servidor en el panel (la acción *Informe del servidor*), que también muestra el endpoint, y añade la sección a mano:
```yaml
ADN_PANEL:
ENDPOINT: <semuestraenelpaneljuntoaltoken>
TOKEN: adn_xxxxxxxxxxxx # solo vale para este servidor
REPORT_INTERVAL: 300 # segundos, mínimo 60 (300 por defecto)
REPORT_INTERVAL: 300 # segundos, 60-86400 (300 por defecto)
ODTP_PORT: 54006 # opcional: la pasarela ODTP es un servicio aparte
```
- Sin `ENDPOINT` y `TOKEN` no se envía nada.
- Sin `ENDPOINT` y `TOKEN` no se envía nada. El endpoint tiene que ser `https://` (`http://` solo para localhost), y una redirección cuenta como fallo y no se sigue, así que el token no puede acabar en otro host.
- El token dice de qué servidor es el informe; un token nuevo generado en el panel sustituye al anterior.
- El informe no lleva direcciones IP, passphrases ni IDs de usuarios.
- El primer informe sale un minuto después de arrancar y luego cada `REPORT_INTERVAL`. El envío va fuera del reactor con un timeout de 10 s, así que un panel lento o caído nunca retrasa el tráfico.
- Un fallo se registra una sola vez como `(ADN_PANEL) Could not send the report: ...` (HTTP 401/403 = token incorrecto o revocado), y otra vez cuando vuelve a funcionar.
- Una recarga de la config se aplica al momento: un token nuevo, otro `REPORT_INTERVAL` o quitar la sección (que detiene los informes).
- Sin el proxy integrado, `hbp_ports` lista los puertos de los MASTER activos salvo los atados a loopback (internos).