Re: amazon -> www.amazon.com ?

From: <bmj@dont-contact.us>
Date: Fri, 16 Jun 2000 08:39:14 -0400

On Fri, Jun 16, 2000 at 02:19:47PM +0300, Thanos Siaperas wrote:
> > Browsers like Exploder and Netscape do this by themselves. But I think that
> > only works if the browsers are configured for direct of transparant proxy
> > access. No need for squid to start guessing the right url.
> >
> > Grtz Gerben.
>
> Our proxy isn't trasparent. So people who manually put the
> proxy in their browsers, loose the following functionality:
>
> If one puts just a word in the URL field of netscape, it
> makes a query to keyword.netscape.com and then
> - if there's a site www.'word'.{com,org,...)
> it redirects you there.
> - If it's ambiguous (eg. squid-cache) it brings you to a list of choices.
> You can also put a phrase in there, and have it searched with some engine.
> Phrases aren't forwarded to the proxy, but single words are.
>
--end quoted text---

I had the same problem. I solved it using the following proxy.pac and this
works well on my set-up.. there may be a better way to do it though..
basically what you need to do is somehow trick netscape into resolving the
domain name before it sends the proxy request, since that's how it figures
out if the host exists or not.
I did this because I couldn't use the access control (or ftp) through a
transparent proxy.. but I still have squid set-up as a transparent proxy
and have "acl netscape keyword.netscape.com" "http_access allow netscape"
in my squid.conf so that'll work through the transparent proxy without
worrying about access control.. If someone can come-up with a better
solution though, I'm open to suggestions..

function FindProxyForURL (url, host)
{
  if (dnsDomainLevels(host) == 0)
    {return "DIRECT";}
  if (url.substring (0, 5) == "http:" ||
      url.substring (0, 6) == "https:" ||
      url.substring (0, 4) == "ftp:" ||
      url.substring (0, 7) == "gopher:")
    {return "PROXY 172.16.0.1:8080";}
  else
    {return "DIRECT";}
}
Received on Fri Jun 16 2000 - 06:44:42 MDT

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