-
Notifications
You must be signed in to change notification settings - Fork 982
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
HTTP proxy improvments (http_proxy
et al)
#878
Comments
Some trace logging from proxy and no_proxy would help, as well, IMO. |
Options should override env vars. @trentm Please feel free to work on a patch, that would be awesome. Btw, we've split out the client into its own repo now, https://github.com/restify/clients so feel free to send a PR there. |
|
TIL about https://github.com/restify/clients That's great. |
It's also an NPM module. On 13 August 2015 at 15:25, Trent Mick notifications@github.com wrote:
|
This improves handling for a 'proxy' for the restify client: - support for passing in a proxy *string*, e.g.: restify.createClient({proxy: 'http://localhost:8080', ...}); - proxy auth is properly parsed out of the proxy string - 'options.proxy' overrides the http[s]_proxy envvars - changes to which envvars (and preferred order) are used Backward incompat: The "https_proxy" envvar will no longer be used for proxying to an "http://" URL. This is effectively a start at restify#878 for restify v2.8.x.
… a different structure for 'agent.sockets')
TritonDataCenter@afdfb77 is a second commit related to this. This is currently on the v2.8 branch of the fork of node-restify. Eventually I need to (a) get these on a "v2.8" branch of restify/node-restify and (b) port these to restify/clients. |
Some notes on proxy-related envvars in some tools:
Suggestions for restify:
|
http_proxy
et al)
@yunong @DonutEspresso Finally have a restify-clients 1.x PR for this here: restify/clients#85 |
…85) * changelog entry for http proxy improvments * updates from yunong feedback: move TODO to a ticket, prefer 'self.'
restify-clients@1.4.0 published with this. @yunong @DonutEspresso What's a policy, if any, for getting clients changes into node-restify/lib/clients? Are we just EOL'ing the clients there? |
Yep, barring critical bugs or security issues, we haven't been back porting any changes into the node-restify repo. |
Cool, thanks. I think this can be closed then. Restify 5.x doesn't have the clients... and restify-clients doesn't have a 2.x stream yet. |
Some comments on https://github.com/restify/node-restify/blob/master/lib/clients/http_client.js#L366-L378
Some issues here:
the leading 'http://'. This works with curl. It should with restify
clients as well.
options.proxy
is given, it should override the envoptions.proxy
shouldn't have to be parsed already. This should allowa URL string (arguably it should prefer that form). Parsing the URL
is implementation guts.
isProxyForURL|NO_PROXY
handling should be overrideable viaoptions
as well. I'm undecided, but leaning toward thinking thatNO_PROXY should be ignore if
options.proxy
is given. I.e. ifthe programmer passed in
options.proxy
, they are intentionallyoverriding the environment. If they want the env, they could easily
also pull and pass in
options.no_proxy
.Thoughts? /cc yunong and others.
If it seems reasonable to others I could work on a patch.
The text was updated successfully, but these errors were encountered: