[Hackage] #460: find the http proxy on windows more reliably

Hackage trac at galois.com
Fri Jan 16 20:07:20 EST 2009


#460: find the http proxy on windows more reliably
---------------------------------+------------------------------------------
  Reporter:  duncan              |        Owner:                
      Type:  defect              |       Status:  new           
  Priority:  normal              |    Milestone:                
 Component:  cabal-install tool  |      Version:  1.2.3.0       
  Severity:  normal              |   Resolution:                
  Keywords:                      |   Difficulty:  hard (< 1 day)
Ghcversion:  6.8.3               |     Platform:                
---------------------------------+------------------------------------------
Comment (by duncan):

 It seems that the Web Proxy Auto-Discovery (WPAD) protocol is more than a
 bit dodgy.

 The right thing to do seems to be to check either the default settings
 with !WinHttpGetDefaultProxyConfiguration() though this is apparently more
 appropriate for system service.

 Alternatively we check the IE settings with
 WinHttpGetIEProxyConfigForCurrentUser(). It may specify a number of
 possibilities:
   * direct connection (no proxy)
   * specific proxy (and proxy bypass list)
   * auto config url (url of a .pac file)
   * auto detect (WPAD / !AutoProxy)

 In the third case we can use !WinHttpGetProxyForUrl() to get the .pac
 file, cache it and interpret it for us each time we look up a url. We can
 use the !WinHttpGetProxyForUrl() function in such a way that it never
 tries the WPAD / !AutoProxy protocol.

 In the last case we either bite the bullet and try this nasty insecure
 protocol or we fail, or perhaps we just try a direct connection anyway and
 then fail.

 The fact that the .pac file can specify a different proxy for each URL is
 a bit irksome. It means we'd have to keep a WinHTTP `HINTERNET` session
 about for the whole time we're making a sequence of HTTP requests.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/460#comment:1>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list