feat(vpn): VPN on-demand Tailscale + agent studioE5 standalone

- Agent studioE5 standalone en Go (console + systray)
- VPN on-demand via tailscaled + tailscale up (authkey Headscale)
- Resolver/serveur dans le tailnet studioe5
- Caddy on-demand TLS pour les instances
- Nouveaux endpoints serveur /api/internal/send-to-node
- Suppression des anciens binaires edubox-agent
- Suivi dans SUIVI_VPN_ONDEMAND.md
This commit is contained in:
EduBox Dev
2026-06-23 09:48:00 +00:00
parent dd49993157
commit 124543d658
40 changed files with 1303 additions and 485 deletions
+4 -1
View File
@@ -11,7 +11,10 @@ export async function GET(req: NextRequest) {
return NextResponse.json({ ok: false }, { status: 400 });
}
if (domain === MAIN_DOMAIN || domain === `headscale.${MAIN_DOMAIN}`) {
if (
domain === MAIN_DOMAIN ||
domain === `headscale.${MAIN_DOMAIN}`
) {
return NextResponse.json({ ok: true });
}
+4 -3
View File
@@ -1,12 +1,13 @@
import { NextResponse } from "next/server";
const AGENT_VERSION = "0.3.0";
const AGENT_BIN_NAME = "studioE5-agent";
export async function GET() {
return NextResponse.json({
version: AGENT_VERSION,
windows: `/edubox-agent-v${AGENT_VERSION}.exe`,
linux: `/edubox-agent-v${AGENT_VERSION}`,
mac: `/edubox-agent-v${AGENT_VERSION}-mac`,
windows: `/${AGENT_BIN_NAME}-v${AGENT_VERSION}.exe`,
linux: `/${AGENT_BIN_NAME}-v${AGENT_VERSION}`,
mac: `/${AGENT_BIN_NAME}-v${AGENT_VERSION}-mac`,
});
}
@@ -0,0 +1,12 @@
import { NextRequest, NextResponse } from "next/server";
import { sendToNode } from "@/lib/websocket";
export async function POST(req: NextRequest) {
const body = await req.json();
const { nodeId, message } = body;
if (!nodeId || !message) {
return NextResponse.json({ error: "Missing nodeId or message" }, { status: 400 });
}
const sent = sendToNode(nodeId, message);
return NextResponse.json({ sent });
}