Azure / Azure/azure-documentdb-java

How to use with proxy username and password ?

Đang mở
#76 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
investigating
Ngôn ngữ chính
Java
Star
51
Fork
52
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.