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

Skip active connections when proxy is configured #1863

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Aug 28, 2022

Fixes #1832

tl;dr; HTTPS proxy tunnels a request through another request. This is different from the standard behavior to open a socket. Fallback to passive connectivity when HTTPS proxy tunnel is present.

Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is looking good.

  • ideally @captainsafia would review as well
  • can you please update the PR description with the summary of impact on loadbalancing when proxy is set (what will be the behavior observed by user?).

}

private static HttpHandlerContext CalculateHandlerContext(GrpcChannelOptions channelOptions)
private static HttpHandlerContext CalculateHandlerContext(Uri address, bool isSecure, GrpcChannelOptions channelOptions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for consistent ordering of address and isSecure parameters between methods.

Suggested change
private static HttpHandlerContext CalculateHandlerContext(Uri address, bool isSecure, GrpcChannelOptions channelOptions)
private static HttpHandlerContext CalculateHandlerContext(GrpcChannelOptions channelOptions, Uri address, bool isSecure)

@JamesNK JamesNK merged commit 5a0b1ee into grpc:master Dec 8, 2022
@JamesNK JamesNK deleted the jamesnk/proxy-experiements branch December 8, 2022 08:23
@fmg-lydonchandra
Copy link

Thanks for this, I learnt that Grpc proxy works only when Grpc service is running as HTTPS.
I am proxying Grpc Client call through Charlesproxy/Fiddler.

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.

Grpc.Net >= 2.44.0 does not pick up HTTPS_PROXY environment variable
4 participants