- Клиентская часть Vue 3 + Vite - Серверная часть Node.js + WebSocket - Система авторизации и смен - Управление игровыми портами - Поддержка тем (светлая/темная) - Адаптивный дизайн 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.7 KiB
JavaScript
47 lines
1.7 KiB
JavaScript
// Простой тест радио URL
|
||
const http = require('http');
|
||
const https = require('https');
|
||
|
||
function testRadioUrl(url) {
|
||
// Добавляем протокол если его нет
|
||
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
||
url = 'http://' + url;
|
||
}
|
||
|
||
console.log('Проверяем URL:', url);
|
||
|
||
const protocol = url.startsWith('https') ? https : http;
|
||
|
||
protocol.get(url, (res) => {
|
||
console.log('Статус:', res.statusCode);
|
||
console.log('Заголовки:', res.headers);
|
||
|
||
if (res.statusCode === 200 || res.statusCode === 206) {
|
||
console.log('✅ Радио доступно!');
|
||
console.log('Тип контента:', res.headers['content-type']);
|
||
console.log('Сервер:', res.headers['server']);
|
||
} else if (res.statusCode >= 300 && res.statusCode < 400) {
|
||
console.log('🔄 Перенаправление на:', res.headers.location);
|
||
} else {
|
||
console.log('❌ Радио недоступно');
|
||
}
|
||
|
||
res.destroy();
|
||
}).on('error', (err) => {
|
||
console.error('❌ Ошибка подключения:', err.message);
|
||
});
|
||
}
|
||
|
||
// Тестируем несколько радио
|
||
console.log('\n=== Тест 1: pub0302.101.ru ===');
|
||
testRadioUrl('pub0302.101.ru:8443/stream/pro/aac/64/103');
|
||
|
||
setTimeout(() => {
|
||
console.log('\n=== Тест 2: Наше Радио ===');
|
||
testRadioUrl('nashe1.hostingradio.ru/nashe-128.mp3');
|
||
}, 2000);
|
||
|
||
setTimeout(() => {
|
||
console.log('\n=== Тест 3: DFM ===');
|
||
testRadioUrl('dfm.hostingradio.ru/dfm96.aacp');
|
||
}, 4000); |