LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2005, 12:43 AM   #1
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Question Squid Redirectors


how can I use multiple redirectors with squid??

i have a simple redirector which i wrote but now i need to install the adzapper redirector also and i can't figure-out how to have them both...
 
Old 08-07-2005, 01:04 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
found this right there on the adzapper homepage:

Quote:
Chaining Redirector Programs

People running on very small systems, such as a low end system running something like LEAF, should also see Andrew Liebeskind's nifty Adzap2Squirm script which translates the zapper patterns for use with Squirm.

Chris Lightfoot <chris@ex-parrot.com> wrote asking if I could make the zapper friendly to setups where people chain multiple redirection programs together (for example, to run both the ad zapper and another tool like SquidGuard). Then Adam Hope <a.hope@csl.gov.uk> wrote to say that they were chaining to another redirector which wanted the full 4 word input a redirector may expect.

The specification for the redirectors says unredirected URLs should be indicated with a blank line, which is no good for piping the output of one into the next. Accordingly, to chain redirectors a wrapper program is needed to pass URLs to each redirector in turn.

To chain redirectors:

1. Fetch the scripts wrapzap and zapchain and install them where you installed the squid_redirect script. Remember that all scripts should have public read/execute oermissions:

chmod a+rx scripts...

2. As stated in the section on customising the zapper, the main purpose of wrapzap is to tune the behaviour of the zapper. However, it is also the hook for chaining things.
1. Adjust the setting for zapper near the top of the script.
2. Change the last lines of wrapzap from:

exec "$zapper"
# exec /path/to/zapchain "$zapper" /path/to/another/eg/squirm


to:

# exec "$zapper"
exec /path/to/zapchain "$zapper" /path/to/another/eg/squirm


and adjust the pathnames to suit. You may name as many different redirectors as you like, not just two.
3. Change the squid config line:

redirect_program /path/to/squid_redirect

to be:

redirect_program /path/to/wrapzap

This causes squid to run wrapzap, wrapzap to run zapchain and zapchain to run the various redirectors correctly.
i tried it and it seems to work just fine...


Last edited by win32sux; 08-07-2005 at 01:06 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQUID for blocking yahoo and msn [inc squid.conf] chrisfirestar Linux - Security 10 03-03-2008 08:33 AM
squid message customization, hiding squid versioin rajnishmishra Linux - Networking 0 11-27-2004 03:55 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM
I can't "service squid start" , and chkconfig squid on not working Niceman2005 Linux - Software 0 11-10-2004 08:18 PM
Squid load testing software / Squid optimisation? gundelgauk Linux - Networking 2 08-31-2004 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration