Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy #59

Open
Andreito95 opened this issue Jan 17, 2023 · 3 comments
Open

Proxy #59

Andreito95 opened this issue Jan 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Andreito95
Copy link

Authenticated proxy doesn't load correctly, if i check "whatismyipaddress" on the driver i get my real IP

@shaikhsajid1111
Copy link
Owner

What browser it was? Google Chrome Or Mozilla Firefox? Can you please share more details?

@Andreito95
Copy link
Author

Andreito95 commented Jan 26, 2023

it's the same, proxy (with authentication user/pass) doesn't work with both Chrome or Mozilla.
I have 10000 rows of python code with implemented Selenium browser, the only way to user proxy with authentication is Chrome and use an extension with a json file like this (you can find code around the web):

pluginfile = 'proxy_auth_plugin.zip'
with zipfile.ZipFile(pluginfile, 'w') as zp:
zp.writestr("manifest.json", manifest_json)
zp.writestr("background.js", background_js)
chrome_options.add_extension(pluginfile)

I am trying to find a better way (with both chrome or mozilla, i don't care) that works without exstentions (i would like to disable extensions but i can't because of this one for proxy on chrome).
Another thing i can tell you is that it's not possible to save cookies with Chrome with this extension, because it will give problems with proxy authentication, so i am actually using Chrome without cookies and with this extension to use it with proxy with user/pass auth.

I tried your code and i found lot of good and perfect funcitons, but if you can find a solution for the proxy with authentication it will be really helpful to me.
Tried both mozilla and chrome with your code and put right string "user:pass@ip:port", browser opens correctly but if you open "whatismyipaddress.com" it will show you the real IP (and not the proxy one), so it doesn't work.

@shaikhsajid1111
Copy link
Owner

I think you're right about this. Selenium doesn't have proper functionality when it comes to using an authenticated proxy. Even I encountered the same problem when I once used an authenticated proxy, yeah that problem is available to use some chrome extensions. I think it is the only option even I see is working. If I find some better solution somewhere I would love to implement it here but currently, I don't have one.

I think if your proxy provider provides whitelisting feature then you should consider using it, just whitelist the server although it doesn't really focus on the problem it does gives you an alternative way.

@shaikhsajid1111 shaikhsajid1111 added the bug Something isn't working label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants