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

http proxy issue #5

Closed
wundram opened this issue Feb 5, 2014 · 7 comments
Closed

http proxy issue #5

wundram opened this issue Feb 5, 2014 · 7 comments

Comments

@wundram
Copy link

wundram commented Feb 5, 2014

I didn't see this in the interface, but is there a way to set this up to have this open connections through an http proxy server?

@ghost
Copy link

ghost commented Feb 5, 2014

It uses the default WinHTTP proxy setting. Please refer to http://technet.microsoft.com/library/cc731131(WS.10).aspx#BKMK_5 for more information.

@ghost ghost closed this as completed Feb 5, 2014
@wundram
Copy link
Author

wundram commented Feb 7, 2014

That doesn't seem to be working for us, and we will probably need the ability to set the proxy programatically. Would it be possible to pass our own http_client_config instance in to be used when creating the underlying http_clients?

@ghost ghost reopened this Feb 7, 2014
@ghost
Copy link

ghost commented Feb 7, 2014

Thank you for your feedback. We will file a feature request.

However, I would like to understand why it doesn't work for you. When you run "netsh winhttp show proxy" on an administrator command prompt, does it show you the correct settings?

@wundram
Copy link
Author

wundram commented Feb 13, 2014

It does show the right settings, but for some reason the C++ REST SDK doesn't work with them if we use the default settings, we have to retrieve them with the WinHttpGetIEProxyConfigForCurrentUser API to get the proxy settings and fill out a http_client_config object. I think this is a known issue with the REST SDK.

Also, we have a requirement for the application we are using this for that we be able to set the proxy settings for the application in a config file (if they are not set, we use the proxy settings from IE).

@ghost
Copy link

ghost commented Feb 13, 2014

We already filed a feature request, so we will definitely consider that.

For the default proxy issue, please note that WinHTTP does not inherit proxy settings from the browser by default. That is why I pointed you to the netsh documentation to set its proxy. You can also try importing IE settings to WinHTTP by using http://technet.microsoft.com/en-us/library/cc731131(v=ws.10).aspx#BKMK_2

@karataliu
Copy link

We also face the same issue on Linux, looks like we're not able to pass proxy setting for non-win environment now.
Would you consider supporting reading proxy setting from environment variables?

@hanzhumsft
Copy link
Member

Hi, the latest release v2.3.0 has addressed this issue. Please try it.

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

4 participants