Search squid archive

Re: help with squid redirectors

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

 



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?



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

  Powered by Linux