Discussion:
[squid-users] help me!!! proxy auto configuration file
(too old to reply)
Bala murugan
2003-08-04 12:00:20 UTC
Permalink
Absolutely this question may not be discussed here. I couldn’t find some
other location on net. Please forgive me if you feel this is wrong


How do I specify in Proxy auto configuration script to pass some domains say
(Yahoo.com, hotmail.com) using proxy server (192.168.3.10:8080)
(And rest of other domain except yahoo and hotmail) using
(192.168.3.11:9090)

Can any one tell me how do I make this script and what to do?

Thanks in advance
Bala

_________________________________________________________________
Go down memory lane. Revisit the cool times.
http://www.batchmates.com/msn.asp Reconnect with old friends!
Adam Aube
2003-08-04 12:34:00 UTC
Permalink
Post by Bala murugan
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
Hasan, Irfan
2003-08-04 12:43:32 UTC
Permalink
Check on this stite also.
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html

-----Original Message-----
From: Adam Aube [mailto:***@firstindependent.net]=20
Sent: Monday, August 04, 2003 8:31 PM
To: squid-***@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=20
domains using proxy server (192.168.3.10:8080) And rest of other=20
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) =3D=3D myIpAddress())
{
return "DIRECT";
}
if (isInNet(host, "127.0.0.0", "255.0.0.0"))=20
{
return "DIRECT";=20
}

// Use a certain proxy for certain domains
if (host =3D=3D "www.domain1.com")
{
return "192.168.3.10:8080";
}
if (host =3D=3D "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

Loading...