Azure / Azure/azure-documentdb-java
How to use with proxy username and password ?
- 主要语言
- Java
- 星标
- 51
- 派生
- 52
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hii,
I am working behind the proxy network.
I tried arguments like following but it is not working.
```
-Dhttp.proxyHost=myproxy Dhttp.proxyPort=3128
-Dhttps.proxyHost=myproxy -Dhttps.proxyPort=3128
```
Following allows me add host and port of proxy, but I required to username and password as well.
`connectionPolicy.setProxy(new HttpHost(InetAddress.getByName("proxy.company.com"), 12345));`
I also tried following for authentication
```
final String authUser = "user";
final String authPassword = "password";
Authenticator.setDefault(
new Authenticator() {
@Override
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(
authUser, authPassword.toCharArray());
}
}
);
System.setProperty("http.proxyUser", authUser);
System.setProperty("http.proxyPassword", authPassword);
```
How can I use username and password for authentication for proxy.
贡献指南
评估
这个 Issue 还没有评估数据。