My company produces a program that, among other things, needs to connect to the company's servers for updates and e-commerce purposes. We've had this for a long time, but we've never figured out how to handle "proxy authentication", where a proxy server requires a name and password before allowing the program to access the Internet.
This program manipulates the HTML headers itself, as strings, and communicates through plain ol' sockets, so I need to know the actual details of the headers. In other words, we're not using a communications library (there are technical reasons for that, which won't change), so we need to know where to put the name/password so that the proxy server will recognize them.
All I can find through Google are descriptions of how to configure proxy servers for it, or how end-users should use them. Does anyone know where to find the low-level details that we need for this?
According to the spec if the proxy sends a Proxy-Authenticate
header then your subsequent request needs to add authentication headers according to the scheme (basic or digest) that the proxy requires. That request would include the header Proxy-Authorization
with the relevant credentials.