Answer the question
In order to leave comments, you need to log in
How to change real IP or how to protect yourself from WebRtc?
Colleagues, good time of the day, maybe someone has come across such a task, I am writing a bot, the logic is simple, I went to the page, logged in to the personal account and went for a walk around the site. I use NODEJS + PUPPETEER. In fact, everything is simple and there are no surfing problems, but there is a moment.
Of course, I use a proxy, but I can not protect myself from webrtc, in other words, here I see the real IP. The task is to change it to any of the list. Someone may have faced the task, he broke his head. I will be grateful for any advice, only on the case of course.
Here is a snippet of the year:
const puppeteer = require('puppeteer');
async function run() {
// const domain = `https://4it.me/`;
const domain = `https://browserleaks.com/webrtc`;
const pageOptions = { waitUntil: ['networkidle0','domcontentloaded'] };
const userAgent = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134`;
const rulles = [
'geolocation',
'notifications',
'camera',
'microphone',
'background-sync'
];
const proxyUrl = `http://2.2.2.2:3000`;
const username = 'someusername';
const password = 'someusernamepassword';
let options = {
ignoreHTTPSErrors: true,
headless: false,
args: [
`--no-sandbox`,
'--start-maximized',
`--disable-setuid-sandbox`,
'--disable-infobars',
`--proxy-server=${proxyUrl}`,
`--host-resolver-rules=MAP ${domain} 2.2.2.2`,
],
defaultViewport: {
width: 1871,
height: 949
}
};
try {
const browser = await puppeteer.launch(options);
const page = await browser.newPage();
const context = browser.defaultBrowserContext();
await context.overridePermissions(domain, rulles);
await page.setUserAgent(userAgent);
await page.authenticate({ username, password });
await page.goto(domain);
} catch (e) {
console.log(e);
}
}
run();
Answer the question
In order to leave comments, you need to log in
flekst , yes, I watched this case, it works, this extension hides the fingerprint.
I'll rephrase the question a little, how can I change the browser fingerprint? The task is to launch a client (browser) with a custom fingerprint. This is where the problem lies.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question