GRPC从客户端到服务器转发代理

问题描述:

从nodejs或java使用grpc,使grpc客户端通过代理连接到服务器所需的属性或配置是什么?GRPC从客户端到服务器转发代理

我一直无法找到解释设置的示例或文档。我需要在代码本身做些什么吗?

我背后的代理,我不知道如果问题是我的设置不正确或我的代理不支持grpc。它支持http/2作为协议升级。在Java中

我的代理服务器设置:

-Dhttp.proxyHost=xxx.xxx.xxx 
-Dhttp.proxyPort=8888 
-Dhttp.nonProxyHosts="*.nowhere.nothing" 
-Dhttps.proxyHost=xxx.xxx.com 
-Dhttps.proxyPort=8888 
-Dhttps.nonProxyHosts="*.nowhere.nothing" 
-Dsocks.proxyHost=xxx.xxx.xxx 
-Dsocks.proxyPort=8888 
-Dsocks.nonProxyHosts="*.nowhere.nothing" 

由于GRPC的Java 1.0.3,您可以指定环境变量GRPC_PROXY_EXP与形式host:port的值。 “EXP”意味着实验性的,因为它会在grpc-java观察到正常的Java设置(如https.proxyHost)后被删除。