-
Notifications
You must be signed in to change notification settings - Fork 509
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
Option to add proxy #166
Comments
Looking through proxy-related issues in that project (such as grpc/grpc-go#1446), it appears that a proxy can be used by simply setting environment variables. I will investigate and report back how to set that up. However, that linked issue above does state some limitations with the support of proxies that will apply here. |
@jhump Is there any update here? Trying to get grpcurl to proxy traffic through tools like Charles or Proxyman. |
It looks like the Go runtime for gRPC, which is what grpcurl uses under its hood, supports environment variables in a similar fashion as curl and python: HTTP_PROXY, HTTPS_PROXY, and NO_PROXY can inform the program how to route a request through a proxy. So I think the following might work. Please try it out:
|
@jhump I've tried this with |
Same here:
|
The proxy settings are overridden by the customized dialer:
It looks like this is the recommended path to take for proxy setting administration according to grpc/grpc-go#1446 |
@terinjokes and @Z5eyhS0uubejR0SVmX2O, thanks for trying it out. I'm sorry that didn't work. I'll have to do more research to understand how to correctly do the proxying using a custom dialer and then figure out a way to test. If you have the inclination to investigate and then implement and test a fix, I'd happily accept a pull request. |
Hi! Is there any option to implement this or it is not planned atm? |
This commit adds support for the HTTPS_PROXY environment variable. At the moment the NO_PROXY environment variable is ignored, please be aware of that! This should close fullstorydev#166
Is there a plan to implement it? |
It would be great if this were supported. There already seems to exist a suitable PR? |
I have submitted two potential fixes for this issue based on how The first fix removes the custom If a custom dialer is required, another approach may be to port the |
@jhump or @dragonsinth: Just checking in to see if there is any feedback on #480 or #481? Thanks! |
Ideally this would respect the |
Both #480 and #481 leverage the standard library's |
Another contestant |
@dragonsinth, is there any possibility of moving forward without input from @jhump? I've been using #480 for several weeks and have not encountered any issues... Granted, I have not done anything too advanced, such as mTLS, but #480 should be fairly easy to revert if it does prove to cause any issues. |
well, I have a suggestion,since the description of grpcurl project is "Like cURL, but for gRPC", I think not only the environment variables , but also the the command line flags like |
Aight, let's just go with the "delete custom dialer and let gRPC do its thing" and see how that does. Thanks for all the contributions and discussion everyone. |
#480 merged |
@dragonsinth: Thanks for all your help with this one. Will you be cutting a new release? |
Eventually, be we don't have extreme urgency around it since people can always |
Sounds good. FWIW, I have use cases where I would like to install the pre-built binaries from https://github.com/fullstorydev/grpcurl/releases in environments without golang. |
Is there any option to forward the traffic via any app proxy? This will help in easy edit of json requests and understanding of full http requests.
The text was updated successfully, but these errors were encountered: