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

Hackage trac at galois.com
Fri Jan 16 19:22:30 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              |     Keywords:         
Difficulty:  hard (< 1 day)      |   Ghcversion:  6.8.3  
  Platform:                      |  
---------------------------------+------------------------------------------
 Some network setups (particularly corporate ones) do not use a static
 proxy set in the windows registry but use [http://msdn.microsoft.com/en-
 us/library/aa384240%28VS.85%29.aspx "AutoProxy"]. This is a rather complex
 protocol involving DHCP, dns and requires a !JavaScript interpreter.

 However the [http://msdn.microsoft.com/en-
 us/library/aa384273%28VS.85%29.aspx WinHTTP] library comes with Windows as
 of Win2k SP3, WinXP SP1, Win2k3 and Vista.

 It's got a bunch of functions for dealing with this AutoProxy stuff,
 [http://msdn.microsoft.com/en-us/library/aa384122(VS.85).aspx including
 sample code]. In particular the main function we want is
 [http://msdn.microsoft.com/en-us/library/aa384097(VS.85).aspx
 WinHttpGetProxyForUrl]

 So we could try either statically linking to this, or perhaps doing some
 dynamic !GetProcAddress funky stuff.


 Reading more closely, it seems that this only works if the setup is using
 an !AutoProxy setup. This documentation may be more relevant:

  * [http://msdn.microsoft.com/en-us/library/aa383660(VS.85).aspx Discovery
 Without an Auto-Config File]
  * [http://msdn.microsoft.com/en-us/library/aa384096(VS.85).aspx
 WinHttpGetIEProxyConfigForCurrentUser]
  * [http://msdn.microsoft.com/en-us/library/aa384095(VS.85).aspx
 WinHttpGetDefaultProxyConfiguration]

 It seems that there are some performance issues with !AutoProxy but any
 caching has to be fairly careful since the proxy information can change.

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


More information about the cabal-devel mailing list