Re: Migration from Netscape to squid

From: Clifton Royston <[email protected]>
Date: Wed, 26 Jan 2000 10:22:13 -1000

On Wed, Jan 26, 2000 at 05:49:34PM +0200, Balis George wrote:
> I have the following problem: In my work we recently transferred the proxy
> server from an NT 4.0 machine running Netscape Proxy Server 3.52 to a
> suse 6.1 linux with kernel 2.2.13 running squid Squid/2.0.PATCH2. The
> previous server supported autoconfiguration (.pac) files.

.pac files are not really a server support issue, it's a browser
support issue. Your browser supports it, so it should be OK.

...
> >The automatic configuration file is not of the correct type
> >proxy.foobar.com:8080
> >Expected MIME type of application/x-javascript-config or
> application/x-ns-proxy-autoconfig
> >Use the configuration from the previous session instead?
>
> I added manually the above MIME types in squids mime.conf but it won't
> work

The problem looks like the browsers are going to that URL to get the
autoconfig script. If that's the port where you're running Squid, this
won't work, to the best of my knowledge.

> What I ask is: where should I put the .pac file and what it should contain
> in order that the clients would continue to work as they did
> before.

The pac file must be served by a webserver at that server and port.
I'm assuming that in your case that's the proxy server and port itself.

Here are a few ways to do it, without changes to any of the Netscape
configs, that I can think of:

 1) Add a redirector process into Squid that accepts that URL
(http://proxy.foobar.com:8080/) and rewrites it to a URL for a
webserver where you are serving the proxy.pac file (e.g.
http://www.foobar.com/proxy.pac)

 2) Change the port number on Squid to 3128, run Apache on port 8080,
and make the home directory/object for the web server on the proxy
machine be the proxy.pac file (or a redirect to it.)

 3) More complicated, but I think some people have done it - make the
redirector for Squid rewrite the request to a proxy.pac URL served by
Squid internally, the way that Squid serves up the internal icons for
FTP directories, etc.

Alternatively, if it's feasible to change the Netscape configs, just
point them to a different URL for the new proxy.pac script. See the
Squid FAQ on how to write the proxy.pac; took me just one afternoon to
write and debug mine from the examples there.

> Additionally is there a compile option in squid that allows
> support for autoconfig files?

Not needed.
  -- Clifton

-- 
 Clifton Royston  --  LavaNet Systems Architect --  cliftonr@lava.net
        "An absolute monarch would be absolutely wise and good.  
           But no man is strong enough to have no interest.  
             Therefore the best king would be Pure Chance.  
              It is Pure Chance that rules the Universe; 
          therefore, and only therefore, life is good." - AC
Received on Wed Jan 26 2000 - 13:31:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:43 MST