Open petrpatek opened 4 weeks ago
I believe we already have something like this, its just not enabled by default, cc @barjin
Yes, you can effectively disable WebRTC in the browser by generating a fingerprint with mockWebRTC: true
(and injecting it). As far as I remember, the patch creates a Proxy object that catches all function calls and just immediately resolves with undefined
(and does this recursively) - something like your patch for navigator.mediaDevices.getUserMedia
.
Can you please verify that mockWebRTC
works for you? If it broke in some cases, I'm more than happy to switch for your implementation - I always thought the current one was a little bit crude. Cheers!
Describe the feature A feature to prevent WebRTC leaks in Chrome, specifically to secure real/local IP information.
Motivation For web scraping, preventing WebRTC leaks is essential. Blocking IP leaks through WebRTC helps maintain the scraper’s anonymity, even when using VPNs or proxies, reducing the risk of detection and IP exposure.
Constraints
Proposed solution for Chrome I have tested this one in Chrome in the unblocking project I am working on, and it worked. see the attached screenshot.
I am not sure if this is the right repository for this particular issue since I see there is already a code for it, but it is not used in any of our crawlers.
Before in default playwright crawler:
After: