Description
Hi there,
Excellent library, and we're using this indirectly via the cpprestsdk library (Casablanca).
We do need to address one limitation - "Authenticated Proxy Support", specifically NTLM and Negotiate (and maybe in the future Kerberos).
We previously added support in a different project for these schemes (on Windows) by using the Windows SSPI API, and we noticed there's an issue in the WebSocketpp repo using a similar approach (#337). Actually, we built and ran with this, and it works (successfully running NTLM authentication), however it does introduce some platform specific code (windows).
To improve on this solution, it would probably be a good idea to externalize this from WebSocketpp, thereby avoid any unnecessary dependencies. To achieve this we would introduce callbacks/handlers to react to the 407 proxy responses. This interface would need access to the proxy specific headers returned, and would calculate updated headers for the next step in the authentication flow. Once complete the normal flow would continue.
An alternative approach may be to get WebSocketpp report the 407 to the upper layers, along with the response headers. Then let the upper layers run the proxy authentication flow, calculation the required authentication header token - then restart the websocket with the calculated auth token header. (I am assuming that the auth token can be shared with a new socket connection - but I'm not an expert in this area).
At this point, we don't know much about authenticated proxy support for non-windows platforms, but by including the callback/handler, it should be possible to include solutions for each platform.
Please let me know if we're on the right wave-length here, or if you have any alternate suggestions.
If we can agree on an approach, then we can work on this feature, and submit via pull request.
Regards,
Colie