From 7818cf5d17b75200563b2f0832b7fbf58f66681a Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 26 Oct 2026 17:15:42 +0100 Subject: [PATCH] Document the secure (HTTPS) mode in the installation steps The quick start now lists `make cert` and the optional `make http-on`, with the order (after `make config`, before `make service-install`), the reminder to run make from the project folder rather than ~/.config/mediadeck, and a short comparison of the secure and unsecured accesses. README fr/en and the command list of CLAUDE.md are updated. Co-Authored-By: Claude Sonnet 5.5 --- CLAUDE.md | 3 +++ README-EN.md | 16 +++++++++++++++- README.md | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f1aaf42..0f70a0a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,7 +27,10 @@ make install # .venv + dépendances (+ pyright) make config # ~/.config/mediadeck/config.toml (mode 600) + jeton aléatoire make dev # serveur au premier plan, logs debug make lint test # pyright + unittest +make cert # HTTPS local (CA privée + certificat), à lancer après `make config` +make http-on/off # port HTTP en clair à côté du HTTPS make url # URL tablette + QR code +make qr # page locale avec les QR codes en grand make uinput # règle udev uaccess (sudo) make service-install / status / logs ``` diff --git a/README-EN.md b/README-EN.md index 7f09153..ca810d6 100644 --- a/README-EN.md +++ b/README-EN.md @@ -41,12 +41,26 @@ KDE Connect is not required; it can stay installed for its other features. make deps # system packages (sudo): venv, gcc, pactl, qrencode, ffmpeg make install # .venv + Python dependencies make config # ~/.config/mediadeck/config.toml (mode 600) with a random token +make cert # secure access (HTTPS): local CA + certificate, enabled in config.toml +make http-on # optional: also keep an unencrypted HTTP access (port 8766) make uinput # "uaccess" udev rule for /dev/uinput (sudo) make service-install # systemd user service, started with the graphical session -make url # URL + QR code to scan with the tablet +make url # URL(s) + QR code(s) to scan with the tablet make qr # or a PC browser page with the QR codes shown large ``` +Run every `make` command **from the project folder** (the one containing the `Makefile`), not from +`~/.config/mediadeck`. `make cert` and `make http-on` come after `make config` (they edit `config.toml`) and before +`make service-install`, so the service starts in the right mode; if run later, restart the service +(`systemctl --user restart mediadeck`). + +- **Secure access (HTTPS)**, recommended: encrypted traffic, Wake Lock and app installation. The CA must be installed + on the tablet **once** (see "Local HTTPS"). +- **Unsecured access (HTTP)**: nothing to install, but the token travels in clear on the local network. Without + `make cert` it is the only mode; with `make cert` then `make http-on`, both coexist (see "Choosing: secure or + unsecured"). +- If the `ufw` firewall is active: `make firewall` (add `HTTP_PORT=8766` if plain HTTP is enabled). + On the tablet: scan the QR code, then browser menu → "Add to Home screen". The token is stored, then removed from the address bar. diff --git a/README.md b/README.md index b21cb87..b4b3866 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,25 @@ KDE Connect n'est pas nécessaire : il peut rester installé pour ses autres fon make deps # paquets système (sudo) : venv, gcc, pactl, qrencode, ffmpeg make install # .venv + dépendances Python make config # ~/.config/mediadeck/config.toml (mode 600) avec un jeton aléatoire +make cert # accès sécurisé (HTTPS) : CA locale + certificat, activés dans config.toml +make http-on # facultatif : garde aussi un accès HTTP en clair (port 8766) make uinput # règle udev « uaccess » pour /dev/uinput (sudo) make service-install # service systemd utilisateur, démarré avec la session graphique -make url # URL + QR code à scanner avec la tablette +make url # URL(s) + QR code(s) à scanner avec la tablette make qr # ou une page du navigateur du PC avec les QR codes en grand ``` +Toutes les commandes `make` se lancent **depuis le dossier du projet** (celui qui contient le `Makefile`), pas depuis +`~/.config/mediadeck`. `make cert` et `make http-on` se placent après `make config` (ils modifient `config.toml`) et +avant `make service-install`, pour que le service démarre déjà avec le bon mode ; s'ils sont lancés plus tard, +redémarrer le service (`systemctl --user restart mediadeck`). + +- **Accès sécurisé (HTTPS)**, recommandé : trafic chiffré, Wake Lock et installation en application. Il faut installer + **une seule fois** la CA sur la tablette (voir « HTTPS local »). +- **Accès non sécurisé (HTTP)** : rien à installer, mais le jeton circule en clair sur le réseau local. Sans `make cert`, + c'est le seul mode ; avec `make cert` puis `make http-on`, les deux coexistent (voir « Choisir : sécurisé ou non »). +- Si le pare-feu `ufw` est actif : `make firewall` (ajouter `HTTP_PORT=8766` si le HTTP en clair est activé). + Sur la tablette : scanner le QR code, puis menu du navigateur → « Ajouter à l'écran d'accueil ». Le jeton est mémorisé puis retiré de la barre d'adresse.