ni / grpc-labview

gRPC client and server support for LabVIEW
MIT License
90 stars 62 forks source link

Avoid proxy issues for localhost only communication #377

Closed jasonmreding closed 2 months ago

jasonmreding commented 2 months ago

Description

This PR attempts to avoid grpc connection issues due to http proxies when communicating over loopback addresses. If we detect the target address for a gRPC channel is the localhost or equivalent, then we explicitly disable sending traffic through the proxy.

Implementation

Testing

I didn't see much in the way of an automated regression test framework so I didn't create any automated tests as part of this change. I manually tested that the following addresses worked and used the expected proxy settings:

j-medland commented 2 months ago

Could the user just specify a local env variable to specify if the proxy should be ignored for localhost etc?

https://github.com/grpc/grpc/blob/591d56e1300b6d11948e1b821efac785a295989c/doc/environment_variables.md

jasonmreding commented 2 months ago

Could the user just specify a local env variable to specify if the proxy should be ignored for localhost etc?

https://github.com/grpc/grpc/blob/591d56e1300b6d11948e1b821efac785a295989c/doc/environment_variables.md

Yes, that is an option and is what we have been telling customers to avoid these issues. However, the errors you get when this is a problem aren't very helpful, and a lot of time is wasted via support channels before getting to the bottom of what is wrong.

jasonmreding commented 2 months ago

@yash-ni @ni-sujain It looks like you have the most recently submitted PRs to the repo. Can you help me find someone to review this PR and/or give me write access to the repo so I can see who approving reviewers are?

ni-sujain commented 2 months ago

@yash-ni @ni-sujain It looks like you have the most recently submitted PRs to the repo. Can you help me find someone to review this PR and/or give me write access to the repo so I can see who approving reviewers are?

I have given you access. Thanks