Skip to content
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

grpc-js: Add HTTP CONNECT support, i.e. egress proxy support #1243

Merged
merged 5 commits into from
Feb 28, 2020

Conversation

murgatroid99
Copy link
Member

The implementation here is based pretty closely on the corresponding core code in https://github.com/grpc/grpc/blob/master/src/core/ext/filters/client_channel/http_proxy.cc. The code for establishing the connection is loosely based on this section of the tunnel-agent package, which is used by the request package for establishing HTTP CONNECT tunnels.

With this change the library handles the environment variables grpc_proxy, https_proxy, http_proxy, no_grpc_proxy, and no_proxy.

I am considering this an experimental feature for now because I am not familiar with environments with those kinds of proxies and I don't know how to test it.

@murgatroid99
Copy link
Member Author

This PR is currently not correct. The socket option that I use is actually only used by tls as the underlying connection. The http2 module does not use it at all, so this implementation will not use the proxy for plaintext connections.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants