Support proxies and improve proxy performance
See original GitHub issueProblem
There are several users with corporate proxy issues that are faced at several layers of interacting with Cypress including during:
(a checkmark indicates that a fix is in #3531)
cy.visit()
npm install
cypress verify
(maybe?)- #787 - not a proxy issue, but the issues described in comments are, and will be fixed
- accessing the ‘Runs’ tab within the Test Runner
- verifying that the server set at
baseUrl
is running
Things that won’t be fixed as part of this issue
- PAC support - workarounds exist, see https://on.cypress.io/proxy-configuration
- #584 - SOCKS proxy - more in-depth changes would be required to add SOCKS support - workarounds exist, see https://on.cypress.io/proxy-configuration
- #1352 - SSL verification issue
- #1401 - SSL verification issue -
NODE_EXTRA_CA_CERTS
not being used in cy download - #1438 - cy proxy hiding the actual issue
- #1013 - network errors mishandled - related: #1036
- #1253 (dupe: #3124, #1468) - system policy - could potentially either bypass (hard) or warn the user (easy) or only allow electron - workarounds exist
Current workarounds:
Setting environment variables
Note: these are NOT cypress environment variables, but system/shell environment variables
- If using Linux, you can read about setting and reading env variables here
- If using Windows, you can read about setting and reading env variables here
Set HTTP_PROXY
and/or HTTPS_PROXY
to your corporate proxy
HTTP_PROXY=http://my-proxy-address cypress run
Set NO_PROXY
for localhost
to prevent it from hitting corporate proxy
NO_PROXY=localhost cypress run
Other workarounds
For cy.visit()
- Enable permissions in the Cypress chrome extension
- Check the Chrome ProxyMode if you have administration rights
- Try using Electron
For Download
- Try the direct download if you’re having issues during install.
- Workaround for install using
CYPRESS_BINARY_VERSION
.
For accessing ‘Runs’ tab in Test Runner
- If you need to set up a project, you have to do it in this tab. Fortunately, you should only need to do this once. Try to do this once outside of the corporate proxy then you should be good to go.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:38
- Comments:22 (6 by maintainers)
Top Results From Across the Web
Why use a reverse proxy? - Loadbalancer.org
Reverse proxies help increase performance, reliability, and security. They provide load balancing for web applications and APIs.
Read more >How to track uptime and performance effectively with proxies
Using proxies for the uptime and performance tracking you can improve your efficiency and automate certain processes. Here is how this tool can...
Read more >Performance-enhancing proxy - Wikipedia
Performance -enhancing proxies (PEPs) are network agents designed to improve the end-to-end performance of some communication protocols.
Read more >The What and Why of Programmable Proxies - InfoQ
SN Requirement Configuration (squid, httpd, nginx) Configuration Language (varnish...
1. Connectivity * * * * * * * * * *
2. Reliability * *...
Read more >API Proxy Performance | Apigee Edge
You can view metrics for all proxies or drill into specific proxies using the Proxy dimension dropdown menu at the top of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve read everything I can find on this issue and tried every suggested workaround but Cypress still cannot connect to websites through our corporate proxy.
When will this feature be implemented? It is a massive blocker for any possibility of adoption within our team.
The code for this is done in cypress-io/cypress#3531, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.