-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.html
More file actions
335 lines (291 loc) · 11.7 KB
/
check.html
File metadata and controls
335 lines (291 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<html lang="ru" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diagnostic — Imperior</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
<style>
:root {
--bg-page: #F9FAFB;
--bg-card: rgba(255, 255, 255, 0.8);
--text-primary: #0F172A;
--text-secondary: #64748B;
--border-color: #E2E8F0;
--accent-color: #0F172A;
--accent-text: #FFFFFF;
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
--bg-page: #000000;
--bg-card: rgba(10, 10, 10, 0.8);
--text-primary: #F1F5F9;
--text-secondary: #94A3B8;
--border-color: #1E293B;
--accent-color: #F1F5F9;
--accent-text: #000000;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-page);
color: var(--text-primary);
overflow-x: hidden;
}
#vanta-canvas {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: -1;
opacity: 0.1;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 4rem 1.5rem;
}
.header {
text-align: center;
margin-bottom: 4rem;
}
.test-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.test-item {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 1.25rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
backdrop-filter: blur(12px);
transition: transform 0.2s, box-shadow 0.2s;
}
.test-item:hover {
transform: scale(1.02);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.service-info {
display: flex;
align-items: center;
gap: 1rem;
}
.service-logo {
width: 32px;
height: 32px;
border-radius: 8px;
background: #fff;
padding: 4px;
border: 1px solid var(--border-color);
object-fit: contain;
}
.status-area {
display: flex;
align-items: center;
gap: 0.75rem;
}
.status-badge {
padding: 0.4rem 1rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 800;
text-transform: uppercase;
}
.status-pending {
background: #E2E8F0;
color: #64748B;
}
.status-ok {
background: #DCFCE7;
color: #166534;
}
.status-error {
background: #FEE2E2;
color: #991B1B;
}
.check-icon,
.error-icon {
width: 24px;
height: 24px;
border-radius: 50%;
display: none;
align-items: center;
justify-content: center;
color: white;
animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.check-icon {
background: #22C55E;
box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.error-icon {
background: #EF4444;
box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
@keyframes popIn {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.btn-check {
width: 100%;
padding: 1.5rem;
background: var(--accent-color);
color: var(--accent-text);
border: none;
border-radius: 20px;
font-weight: 800;
font-size: 1.125rem;
cursor: pointer;
margin-top: 3rem;
transition: all 0.3s;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.btn-check:hover {
transform: translateY(-4px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
filter: brightness(1.1);
}
.back-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--text-secondary);
text-decoration: none;
font-weight: 600;
margin-bottom: 2rem;
transition: color 0.2s;
}
.back-link:hover {
color: var(--text-primary);
}
</style>
</head>
<body>
<div id="vanta-canvas"></div>
<div class="container">
<a href="index.html" class="back-link">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 12H5M12 19l-7-7 7-7" />
</svg>
Назад к Империи
</a>
<div class="header">
<h1 style="font-size: 3rem; font-weight: 800; letter-spacing: -0.05em; margin-bottom: 1rem;">Диагностика
</h1>
<p style="color: var(--text-secondary); font-size: 1.125rem;">Проверка доступности ключевых сервисов через
ваш текущий туннель.</p>
</div>
<div class="test-list" id="test-list">
<!-- Items filled via JS -->
</div>
<button class="btn-check" id="check-btn">ЗАПУСТИТЬ ТЕСТ</button>
</div>
<script>
const domains = [
{ name: "YouTube", url: "https://www.youtube.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=youtube.com&sz=64" },
{ name: "Discord", url: "https://discord.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=discord.com&sz=64" },
{ name: "ChatGPT (OpenAI)", url: "https://chatgpt.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=openai.com&sz=64" },
{ name: "DeepSeek", url: "https://www.deepseek.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=deepseek.com&sz=64" },
{ name: "X.com (Twitter)", url: "https://x.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=x.com&sz=64" },
{ name: "Reddit", url: "https://www.reddit.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=reddit.com&sz=64" },
{ name: "Xbox Live", url: "https://www.xbox.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=xbox.com&sz=64" },
{ name: "Gemini (Google)", url: "https://gemini.google.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=gemini.google.com&sz=64" },
{ name: "Brawl Stars", url: "https://supercell.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=supercell.com&sz=64" },
{ name: "Instagram (Meta)", url: "https://www.instagram.com/favicon.ico", logo: "https://www.google.com/s2/favicons?domain=instagram.com&sz=64" }
];
let vantaEffect = null;
function initVanta() {
if (vantaEffect) vantaEffect.destroy();
const theme = document.documentElement.getAttribute('data-theme') || 'light';
vantaEffect = VANTA.NET({
el: "#vanta-canvas",
mouseControls: true,
touchControls: true,
minHeight: 200.00,
minWidth: 200.00,
color: theme === 'dark' ? 0xffffff : 0x000000,
backgroundColor: theme === 'dark' ? 0x000000 : 0xf9fafb,
points: 12.00,
maxDistance: 24.00,
spacing: 16.00
});
}
function renderList() {
const list = document.getElementById("test-list");
list.innerHTML = domains.map((d, i) => `
<div class="test-item">
<div class="service-info">
<img src="${d.logo}" alt="" class="service-logo">
<span style="font-weight: 700;">${d.name}</span>
</div>
<div class="status-area">
<div class="check-icon" id="check-${i}">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
</div>
<div class="error-icon" id="error-${i}">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
</div>
<span class="status-badge status-pending" id="status-${i}">ОЖИДАНИЕ</span>
</div>
</div>
`).join("");
}
async function runTests() {
const btn = document.getElementById("check-btn");
btn.disabled = true;
btn.innerText = "ИДЕТ ПРОВЕРКА...";
for (let i = 0; i < domains.length; i++) {
const badge = document.getElementById(`status-${i}`);
const check = document.getElementById(`check-${i}`);
const error = document.getElementById(`error-${i}`);
badge.className = "status-badge status-pending";
badge.innerText = "ПРОВЕРКА...";
check.style.display = "none";
error.style.display = "none";
try {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 4000);
await fetch(domains[i].url, { mode: 'no-cors', signal: controller.signal });
badge.className = "status-badge status-ok";
badge.innerText = "ДОСТУПНО";
check.style.display = "flex";
clearTimeout(timeoutId);
} catch (e) {
badge.className = "status-badge status-error";
badge.innerText = "БЛОКИРОВКА";
error.style.display = "flex";
}
await new Promise(r => setTimeout(r, 300));
}
btn.disabled = false;
btn.innerText = "ПОВТОРИТЬ ТЕСТ";
}
document.getElementById("check-btn").onclick = runTests;
// Init
const theme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', theme);
initVanta();
renderList();
</script>
</body>
</html>