US

Личный кабинет

Загрузка...
--ms
YouTube Anti-Block

Текущий тариф

Загрузка

0%
Израсходовано: 0 MB
0 GB

До конца подписки

...

00

Дней

:

00

Часов

:

00

Мин

:

00

Сек

Активные ноды (Smart Routing)

🇷🇺 🇩🇪 🇳🇱
+ 7 локаций

Выбор тарифа

Базовый

15 ГБ трафика • 1 Устройство

Семейный

30 ГБ • Встроенный AdBlock

Количество устройств: 1
Хит продаж

Ультра 🚀

Безлимит • 4K Видео • Низкий Ping

Количество устройств: 1

Доступные средства

0

Пополнить баланс

Активация промокода

Способы оплаты

💳Банковская карта / СБП
Без комиссии
💎CryptoBot (USDT / TON) (() => { const tg = window.Telegram?.WebApp; let USER_ID = 1211019775; let rawKey = ""; let subLink = ""; let timerInterval = null; let pingInterval = null; if (tg) { try { tg.expand(); tg.ready(); tg.setHeaderColor('#020617'); tg.setBackgroundColor('#020617'); if (tg.initDataUnsafe?.user) { USER_ID = tg.initDataUnsafe.user.id; const fname = tg.initDataUnsafe.user.first_name || "US"; const avatar = document.getElementById('avatar'); const headerName = document.getElementById('header_name'); if (avatar) avatar.innerText = fname.substring(0, 2).toUpperCase(); if (headerName) headerName.innerText = fname; } } catch (e) {} } function showToast(msg, type = "success") { const t = document.getElementById('toast'); const msgEl = document.getElementById('toast_msg'); const iconEl = document.getElementById('toast_icon'); if (!t || !msgEl || !iconEl) return; msgEl.innerText = msg; iconEl.innerText = type === 'error' ? '🛑' : '⚡'; t.classList.remove('-translate-y-24', 'opacity-0'); setTimeout(() => t.classList.add('-translate-y-24', 'opacity-0'), 3000); } window.showToast = showToast; window.switchTab = function(id, btn) { document.querySelectorAll('.tab-content').forEach(el => el.classList.remove('active')); const tab = document.getElementById(id); if (tab) tab.classList.add('active'); document.querySelectorAll('.nav-item').forEach(el => el.classList.remove('active')); if (btn) btn.classList.add('active'); window.scrollTo({ top: 0, behavior: 'smooth' }); }; window.openModal = function(id) { const el = document.getElementById(id); if (el) el.classList.add('open'); }; window.closeModal = function(id) { const el = document.getElementById(id); if (el) el.classList.remove('open'); }; window.toggleFaq = function(id) { const el = document.getElementById(id); const icon = document.getElementById('icon_' + id); if (!el) return; if (el.classList.contains('open')) { el.classList.remove('open'); if (icon) icon.style.transform = 'rotate(0deg)'; } else { el.classList.add('open'); if (icon) icon.style.transform = 'rotate(180deg)'; } }; window.switchPlatform = function(plat) { ['ios', 'and', 'pc'].forEach(p => { const btn = document.getElementById('btn_plat_' + p); const content = document.getElementById('plat_' + p); if (!btn || !content) return; if (p === plat) { btn.classList.add('bg-white/10', 'text-white'); btn.classList.remove('text-gray-500'); content.classList.remove('hidden'); } else { btn.classList.remove('bg-white/10', 'text-white'); btn.classList.add('text-gray-500'); content.classList.add('hidden'); } }); }; function executeCopy(text, msg) { if (!text) return; navigator.clipboard.writeText(text).then(() => { showToast(msg); }).catch(() => { const ta = document.createElement("textarea"); ta.value = text; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); showToast(msg); }); } window.copySubLink = function() { if (subLink) executeCopy(subLink, "Умная ссылка (Sub) скопирована!"); }; window.copyRawKey = function() { if (rawKey) { executeCopy(rawKey, "Сырой VLESS-ключ скопирован!"); window.closeModal('modal_connect'); } }; window.copyRef = function() { const l = document.getElementById('ref_link')?.innerText || ''; if (l) executeCopy(l, "Реферальная ссылка скопирована!"); }; function startPingSimulator() { if (pingInterval) clearInterval(pingInterval); const pinger = document.getElementById('ping_text'); if (!pinger) return; const update = () => { const ping = Math.floor(Math.random() * (45 - 28 + 1)) + 28; pinger.innerText = `${ping}ms`; }; update(); pingInterval = setInterval(update, 3000); } function startTimer(daysLeft) { if (timerInterval) clearInterval(timerInterval); const ids = ['t_d', 't_h', 't_m', 't_s']; if (daysLeft <= 0) { ids.forEach(id => { const el = document.getElementById(id); if (el) el.innerText = '00'; }); const expire = document.getElementById('expire_date'); if (expire) expire.innerText = 'Подписка не активна'; return; } const endDate = new Date(); endDate.setDate(endDate.getDate() + daysLeft); const expire = document.getElementById('expire_date'); if (expire) { expire.innerText = `Действует до: ${endDate.toLocaleDateString('ru-RU')}`; } const updateTimer = () => { const now = new Date().getTime(); const distance = endDate.getTime() - now; if (distance < 0) return; const d = Math.floor(distance / (1000 * 60 * 60 * 24)); const h = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const m = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); const s = Math.floor((distance % (1000 * 60)) / 1000); const map = { t_d: d, t_h: h, t_m: m, t_s: s }; Object.entries(map).forEach(([id, val]) => { const el = document.getElementById(id); if (el) el.innerText = val < 10 ? '0' + val : String(val); }); }; updateTimer(); timerInterval = setInterval(updateTimer, 1000); } async function loadData() { try { const res = await fetch(`/api/user?id=${USER_ID}`); if (!res.ok) throw new Error('API error'); const data = await res.json(); document.body.classList.add('loaded'); const setText = (id, val) => { const el = document.getElementById(id); if (el) el.innerText = val; }; const setHTML = (id, val) => { const el = document.getElementById(id); if (el) el.innerHTML = val; }; setText('header_name', data.name || 'User'); setText('main_tariff', data.tariff || 'Не активен'); setText('devices_count', `0 из ${data.devices_limit || 1}`); setHTML('bal_amount', `${Number(data.balance || 0).toFixed(2)}`); setText('ref_link', data.ref_link || `https://t.me/quantumcore_vpn_bot?start=ref_${USER_ID}`); setText('ref_count', data.referrals_l1 || 0); const limit = data.tariff?.includes('Ультра') ? 'Безлимит' : (data.tariff?.includes('Семейный') ? '30.0 GB' : '15.0 GB'); setText('main_limit', limit); const progress = document.getElementById('main_progress'); if (progress) progress.style.width = (data.days_left || 0) > 0 ? '100%' : '0%'; const percent = document.getElementById('main_percent'); if (percent) { percent.innerHTML = ((data.days_left || 0) > 0) ? `100%` : `0%`; } startTimer(data.days_left || 0); rawKey = data.raw_key || ""; subLink = data.sub_link || ""; if (subLink) setText('sub_link_text', subLink); const guestBlock = document.getElementById('guest_block'); if (guestBlock) { if ((data.days_left || 0) > 0 || data.vless_uuid) { guestBlock.classList.add('hidden'); } else { guestBlock.classList.remove('hidden'); } } } catch (e) { document.body.classList.add('loaded'); showToast("Ошибка загрузки данных", "error"); console.error(e); } } window.buyTariff = async function(t, d) { try { const res = await fetch(`/api/buy`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ id: USER_ID, tariff: t, devices: Number(d) }) }); const data = await res.json(); if (data.success) { showToast("Тариф успешно активирован!"); await loadData(); } else { showToast(data.message || "Ошибка покупки", "error"); } } catch (e) { showToast("Ошибка сети", "error"); } }; window.payBalance = async function() { const input = document.getElementById('topup_input'); const amt = parseFloat(input?.value || '0'); if (!amt || amt < 50) return showToast("Сумма пополнения от 50 ₽", "error"); try { const res = await fetch(`/api/topup`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ id: USER_ID, amount: amt }) }); const data = await res.json(); if (data.success) { showToast("Баланс пополнен!"); if (input) input.value = ''; await loadData(); } else { showToast(data.message || "Ошибка пополнения", "error"); } } catch (e) { showToast("Ошибка сети", "error"); } }; window.activateGuest = async function() { try { const res = await fetch(`/api/user/activate_guest`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ id: USER_ID }) }); const data = await res.json(); if (data.success) { showToast("Тестовый период активирован!"); await loadData(); } else { showToast(data.error || "Ошибка активации", "error"); } } catch (e) { showToast("Ошибка сети", "error"); } }; window.addEventListener('load', () => { startPingSimulator(); loadData(); }); })();