RE: [squid-users] help me!!! proxy auto configuration file

From: Hasan, Irfan <irfan.hasan@dont-contact.us>
Date: Mon, 4 Aug 2003 20:37:31 +0800

Check on this stite also.
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html

-----Original Message-----
From: Adam Aube [mailto:aaube@firstindependent.net]
Sent: Monday, August 04, 2003 8:31 PM
To: squid-users@squid-cache.org
Subject: RE: [squid-users] help me!!! proxy auto configuration file

> How do I specify in Proxy auto configuration script to pass some
> domains using proxy server (192.168.3.10:8080) And rest of other
> domain using
> (192.168.3.11:9090)

This is adapted from the example script posted by Merton Campbell
Crockett. Give it a try.

function FindProxyForURL(url, host)
{
  // Go direct if requesting self
  if (dnsResolve(host) == myIpAddress())
  {
    return "DIRECT";
  }
  if (isInNet(host, "127.0.0.0", "255.0.0.0"))
  {
  return "DIRECT";
  }

  // Use a certain proxy for certain domains
  if (host == "www.domain1.com")
  {
    return "192.168.3.10:8080";
  }
  if (host == "www.domain2.com")
  {
    return "192.168.3.10:8080";
  }

  // Use a different proxy for all other domains
  else
  {
    return "192.168.3.11:9090";
  }
}

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 3/7/2001
Received on Mon Aug 04 2003 - 06:38:18 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:34 MST