-
Notifications
You must be signed in to change notification settings - Fork 27
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
HTTPS proxy support #3
Comments
Hi. Sorry for the delay. I'm willing to consider a pull request for such a change. I think this custom agent should be settable both through the constructor or a setCustomAgent method (which could accept undefined or null to remove the agent). Let me know if you want to discuss this further. Thanks. |
Hi, Alright, I'll integrate such changes into the code base in a couple weeks (I'm currently on holiday), test it and send a pull request. |
…tor and a setter. Fixes ovh#3. Signed-off-by: Lionel Debroux <[email protected]>
…tor and a setter. Fixes ovh#3. Signed-off-by: Lionel Debroux <[email protected]>
…tor and a setter. Fixes ovh#3. Signed-off-by: Lionel Debroux <[email protected]>
…tor and a setter. Fixes ovh#3. Signed-off-by: Lionel Debroux <[email protected]>
…tor and a setter. Fixes ovh#3. Signed-off-by: Lionel Debroux <[email protected]>
Stil no support for proxy settings ? |
For the poor guys and girls among us who have to deal with HTTPS proxies, a way to tell the ovh module that the .request method should attempt to access the OVH HTTPS API through a proxy would be great :)
AFAICT, the proper way to have HTTP/HTTPS requests go through a proxy is to pass an instance of https.Agent ( https://nodejs.org/api/https.html#https_class_https_agent ) as 'agent' property of the 'options' argument to https.request().
One of the ways to create such agents is https://www.npmjs.com/package/tunnel-agent , which has the same API as https://www.npmjs.com/package/tunnel .
I could attempt to contribute a patch by myself, but I'd rather discuss the direction with the maintainer up front. I can see at least three reasonable ways to pass the agent to an instance of the ovh module for .request() to use (.loadSchemasRequest() already takes options passed directly to https.get()):
and at least a dirty way: pass the agent through a specially-named property of the 'params' argument to ovh.request(), which is probably what I'll attempt to use for my own purposes, as a temporary measure.
Your preference may not match mine, and might not even be listed here :)
The text was updated successfully, but these errors were encountered: