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

From: Adam Aube <aaube@dont-contact.us>
Date: Mon, 4 Aug 2003 08:30:36 -0400

> 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:30:41 MDT

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