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

[bug]system-proxy exclusion list not used #1312

Closed
BasieP opened this issue Feb 14, 2018 · 4 comments · Fixed by #3531
Closed

[bug]system-proxy exclusion list not used #1312

BasieP opened this issue Feb 14, 2018 · 4 comments · Fixed by #3531
Labels
pkg/https-proxy This is due to an issue in the packages/https-proxy directory

Comments

@BasieP
Copy link

BasieP commented Feb 14, 2018

Current behavior:

when testing a self-hosted website (like localhost:8888 in my case) the requests run trough the cypress proxy. requests not for cypress go trough to the system proxy.

Only when we request localhost:8888 (with cy.visit) we see the 404 response from our corporate proxy server.

The point is that the request shouldn't go TO the proxy server cause the host (localhost) is on the system proxy exclusion list.

When opening a new tab in the chrome spawned with cypress, we still can't go to localhost:8888

When opening my own chrome (without the cypress proxy) i CAN navigate to localhost:8888.

My cypress chrome chrome://net-internals/#proxy page says:

Effective proxy settings

Proxy server: localhost:1317  //<-- the port cypress randomizes

My normal chrome chrome://net-internals/#proxy page says:

Proxy server: proxy.mydomain.local:8080
Bypass list: 
  *.local
   127.0.0.1
  localhost
  <local>
Source: SYSTEM

(where <local> and localhost/127.0.0.1/::1 etc. are the same)

How to reproduce:

configure a system proxy server, and add localhost to the exclusion list.
Host your website (in iis, or via some npm package) on localhost, and use cy.visit to test it.

  • Operating System: windows
  • Cypress Version: 1.4.2
  • Browser Version:chrome 63
@brian-mann
Copy link
Member

There are a number of proxy related bugs in Cypress - basically we aren't respecting or handling proxies and we should. There's nothing wrong with the Chrome network proxy settings - the browser needs to route all traffic through Cypress who then needs to reroute that through your proxy server settings.

There are a few workarounds if you search for proxy in our issues you'll find. Basically setting some env vars will force the underlying libs to utilize your system proxy. It may or may not work. This is something we should get fixed but it's a lower priority than some other things we're doing.

@flotwig
Copy link
Contributor

flotwig commented Feb 22, 2019

As Brian said, all traffic (even to localhost) should flow through the Cypress proxy. This issue describes Cypress working as designed so I will close it for now.

@flotwig flotwig closed this as completed Feb 22, 2019
@flotwig flotwig added the stage: wontfix Cypress does not regard this as an issue or will not implement this feature label Feb 22, 2019
@flotwig flotwig mentioned this issue May 17, 2019
38 tasks
@brian-mann
Copy link
Member

Fixed by #3531

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 17, 2019

Released in 3.3.0.

@cypress-bot cypress-bot bot removed the stage: wontfix Cypress does not regard this as an issue or will not implement this feature label May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/https-proxy This is due to an issue in the packages/https-proxy directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants