feat(agent): packaging Windows + téléchargement HTTPS
- Téléchargement des binaires Tailscale Windows via download-tailscale-bins.sh - Build Windows/Linux via build.sh avec génération d’archive zip - Caddyfile : serve les agents en HTTPS sous /studioE5-agent* - .gitignore : ignore agent/tailscale-bin/ - Documentation du téléchargement dans SUIVI_VPN_ONDEMAND.md
This commit is contained in:
@@ -34,6 +34,40 @@ else
|
||||
MAC_BUILT=0
|
||||
fi
|
||||
|
||||
# Build Windows distribution zip (agent + Tailscale binaries)
|
||||
ZIP_NAME="${BIN_NAME}-v${VERSION}-windows.zip"
|
||||
if [ -d "tailscale-bin/windows" ]; then
|
||||
python3 - <<PY
|
||||
import zipfile, os
|
||||
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
|
||||
=======================
|
||||
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"
|
||||
}
|
||||
4. Run the agent:
|
||||
${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.
|
||||
"""
|
||||
zf.writestr("README-Windows.txt", readme)
|
||||
print(f" ${ZIP_NAME}")
|
||||
PY
|
||||
else
|
||||
echo " Warning: tailscale-bin/windows not found, run ./download-tailscale-bins.sh first"
|
||||
fi
|
||||
|
||||
# Copy versioned binaries to server/public so the dashboard can serve them
|
||||
SERVER_PUBLIC="../server/public"
|
||||
if [ -d "${SERVER_PUBLIC}" ]; then
|
||||
@@ -42,7 +76,14 @@ if [ -d "${SERVER_PUBLIC}" ]; then
|
||||
if [ "$MAC_BUILT" = "1" ]; then
|
||||
cp "${BIN_NAME}-v${VERSION}-mac" "${SERVER_PUBLIC}/${BIN_NAME}-v${VERSION}-mac"
|
||||
fi
|
||||
if [ -f "${ZIP_NAME}" ]; then
|
||||
cp "${ZIP_NAME}" "${SERVER_PUBLIC}/${ZIP_NAME}"
|
||||
fi
|
||||
echo " Copied versioned binaries to ${SERVER_PUBLIC}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Download URLs (once served by Caddy):"
|
||||
echo " https://studioe5.edudeploy.com/${BIN_NAME}-v${VERSION}.exe"
|
||||
echo " https://studioe5.edudeploy.com/${ZIP_NAME}"
|
||||
echo "Done."
|
||||
|
||||
Reference in New Issue
Block a user