Warn when the detected advertised address is on a virtual interface

make url, make qr and make cert now print a warning (with candidate
addresses of real interfaces) when the address found through the default
route belongs to a tunnel or bridge, which the tablet cannot reach and
which the HTTPS certificate would wrongly cover. Silent when
server.advertise_host or an explicit server.host is set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-30 15:31:07 +01:00
parent 97cf2afb53
commit 75a7e108d7
6 changed files with 174 additions and 4 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ redémarrer le service (`systemctl --user restart mediadeck`).
- **PC avec un VPN (WireGuard, Proton VPN…) : renseigner `advertise_host`.** `make url`, `make qr` et `make cert`
déduisent l'adresse du PC de la route par défaut ; avec un VPN actif, elle passe par le tunnel (`wg0`, `tun0`,
`proton0`… ; par exemple `10.2.0.2`) et l'adresse annoncée n'est pas joignable par la tablette. Le certificat HTTPS
serait en plus émis pour cette mauvaise adresse. Avant `make cert`, indiquer dans `~/.config/mediadeck/config.toml`
serait en plus émis pour cette mauvaise adresse. Ces trois commandes affichent un avertissement (avec les adresses
candidates) quand l'adresse détectée appartient à une interface virtuelle (tunnel, pont Docker). Avant `make cert`, indiquer dans `~/.config/mediadeck/config.toml`
l'adresse du PC **sur le réseau local**, hors tunnel :
```toml