Skip to content

grpc-js: Fix the final proxy bugs #1381

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

Merged
merged 2 commits into from
Apr 22, 2020

Conversation

murgatroid99
Copy link
Member

There were a few more issues:

  • ChannelCredentials#_getConnectionOptions was returning a reference to a mutable object, which Subchannel#createSession was mutating. I changed both of those lines for defense in depth.

  • In http_proxy.ts, getProxiedConnection was resolving the promise before trying to connect with TLS. That is simply incorrect, and was probably a merge error.

  • Again in getProxiedConnection, tls.connect did not always get a servername option, which is required to set the SNI request in the TLS handshake. With that change, adding the original connectionOptions needs to be moved to the end so that the servername option from the grpc.ssl_target_name_override channel option takes precedence.

I tested this by successfully making a request to the prod interop server using TLS through an HTTP CONNECT proxy.

@murgatroid99 murgatroid99 merged commit 4946b41 into grpc:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants