在azure-java-sdk示例中有一个示例- PublishEventsWithWebSocketsAndProxy.java
// By default, the AMQP port 5671 is used, but clients can use web sockets, port 443.
// When using web sockets, developers can specify proxy options.
// ProxyOptions.SYSTEM_DEFAULTS can be used if developers want to use the JVM configured proxy.
ProxyOptions proxyOptions = new ProxyOptions(ProxyAuthenticationType.DIGEST,
new Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved("10.13.1.3", 9992)),
"digest-user", "digest-user-password");
// Instantiate a client that will be used to call the service.
EventHubProducerClient producer = new EventHubClientBuilder()
.transportType(AmqpTransportType.AMQP_WEB_SOCKETS)
.proxyOptions(proxyOptions)
.connectionString(connectionString)
.buildProducerClient();但是我不理解参数值- 10.13.1.3,digest-user,digest-user-password
是否有人能告诉我,如果这是我必须使用的,如果组织有Web App Firewall,连接到Azure
发布于 2020-09-05 21:54:12
您所指的参数是配置对代理服务器的访问。在本例中,10.13.1.3是要使用的代理服务器的地址,digest-user是用于身份验证的用户名,而digest-user-password是其密码。之所以使用这组凭据,是因为选项在示例中使用了ProxyAuthenticationType.DIGEST。
就您的场景而言,您需要如何配置客户端以使用您组织的代理,这不是通常可以回答的问题。这在很大程度上取决于您的组织如何配置环境、管理网络流量和应用安全实践。
我建议您联系组织中的IT Ops代表以获取这些信息;一旦您有了这些信息,我们可以帮助您解决在配置客户端时遇到的任何问题或问题。
https://stackoverflow.com/questions/63746910
复制相似问题