-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-page-proxy.js
More file actions
51 lines (40 loc) · 1.52 KB
/
test-page-proxy.js
File metadata and controls
51 lines (40 loc) · 1.52 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
const puppeteer = require('puppeteer');
async function testProxyWithPage() {
console.log('🔍 Тест прокси через настройки страницы...');
try {
const browser = await puppeteer.launch({
headless: 'new',
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-web-security',
'--disable-features=VizDisplayCompositor'
]
});
const page = await browser.newPage();
// Настраиваем прокси для конкретной страницы
await page.authenticate({
username: 'qqfL1uPu',
password: 'WcGxxjVf'
});
// Альтернативный метод - используем CDP (Chrome DevTools Protocol)
const client = await page.target().createCDPSession();
await client.send('Network.setUserAgentOverride', {
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
});
console.log('Пробуем прямое подключение к pump.fun...');
await page.goto('https://pump.fun', {
timeout: 30000,
waitUntil: 'domcontentloaded'
});
const title = await page.title();
const url = await page.url();
console.log('Заголовок:', title);
console.log('URL:', url);
console.log('✅ Подключение к pump.fun успешно');
await browser.close();
} catch (error) {
console.error('❌ Ошибка в тесте:', error.message);
}
}
testProxyWithPage();