feat(agent): activation zéro-config – config Headscale envoyée par le serveur

- Agent: URL serveur par défaut, node_id auto-généré, config Headscale vide par défaut
- Serveur: lors de l’activation, renvoie headscaleUrl + headscaleAuthKey
- Agent: sauvegarde la config reçue et démarre Tailscale automatiquement
- docker-compose.yml: passe HEADSCALE_URL et HEADSCALE_AUTH_KEY au service server
- Mise à jour du suivi avec le flow zéro-config
This commit is contained in:
EduBox Dev
2026-06-23 10:30:19 +00:00
parent df77caf64a
commit 8a9deb8ebc
7 changed files with 175 additions and 73 deletions
+7 -7
View File
@@ -43,23 +43,23 @@ with zipfile.ZipFile("${ZIP_NAME}", 'w', zipfile.ZIP_DEFLATED) as zf:
zf.write("${BIN_NAME}.exe", "${BIN_NAME}.exe")
for f in ["tailscale.exe", "tailscaled.exe", "wintun.dll"]:
zf.write(f"tailscale-bin/windows/{f}", f"tailscale-bin/windows/{f}")
readme = """${APP_NAME} Agent - Windows
readme = r"""${APP_NAME} Agent - Windows
=======================
1. Extract this archive to a folder (e.g. C:\\${APP_NAME}-agent).
2. Create a data folder (e.g. C:\\${APP_NAME}-agent\\data).
3. Create the config file data\\${BIN_NAME}-config.json:
1. Extract this archive to a folder (e.g. C:\${APP_NAME}-agent).
2. Create a data folder (e.g. C:\${APP_NAME}-agent\data).
3. Create the config file data\${BIN_NAME}-config.json:
{
"server": "wss://studioe5.edudeploy.com/api/websocket",
"headscale_url": "https://headscale.studioe5.edudeploy.com",
"headscale_auth_key": "YOUR_PREAUTH_KEY",
"node_id": "YOUR_NODE_ID",
"data_dir": "C:\\\\\\\\${APP_NAME}-agent\\\\\\\\data"
"data_dir": "C:\\${APP_NAME}-agent\\data"
}
4. Run the agent:
${BIN_NAME}.exe -no-tray -data-dir C:\\${APP_NAME}-agent\\data
${BIN_NAME}.exe -no-tray -data-dir C:\${APP_NAME}-agent\data
Tailscale binaries (tailscale.exe, tailscaled.exe, wintun.dll) are bundled
in tailscale-bin\\windows\\ and used automatically by the agent.
in tailscale-bin\windows\ and used automatically by the agent.
"""
zf.writestr("README-Windows.txt", readme)
print(f" ${ZIP_NAME}")