-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Add Proxy support #701
Add Proxy support #701
Conversation
This is temporally using it's own repo whilst this PR is waiting to be merged. DefinitelyTyped/DefinitelyTyped#29745
New dependencies added: @types/http-proxy-agentAuthor: Unknown Description: TypeScript definitions for http-proxy-agent Homepage: http://npmjs.com/package/@types/http-proxy-agent
|
package.json
Outdated
@@ -129,7 +130,6 @@ | |||
"commander": "^2.18.0", | |||
"debug": "^4.0.1", | |||
"get-stdin": "^6.0.0", | |||
"https-proxy-agent": "^2.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you just removed this dependency by accident
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought by including @types/http-proxy-agent
this was no longer needed. It builds & the tests pass so I'm confused. Is this needed? Happy to revert this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's needed - the @types
go in dev dependencies and will only occur in this repo. Not in a consumer of danger
Other than that - looks good to me |
Thanks for the review. I've acted on your comments. Any more issue let me know. Once this is in I will look at adding the same change to Peril. |
👍 |
Thanks for the PR @steprescott. The Danger org conform to the Moya Community Continuity Guidelines, which means So, we've sent you an org invite - thanks steprescott 🎉 Generated by 🚫 dangerJS |
Thanks for the PR @steprescott. This PR has been shipped in v4.4.10 - CHANGELOG. |
This PR adds the ability to proxy any of the network requests made by danger to be proxied.
It uses the standard
HTTP_PROXY
&HTTPS_PROXY
environment variables and if either of them is set will then proxy those requests.To ensure the tests pass a server is created so the request can be handled but dose no assertion to ensure the request was proxied. The only addition I have added is adding the
Agent
to the request and so I have only tested that anAgent
is set on the request, not that the request can be successfully proxied as that should be covered by thehttp-proxy-agent
package.However when running
![screenshot 2018-10-18 at 12 36 10](https://user-images.githubusercontent.com/1131458/47151775-8ae48f80-d2d2-11e8-8693-a9c1a353dafc.png)
danger pr
with eitherHTTP_PROXY
orHTTPS_PROXY
set I can see that the requests are being proxied via Charles.More details can be found here.