question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support proxies and improve proxy performance

See original GitHub issue

Problem

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()
    • #1459
    • #1608
    • #1312 - described behavior is correct
    • #1039 - this timeout will be fixed once we respect proxies, but the error should still be passed through - #1013
    • #939
    • #672
  • 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

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()

For Download

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:closed
  • Created 6 years ago
  • Reactions:38
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

18reactions
tommorganshawcommented, Aug 15, 2018

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.

3reactions
cypress-bot[bot]commented, Apr 1, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found