winapi - obtaining proxy from PAC proxy requiring authentication -


itemprop = "text">

I am trying to use WinHttpGetProxyForUrl where specified by the PAC file WINHTTP_AUTOPROXY_OPTIONS HTTP Basic Authentication is required to access lpszAutoConfigUrl .

Regularly do the authentication dialog to popup or to supply username and password to use for proxy?

Automated credential dialog handling is only supported in. In WinHTTP you have to provide a user way of obtaining the user name and password and pass it to WinHttpSetCredentials or similar tasks. I will check for the return value of WinHttpGetProxyForUrl to ERROR_WINHTTP_LOGIN_FAILURE and then demand the user's credentials. At any point in which you can try WinHTTP to pass those credentials:

  1. WinHttpSetOption with WINHTTP_OPTION_USERNAME And Use WINHTTP_OPTION_PASSWORD to set a username and password and remember WinHttpGetProxyForUrl
  2. or WinHttpGetProxyForUrl And supply the lpszAutoConfigUrl parameter with a URL containing credentials (i.e. http: // user: pass = intranet / ). I fAutoLogonIfChallenged if you were not using the original authentication, but this is no use for you.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -