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 support for OSX #83

Open
mivasi opened this issue Mar 4, 2016 · 7 comments
Open

Proxy support for OSX #83

mivasi opened this issue Mar 4, 2016 · 7 comments

Comments

@mivasi
Copy link

mivasi commented Mar 4, 2016

I have a question if someone is interested in proxy support on OSX. I saw that you integrated basic linux proxy support which works on OSX too, but as I saw it has only basic authentication support. For our project it is not enough so we wrote native OSX transport layer which now supports basic and digest authentication and we are heading toward NTLM authentication type.

@PremanandPatil
Copy link

Yes, I am interested in proxy support with basic authentication on OSX.

On Fri, Mar 4, 2016 at 10:38 PM, Michal Vašíček [email protected]
wrote:

I have a question if someone is interested in proxy support on OSX. I saw
that you integrated basic linux proxy support which works on OSX too, but
as I saw it has only basic authentication support. For our project it is
not enough so we wrote native OSX transport layer which now supports basic
and digest authentication and we are heading toward NTLM authentication
type.


Reply to this email directly or view it on GitHub
#83.

@ras0219-msft
Copy link
Contributor

Yes, this sounds like a solid feature. Can this be implemented under the existing public APIs, or would it need new ones?

@mivasi
Copy link
Author

mivasi commented Mar 4, 2016

It is implemented in existing public API. It is implemented the same way as WIN transport layer. I added new file http_client_apple.cpp which is used on OSX (by CMAKE) instead of http_client_asio.cpp. It can be seen at https://github.com/mivasi/cpprestsdk/tree/macosx_client. There is still some minimal work to be done, because I disabled about 5 tests which do not pass yet. Also there are still some questions to be answered. For example, how to write proxy authentication tests for everyone. For now I wrote those tests depending on my local proxy server, but they fail to anyone else.

@coliemcgarry
Copy link

Slightly off topic, but we also need to support NTLM (+negotiate) on windows for proxy authentication.
Http requests are fine, however the WebSocket does not work (Websocketpp) on Windows 7.
I've been working on a solution for this in WebSocketpp - it will also mean some small changes to cpprestsdk to make it fit (API change needed because some proxies require a re connection during the auth flow).
Anyway, I'm writing a pluggable 'proxy_authenticator' object within WebSocket to achieve this. This object manages extraction of auth challenges + calculation of the next auth token. The Auth token calculation part itself is again a pluggable interface (security_context), which will be specific to each platform - on Windows I'm simply using the Windows SSPI API - so it's a pretty small object.
I should be ready to issue a pull request within the next week - I'll post the link here, and we can see it there's any possibility for re-use somewhere.

@coliemcgarry
Copy link

Forgot to follow up, regardless, here's that link to my pull request within WebSocket++ (Pluggable Authenticated Proxy Support - with an implementation for Windows, supporting NTLM+Negotiate):

zaphoyd/websocketpp#535

@deeringc
Copy link
Contributor

@mivasi Did you consider contributing this as a pull request? A native OSX client would be a great addition.

@mivasi
Copy link
Author

mivasi commented Oct 31, 2016

@deeringc I am sorry I still can't get all automations to pass which is the reason why I didn't make pull request yet. If someone can help me with that it would be great. I think code is ready and we are using it in production version of our product, but there are some minor automation failures I do not know what to do with them.

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

No branches or pull requests

5 participants