ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.72k stars 1.14k forks source link

WebRTC leak if using proxies... #228

Open petzi75 opened 3 years ago

petzi75 commented 3 years ago

as I wrote, tested with using socks5 -> it should be possible to deactivate WebRTC or spoofing

Today it leaks the original IP (https://browserleaks.com/ip)

SilverStrings024 commented 3 years ago

It looks like there may be a possible fix or two but one seems to, maybe, require patching the binary? I'm honestly not sure about it but this is what I found.

References Disabling within selenium its self - https://stackoverflow.com/questions/65705775/python-disable-webrtc-detection-in-selenium-chromedriver

Disabling for chromium based apps and the general IP leak - https://stackoverflow.com/questions/55540694/how-to-disable-webrtc-in-chromium

bananb commented 3 years ago

git clone https://github.com/aghorler/WebRTC-Leak-Prevent extensions/webrtc extension_path = os.getcwd() + '/extensions/webrtc'; options.add_argument(f'--disable-extensions-except={extension_path}') options.add_argument(f'--load-extension={extension_path}')

petzi75 commented 3 years ago

thanks for answers. All turnarounds on driverlevel didn`t work clean and not 100% I found best way was to combine it with an ext. program, called proxifier. Not so beautiful, but it seems to work accurate...

skndrvoip commented 3 years ago

@petzi75 do you have method to block webrtc leak ip whith undetected chrome while we cannot use experimental

SilverStrings024 commented 3 years ago

@petzi75 do you have method to block webrtc leak ip whith undetected chrome while we cannot use experimental

You can use an add-on like "ublockOrigin" or "WebRTC Leak Prevent" but that's about all you can do since you can't disable WebRTC in chrome browsers. Not sure if you can modify chromium its self or not but may be worth a shot/investigating.

skndrvoip commented 3 years ago

@SilverStrings024 you mean extension chrome if yes how to manage it with undetected chrome?

SilverStrings024 commented 3 years ago

@SilverStrings024 you mean extension chrome if yes how to manage it with undetected chrome?

It looks like if you're running it headless, you can't have add-ons enabled. This talks about using xvfb but still renders to a virtual display. So, as of right now...in headless you can't use addons but you can 'fake' headless with xvfb I believe. As stated in the link above, google never made it possible to lead extensions while headless which is a bit sad.

skndrvoip commented 3 years ago

i forget that you are right so we must found way to patch the driver i think

SilverStrings024 commented 3 years ago

i forget that you are right so we must found way to patch the driver i think

Yeah but that's going to be pretty difficult without changing Chromium its self. As a temp (really it's not even a fix) fix someone can try to do something fancy with xvfb to fake a headless chromium but short of that I don't really see a way we can patch the driver to disable WebRTC. I mean, we can do some experimenting to see if we can interrupt it or at the least spoof it but I haven't used Chromium nor this package long enough to know off the top of my head how to do that.

Maxhem2 commented 11 months ago

Bumb, still active or fixed?