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

Add usage of no_proxy to proxy use documentation #183

Open
i2blind opened this issue Apr 14, 2022 · 3 comments
Open

Add usage of no_proxy to proxy use documentation #183

i2blind opened this issue Apr 14, 2022 · 3 comments

Comments

@i2blind
Copy link

i2blind commented Apr 14, 2022

Meta -

Watir Version: N/A
Selenium Version: N/A
Browser Version: N/A
Browser Driver Version: N/A
OS Version: N/A

Expected Behavior -

proxy documentation found at http://watir.com/guides/proxies/
should contain references on how to add noproxy or no_proxy to the proxy object.

no_proxy is important for modern authentication methods like azure_ad where the watir
needs to communicate to an internal application but also reach out on the internet to outside resouces like azure. The proxy may not have access to the internal network causing tests to tail.

proxy = {
http: 'my.proxy.com:8080',
ssl: 'my.proxy.com:8080',
no_proxy: "company.com,company.net"
}

Actual Behavior -

proxy = {
http: 'my.proxy.com:8080',
ssl: 'my.proxy.com:8080'
}

The correct usage of either no_proxy or noProxy, whichever is correct, is not referenced.

Thank you for taking a look.

@titusfortner
Copy link
Member

What all is allowed is here, but I don't have any working examples to show:
https://w3c.github.io/webdriver/#proxy

Ruby Selenium converts correct Ruby conventions (Symbols with snake case) to Strings with Camel Case, so you don't have to worry about that part.

@titusfortner titusfortner transferred this issue from watir/watir Apr 15, 2022
@i2blind
Copy link
Author

i2blind commented Apr 15, 2022

My experimentation shows that no_proxy works for both chrome and firefox.
however it seems that firefox is okay with something like "company.com,company.net" while this utterly fails for chrome. chrome needs '.company.com,.company.net'

      when 'chrome'
        if ENV.has_key?('PROXY')
          driver_options[:proxy] = {
            http: ENV['PROXY'],
            ssl: ENV['PROXY'],
            no_proxy: '*.company.net,*.company.com'
          }
        end

and for firefox

      when 'firefox'
        if ENV.has_key?('PROXY')
          driver_options[:proxy] = {
            http: ENV['PROXY'],
            ssl: ENV['PROXY'],
            no_proxy: 'company.net,company.com'
          }
        end

I was just guessing on chrome needing the *. but it seems to work. couldn't find much out there on what no_proxy should exactly contain.

@titusfortner
Copy link
Member

Spec says it should be a list of Strings, what if you put those values in an array?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants