Re: [squid-users] help with squid redirectors

From: Osmany <osmany_at_oc.quimefa.cu>
Date: Sun, 13 Mar 2011 14:00:15 -0400

So finally this is what I have and it works perfectly. But I want to go
further than this. I want the clients to download what they've requested
from my local urls. For example...if a client wants to update their
Kaspersky antivirus and it requests for an internet update server, I
want it to actually get redirected to my ftp and download what it wants
from here. So far what I've accomplished is that any request gets
redirected to the specified url but it doesn't follow the path of the
file that the client requested.

#!/usr/bin/perl
BEGIN {$|=1}
while (<>) {
     @X = split;
     $url = $X[1];
   if ($url =~ /^http:\/\/(.*)kaspersky(.*)/) {
    print $X[0]." 301:ftp:\/\/dnl-kaspersky\.quimefa\.cu\:2122\/Updates
\n";
   }
   elsif ($url =~ /^http:\/\/(.*)update(.*)/) {
    print $X[0]." 301:http:\/\/windowsupdate\.quimefa\.cu\:8530\n";
   }
   else {
    print $X[0]."\n";
   }
}

Can anybody help me with this?
Received on Sun Mar 13 2011 - 18:04:54 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 14 2011 - 12:00:02 MDT