<?php
require_once 'index.php'; // 引入配置和 API 函数

$uuid = $_POST['uuid'] ?? '';
$daemonId = $_POST['daemonId'] ?? '';
$command = $_POST['command'] ?? '';

if ($uuid && $daemonId && $command) {
    callApi('protected_instance/command', 'GET', [
        'instanceUuid' => $uuid,
        'daemonId' => $daemonId,
        'command' => $command
    ]);
}

header("Location: index.php?uuid={$uuid}&daemonId={$daemonId}");
exit;