-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-basic-proxy.js
More file actions
33 lines (26 loc) · 1010 Bytes
/
test-basic-proxy.js
File metadata and controls
33 lines (26 loc) · 1010 Bytes
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
const puppeteer = require('puppeteer');
async function testBasicProxy() {
console.log('🔍 Базовый тест прокси...');
try {
// Простейший тест с минимальными настройками
const browser = await puppeteer.launch({
headless: true,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--proxy-server=http://qqfL1uPu:WcGxxjVf@166.1.118.214:63574'
]
});
const page = await browser.newPage();
// Проверяем IP адрес
console.log('Проверяем IP через прокси...');
await page.goto('https://httpbin.org/ip');
const content = await page.content();
console.log('Ответ:', content.slice(0, 200));
await browser.close();
console.log('✅ Базовый тест прошел успешно');
} catch (error) {
console.error('❌ Ошибка в базовом тесте:', error.message);
}
}
testBasicProxy();