Creating a reliable HTTP connection for dummy users using WinINET

I am making a program that downloads a simple file from the Internet to Windows using Wininet, because I want to use its behavior compatible with IE. As you all know, the current IE has several proxy server settings: automatic detection (WPAD), automatic configuration (PAC), one-time URL, proxy servers for the protocol, socks, direct, ... For most users, "direct loading "" works fine; however, for some users (especially the firewall / NAT), special proxy settings are always required when creating connections.

It is hard to write code to handle all of these cases, so I hope WinINET with InternetOpen (INTERNET_OPEN_TYPE_PRECONFIG)can help me. This is done for most users, but I still think that some users complain about the connection failure. These users may have special network environments (for example, a proxy server username / password is required), and a direct connection does not work for them.

Sometimes dummy users had the wrong configuration, and I would like wininet to try "all" the possible proxy settings for me; unfortunately, it INTERNET_OPEN_TYPE_PRECONFIGwill use only the one that is configured by the user, and not "all possible proxy settings".

So my question is: how to make the program with the most powerful ability to bypass all http connections (especially for proxy configuration) for fictitious users (i.e. they don’t understand how to configure their system)? Is there a way to offer HTTP connections without having to deal with a proxy server? (i.e., a “super” connection solver that will try to set all possible proxy settings), or if there is any way to tell WinINET to enable all its proxy settings to create a connection?

+5
source share
2 answers

A reasonable algorithm would be the following:

, -. , , , WPAD PAC . , " HTTP- ".

, WinHTTP -, WinINet , WinHTTP . HTTP ( , WinINet), WinHTTP .

2:

J.J. - - Firefox. - oddball (, , IE), , , .

: : WinHTTP "" WinINet ( , 100% WinINet WinHTTP). , WinHTTP , HTTP Internet Explorer, , ..

(WinHTTP, WinINet, ), , Windows Update . , WinHTTP , HTTP .

WinHTTP (, API , - ), , WinINet, , - WPAD.

+5

, IE , Windows Update , - Windows -. IE Windows WinINet WinHTTP WinHttpGetIEProxyConfigForCurrentUser, WinHttpDetectAutoProxyConfigUrl, WinHttpGetProxyForUrl WinHttpGetDefaultProxyConfiguration, .

KB:

  • , PAC WPAD.
  • PAC ? ​​ IE script, PAC.
  • PAC ? . - IE, .
  • - IE ? - .
  • - ? .
+1

All Articles