Re: [squid-users] Squid and PAC file

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 17 Oct 2012 10:54:50 +1300

On 17.10.2012 03:21, mbaki wrote:
> Hi all,
>
> I'm trying to use 2
> squid servers and I want to use a pac file to say
> for all sites use
> the squid server 1 but for all streaming server sites
> (youtube,
> netflix, cnn video, abcnews streaming etc etc) use the othjer
> server.
>
> Can a PAC file based on the file extension be
> utilized?

That would be no, because HTTP contains no such concept or thing as
"file" or "file extension".

HTTP does however contain URL which look a lot like file paths
(sometimes). PAC being a javascript you can try pattern matching on the
URL.

... but you are talking about streams. A stream has a *format* type -
no file extension/type, which may or may not be visible in the URL.

Since your policy as stated is "for all streaming server sites". You
would be best making a list of those sites and detecting by domain name
rather than patterning the URL.

Also, any particular reason you need to do it in the PAC? why not pass
all traffic through one of the Squid, and have that divert the streaming
traffic to the other using your detection method (urlpath_regex or
dstdomain list).

Amos
Received on Tue Oct 16 2012 - 21:54:53 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 17 2012 - 12:00:02 MDT