
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@cypress/debugging-proxy
Advanced tools
A simple HTTP proxy that proxies HTTP and HTTPS requests transparently. Useful for debugging that your application works correctly with proxies.
npm i -g @cypress/debugging-proxy
## or, if you prefer yarn
yarn global add @cypress/debugging-proxy
debugging-proxy
PORT=1234 debugging-proxy
DEBUG=proxy debugging-proxy
PROXY_USER=some-username PROXY_PASS=some-password debugging-proxy
HTTPS_KEY=/path/to/key.key HTTPS_CERT=/path/to/cert.pem debugging-proxy
const debugProxy = require('@cypress/debugging-proxy')
// create an instance
const proxy = new debugProxy({
auth: { // if `auth` is set, HTTP basic authentication to the proxy will be required using these credentials
username: 'foo',
password: 'bar'
},
keepRequests: false, // if `keepRequests` is set, the proxy will store a log of requests that can be retrieved using `proxy.getRequests()`
https: { // if https is set, https.createServer will be called with this key and cert to launch the server
key: fs.readFileSync('my-key.pem'),
cert: fs.readFileSync('my-cert.pem')
}
})
// using your stubbing/spying library of choice...
spy(proxy.proxyRequestToUrl)
spy(proxy.proxySslConnectionToDomain)
// start an httpproxy on localhost:3000
proxy.start(3000).then(() => {
// make some requests using the proxy at localhost:3000, then...
expect(proxy.proxyRequestToUrl).to.be.calledWith('http://google.com')
expect(proxy.proxySslConnectionToDomain).to.be.calledWith('google.com')
expect(proxy.getRequests().find(incomingMessage => incomingMessage.ssl === false)).to.exist
// clean up
proxy.stop().then(() => {
console.log('All done!')
})
})
FAQs
node-debugging-proxy ===
The npm package @cypress/debugging-proxy receives a total of 3,969 weekly downloads. As such, @cypress/debugging-proxy popularity was classified as popular.
We found that @cypress/debugging-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.