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