Re: HttpURLConnection, Proxies and Authentication

From: Chris Smith (cdsmith_at_twu.net)
Date: 07/13/04


Date: Tue, 13 Jul 2004 07:17:58 -0600

Roger wrote:
> However, this now begs two questions. Firstly is it possible to
> programatically determine if my program is running through a proxy
> server or is this a matter for a config file. Secondly, having
> established the answer to the first question is it possible to
> programatically determine the authentication mechanism being used by
> the proxy server, particularly given that NTLM is windows specific or
> again, is this best achieved through a config file?

There are two standards out there, called WPAD and PAC, which can be
combined to discover the correct proxy settings on large networks if the
network administrator has set things up correctly. Otherwise, you'll
have to rely on the user knowing their proxy config. If there is no
WPAD or PAC on the network, that means that the user must have manually
configured their proxy settings for IE and such, too, so you can ask
them to look there.

It does make sense, by the way, to support PAC but not WPAD... however,
WPAD implies PAC so that the other direction doesn't work. Implementing
PAC requires an embedded JavaScript interpreter such as
http://www.mozilla.org/rhino/.

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation


Relevant Pages

  • Re: Hyperlinks in word and proxy PAC files
    ... "When you configure the .PAC in the network preferences, ... All other applications use the proxy settings from the ... Here's another symptom I found today - when I click Go -> Open In Browser on ... and our pac file is configured exactly as described. ...
    (microsoft.public.mac.office.word)
  • Re: Hyperlinks in word and proxy PAC files
    ... "When you configure the .PAC in the network preferences, ... All other applications use the proxy settings from the ... Here's another symptom I found today - when I click Go -> Open In Browser on ...
    (microsoft.public.mac.office.word)
  • Re: Proxy Server Clients at Home
    ... in a PAC file (proxy autoconfiguration script) you can specify ... > Thats OK but i want to put some exceptions for the clients. ... > not to use proxy server for some domains or hosts. ...
    (microsoft.public.isaserver)
  • Re: Squid - Auto Proxy hrefs
    ... > browser to proxy settings. ... you can get very close with a PAC script. ... proxies. ...
    (comp.os.linux.networking)
  • Re: ISA 2004 Web Proxy Clients
    ... Do I need to create WPAD cname record in DNS in concert with WPAD entries in ... Is it possible to propagate web proxy information to clients using WPAD ... proxy clients dont get proxy server address in LAN settings of IE.Another ...
    (microsoft.public.isa.clients)