grpc / grpc

The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

Home Page:https://grpc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't specify no GRPC proxy when HTTPS/HTTP proxies exist on Windows

hcosmin opened this issue · comments

What version of gRPC and what language are you using?

1.39.1, C++, but the issue still exists on main

What operating system (Linux, Windows,...) and version?

Windows 10

What runtime / compiler are you using (e.g. python version or version of gcc)

Visual Studio 2019

What did you do?

I have HTTP_PROXY and HTTPS_PROXY environment variables set
I want no proxy for GRPC requests

In http_proxy.cc you check:
if (uri_str[0] == '\0') goto done;

But in Windows I can't specify a zero-length environment variable, and therefore can't disable the GRPC proxying while HTTP proxying is enabled

What did you expect to see?

No proxy used for GRPC requests. Some other GRPC_PROXY value that means don't use a proxy ?

The channel arg GRPC_ARG_HTTP_PROXY would be better for your purposes. It would take preference over the environment variables.