-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 Authentication #1802
Comments
Having this same issue trying to add a proxy that requires authentication. I am utilizing Chrome but it still doesn't allow me to pass in a proxy with authentication. |
Hi, I'm using chromedriver with selenium python. I still cannot find a way to correctly handle proxy authentication, and all the methods I find through googling fail on my case. Any suggestions? |
I'm using geckodriver and also having issues when trying to use a proxy with basic auth. This is using Firefox 58 profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", ip)
profile.set_preference("network.proxy.http_port", port)
profile.set_preference("network.proxy.ssl", ip)
profile.set_preference("network.proxy.ssl_port", port)
credentials = '{}:{}'.format(proxy_info['username'], proxy_info['password'])
credentials = b64encode(credentials.encode('ascii')).decode('utf-8')
# b64 encode username and password as is required by the `Proxy-Authentication` header
profile.set_preference("extensions.closeproxyauth.authtoken", credentials) |
2019 still same issue, 1027 days now :) |
Still no way to enter Username and password.... |
Please it looks like, we all need this feature. Any expected delivery date or workaround ? |
@cgoldberg any hints ? I have tried:
OR
Nothing works, Thanks |
As a workaround, you can install any proxy add-on for firefox and send the basic authorization as a header - Basic {username:password} |
@adiohana thanks for your feedback. I'll check that workaround. So no straightforward way to do it... since I need to check for other webbrowser (IE, Chrome). |
@viseth I'm sure there is a proper way to do it and fix the issue. I will try to dig deeper but it will take some time. |
@adiohana definitly if you can me to some example, it will be great and save me time. Thanks a lot ! |
Code for extension is:
I'm using the localStorage to pass the username and password because I need it to be dynamic. If your's is always the same, you can state the value in the extension itself.
Then, when you launch your WebDriver, you can install the extension, get it's uuid and add values to localStorage like this: |
This is crazy that this is still broken :( |
@adiohana, I've used that trick as far as I don't need headless, but now I need headless and it is not possible in that mode :( |
@oleksiivasylenko |
Thank you @adiohana! |
Closed in favour of #6644, thanks for pointing it out @luke-hill |
Hey there @adiohana , attempting to use this solution for my Selenium app. How are you grabbing the internal UUID after loading the extension? |
i recently answered in SO |
@adiohana mind if I take a quick peek at your maifest.json? |
`{ "permissions": [ |
Background
I'm using
capybara
(2.6.2) to build anrspec
-extension calledproxy_rb
to do TDD of our HTTP proxy environments. Setting the proxy without any proxy authentication works fine. Authentication against proxies using theBASIC
-scheme does not work.This is a followup to SeleniumHQ/selenium-google-code-issue-archive#5209. Hope there's no other issue about this issue. I found none.
Expected Behavior -
Selenium enters Username + Passwort for Proxy Authentication in Firefox.
Actual Behavior -
Firefox shows Username + Passwort-Form which is closed after a short time span.
The text was updated successfully, but these errors were encountered: