Skip to content

grpc-js: Fix the final proxy bugs#1381

Merged
murgatroid99 merged 2 commits intogrpc:masterfrom
murgatroid99:grpc-js_proxy_fixes_final
Apr 22, 2020
Merged

grpc-js: Fix the final proxy bugs#1381
murgatroid99 merged 2 commits intogrpc:masterfrom
murgatroid99:grpc-js_proxy_fixes_final

Conversation

@murgatroid99
Copy link
Copy Markdown
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