Search squid archive

Re: proxy.pac file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/29/06, Raj <sunfire2005@xxxxxxxxx> wrote:
I am running squid version 2.5.stable10. All the users use the
following proxy.pac file

I do a lot with PAC, but never tried variables for return lines.
Rather, I've moved much of the intelligence into the server where the
PAC script is hosted.


// VLAN's 112 --> 128
  if (isInNet(myIpAddress(), "172.26.112.0", "255.255.240.0")) return p43;

There are OS and browser idiosyncrasies with how PAC is processed,
for example, MSIE will sometimes return false positives from dnsDomainIs().

Another bug is that isInNet() will sometimes return false negatives.

Since we want to have different client subnets prefer different
gateways, what I've done is have the 'proxy.pac' URL actually be a CGI
script which does DNS lookups for the proxy addresses, and then
returns a slightly different PAC based on the source IP of the client,
phase of the moon, etc.


All the users from 172.26.96.0 - 172.26.111.0 subnet goes to
proxy03.domain.com first. If proxy03 is down the client should
automatically try proxy04.domain.com. But that's not happening. If
proxy03 is down, the clients are not failing over to proxy04. Is there
any syntax error in p34.

I've tested this feature with a number of browsers, returning two
different proxy server IP addresses, and it does work reliably.

Many browsers do have a bug in failover, they will fail OVER to the
second proxy listed on the return line, but then when the first comes
back online, they never switch back;  only way to switch back is to
exit the browser and restart.


On 8/29/06, Christoph Haas <email@xxxxxxxxxxxxxxxxx> wrote:
If you are looking for sophisticated load balancing and don't want to spend
money on a hardware load-balancer there's also the "Super Proxy Script"
(google for it) which uses a home-made hashing algorithm within the
proxy.pac to distribute requests.

Good suggestion.

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux