Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Server Support in .NET Core #434

Open
cyberprune opened this issue Feb 15, 2018 · 7 comments
Open

Proxy Server Support in .NET Core #434

cyberprune opened this issue Feb 15, 2018 · 7 comments
Assignees

Comments

@cyberprune
Copy link

Is it possible to set a proxy server for the .NET Core client, with proxy authentication too?

I have tried setting the ConnectionPolicy.ConnectionMode to Gateway and ConnectionPolicy.ConnectionProtocol = Https, but it doesn't automatically pickup the current proxy. I can't see any way to provide a HttpClientHandler to set proxy details.

@kirankumarkolli
Copy link
Member

@ausfeldt please look into this.

@joshiamit05
Copy link

I have the same issue - haven't found a solution yet. Is there a way this can be fixed sooner?

@mrunks
Copy link

mrunks commented Jul 26, 2018

I have the same problem at my company. Its a show stopper if I cannot programmatically set the proxy like I can in the HTTPClient class.

@AdrianSanguineti
Copy link

@cyberprune, I've managed to get Microsoft to add this as a feature in 2.2.0 of the SDK which was just released 2 days ago. The DocumentClient class now accepts an optional HttpMessageHandler parameter which will allow you set the proxy details through a HttpClientHandler.

@cyberprune
Copy link
Author

@AdrianSanguineti thanks so much, we will give it a go in our app for development

@nulltoken
Copy link

@AdrianSanguineti From what I see, the handler has only be added to one of the ctors of the DocumentClient class.

Which means that, for instance, if I'm setting behind a corporate proxy AND willing to use a specified jsonSerializerSettings, I'm up for quite a challenging choice.

@AdrianSanguineti
Copy link

@nulltoken, by saying "willing" I assume you mean "need to". I'm not sure what the design reason for that was. Maybe @kirankumarkolli could explain? jsonSerializerSettings wasn't on my list of requirements when I asked him to add HttpMessageHandler support.

Version 3 is now available and with source, so perhaps you can address the short coming there? I do also notice that v3 of DocumentClient doesn't have HttpMessageHandler support yet either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants