Files
cypress/packages/network
Zach Bloomquist 53be237d11 Fix proxy slowdown with intercepted HTTPS requests (#6705)
* use 2x chrome total time as benchmark

* set TLS minVersion to v1 only if connection already failed with TLS version mismatch

* correct percentile function

* assert at least 1000 requests were made

* setNoDelay on HTTPS-over-HTTPS requests

* allow for tests with HTTPS upstreams to be slightly slower

* try 3x

* add note for add'l multiplier on httpsUpstreamProxy
2020-03-11 17:24:48 -04:00
..

network

This package contains networking-related classes and utilities.

Exports

You can see a list of the modules exported from this package in ./lib/index.ts. Here is a brief description of what's available:

  • agent is a HTTP/HTTPS agent with support for HTTP/HTTPS proxies and keepalive whenever possible
  • allowDestroy can be used to wrap a net.Server to add a .destroy() method
  • blacklist is a utility for matching glob blacklists
  • concatStream is a wrapper around concat-stream@1.6.2 that makes it always yield a Buffer
  • connect contains utilities for making network connections, including createRetryingSocket
  • cors contains utilities for Cross-Origin Resource Sharing
  • uri contains utilities for URL parsing and formatting

See the individual class files in ./lib for more information.

Building

Note: you should not ever need to build the .js files manually. @packages/ts provides require-time transpilation when in development.

yarn lerna run build-prod --scope @packages/network --stream

Testing

Tests are located in ./test

To run tests:

yarn lerna run test --scope @packages/network --stream
yarn lerna run test-watch --scope @packages/network --stream
yarn lerna run test-debug --scope @packages/network --stream