generated
[privoxy.git] / doc / webserver / user-manual / configuration.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Privoxy Configuration</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8 "><LINK
9 REL="HOME"
10 TITLE="Privoxy User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="Starting Privoxy"
14 HREF="startup.html"><LINK
15 REL="NEXT"
16 TITLE="Contacting the Developers, Bug Reporting and Feature
17 Requests"
18 HREF="contact.html"><LINK
19 REL="STYLESHEET"
20 TYPE="text/css"
21 HREF="../p_doc.css"></HEAD
22 ><BODY
23 CLASS="SECT1"
24 BGCOLOR="#EEEEEE"
25 TEXT="#000000"
26 LINK="#0000FF"
27 VLINK="#840084"
28 ALINK="#0000FF"
29 ><DIV
30 CLASS="NAVHEADER"
31 ><TABLE
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >Privoxy User Manual</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="startup.html"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="contact.html"
62 >Next</A
63 ></TD
64 ></TR
65 ></TABLE
66 ><HR
67 ALIGN="LEFT"
68 WIDTH="100%"></DIV
69 ><DIV
70 CLASS="SECT1"
71 ><H1
72 CLASS="SECT1"
73 ><A
74 NAME="CONFIGURATION"
75 >7. <SPAN
76 CLASS="APPLICATION"
77 >Privoxy</SPAN
78 > Configuration</A
79 ></H1
80 ><P
81 >  All <SPAN
82 CLASS="APPLICATION"
83 >Privoxy</SPAN
84 > configuration is stored  
85   in text files. These files can be edited with a text editor.
86   Many important aspects of <SPAN
87 CLASS="APPLICATION"
88 >Privoxy</SPAN
89 > can 
90   also be controlled easily with a web browser.
91  </P
92 ><DIV
93 CLASS="SECT2"
94 ><H2
95 CLASS="SECT2"
96 ><A
97 NAME="AEN320"
98 >7.1. Controlling <SPAN
99 CLASS="APPLICATION"
100 >Privoxy</SPAN
101 > with Your Web Browser</A
102 ></H2
103 ><P
104 > <SPAN
105 CLASS="APPLICATION"
106 >Privoxy</SPAN
107 >'s user interface can be reached through the special 
108  URL <A
109 HREF="http://config.privoxy.org/"
110 TARGET="_top"
111 >http://config.privoxy.org/</A
112 >
113  (shortcut: <A
114 HREF="http://p.p/"
115 TARGET="_top"
116 >http://p.p/</A
117 >), 
118  which is a built-in page and works without Internet access.
119  You will see the following section:&#13;</P
120 ><TABLE
121 BORDER="0"
122 BGCOLOR="#E0E0E0"
123 WIDTH="100%"
124 ><TR
125 ><TD
126 ><PRE
127 CLASS="SCREEN"
128 > <H3
129 CLASS="BRIDGEHEAD"
130 >Privoxy Menu</H3
131 ><P
132 ></P
133 ><TABLE
134 BORDER="0"
135 ><TBODY
136 ><TR
137 ><TD
138 >          &#9642;  <A
139 HREF="http://config.privoxy.org/show-status"
140 TARGET="_top"
141 >View &#38; change the current configuration</A
142 >
143  </TD
144 ></TR
145 ><TR
146 ><TD
147 >          &#9642;  <A
148 HREF="http://config.privoxy.org/show-version"
149 TARGET="_top"
150 >View the source code version numbers</A
151 >
152  </TD
153 ></TR
154 ><TR
155 ><TD
156 >          &#9642;  <A
157 HREF="http://config.privoxy.org/show-request"
158 TARGET="_top"
159 >View the request headers.</A
160 >
161  </TD
162 ></TR
163 ><TR
164 ><TD
165 >          &#9642;  <A
166 HREF="http://config.privoxy.org/show-url-info"
167 TARGET="_top"
168 >Look up which actions apply to a URL and why</A
169 >
170  </TD
171 ></TR
172 ><TR
173 ><TD
174 >          &#9642;  <A
175 HREF="http://config.privoxy.org/toggle"
176 TARGET="_top"
177 >Toggle Privoxy on or off</A
178 >
179  </TD
180 ></TR
181 ></TBODY
182 ></TABLE
183 ><P
184 ></P
185 ></PRE
186 ></TD
187 ></TR
188 ></TABLE
189 ><P
190 > This should be self-explanatory. Note the first item leads to an editor for the
191  <SPAN
192 CLASS="QUOTE"
193 >"actions list"</SPAN
194 >, which is where the ad, banner, cookie,
195  and URL blocking magic is configured as well as other advanced features of
196  <SPAN
197 CLASS="APPLICATION"
198 >Privoxy</SPAN
199 >. This is an easy way to adjust various
200  aspects of <SPAN
201 CLASS="APPLICATION"
202 >Privoxy</SPAN
203 > configuration. The actions
204  file, and other configuration files, are explained in detail below. </P
205 ><P
206 > <SPAN
207 CLASS="QUOTE"
208 >"Toggle Privoxy On or Off"</SPAN
209 > is handy for sites that might 
210  have problems with your current actions and filters. You can in fact use
211  it as a test to see whether it is <SPAN
212 CLASS="APPLICATION"
213 >Privoxy</SPAN
214
215  causing the problem or not. <SPAN
216 CLASS="APPLICATION"
217 >Privoxy</SPAN
218 > continues 
219  to run as a proxy in this case, but all filtering is disabled. There
220  is even a toggle <A
221 HREF="appendix.html#BOOKMARKLETS"
222 >Bookmarklet</A
223 > offered, so
224  that you can toggle <SPAN
225 CLASS="APPLICATION"
226 >Privoxy</SPAN
227 > with one click from
228  your browser.</P
229 ></DIV
230 ><DIV
231 CLASS="SECT2"
232 ><H2
233 CLASS="SECT2"
234 ><A
235 NAME="CONFOVERVIEW"
236 >7.2. Configuration Files Overview</A
237 ></H2
238 ><P
239 > For Unix, *BSD and Linux, all configuration files are located in
240  <TT
241 CLASS="FILENAME"
242 >/etc/privoxy/</TT
243 > by default. For MS Windows, OS/2, and
244  AmigaOS these are all in the same directory as the 
245  <SPAN
246 CLASS="APPLICATION"
247 >Privoxy</SPAN
248 > executable.  The name
249  and number of configuration files has changed from previous versions, and is
250  subject to change as development progresses.</P
251 ><P
252 > The installed defaults provide a reasonable starting point, though 
253  some settings may be aggressive by some standards. For the time being, the
254  principle configuration files are:</P
255 ><P
256 > <P
257 ></P
258 ><UL
259 ><LI
260 ><P
261 >     The main configuration file is named <A
262 HREF="configuration.html#CONFIG"
263 >config</A
264 >
265      on Linux, Unix, BSD, OS/2, and AmigaOS and <TT
266 CLASS="FILENAME"
267 >config.txt</TT
268 >
269      on Windows. This is a required file.
270    </P
271 ></LI
272 ><LI
273 ><P
274 >    <TT
275 CLASS="FILENAME"
276 >default.action</TT
277 > (the main <A
278 HREF="configuration.html#ACTIONS-FILE"
279 >actions file</A
280 >) is used to define
281     the default settings for various <SPAN
282 CLASS="QUOTE"
283 >"actions"</SPAN
284 > relating to images, banners, 
285     pop-ups, access restrictions, banners and cookies.
286    </P
287 ><P
288 >    Multiple actions files may be defined in <TT
289 CLASS="FILENAME"
290 >config</TT
291 >. These 
292     are processed in the order they are defined. Local customizations and locally 
293     preferred exceptions to the default policies as defined in
294     <TT
295 CLASS="FILENAME"
296 >default.action</TT
297 > are probably best applied in
298     <TT
299 CLASS="FILENAME"
300 >user.action</TT
301 >, which should be preserved across
302     upgrades. <TT
303 CLASS="FILENAME"
304 >standard.action</TT
305 > is also included. This is mostly 
306     for <SPAN
307 CLASS="APPLICATION"
308 >Privoxy's</SPAN
309 > internal use.
310    </P
311 ><P
312 >    
313     There is also a web based editor that can be accessed from
314     <A
315 HREF="http://config.privoxy.org/show-status/"
316 TARGET="_top"
317 >http://config.privoxy.org/show-status/</A
318 >
319     (Shortcut: <A
320 HREF="http://p.p/show-status/"
321 TARGET="_top"
322 >http://p.p/show-status/</A
323 >) for the
324     various actions files. 
325    </P
326 ></LI
327 ><LI
328 ><P
329 >    <TT
330 CLASS="FILENAME"
331 >default.filter</TT
332 > (the <A
333 HREF="configuration.html#FILTER-FILE"
334 >filter
335     file</A
336 >) can be used to re-write the raw page content, including
337     viewable text as well as embedded HTML and JavaScript, and whatever else
338     lurks on any given web page. The filtering jobs are only pre-defined here;
339     whether to apply them or not is up to the actions files.
340    </P
341 ></LI
342 ></UL
343 ></P
344 ><P
345 > All files use the <SPAN
346 CLASS="QUOTE"
347 >"<TT
348 CLASS="LITERAL"
349 >#</TT
350 >"</SPAN
351 > character to denote a
352  comment (the rest of the line will be ignored) angd understand line continuation
353  through placing a backslash ("<TT
354 CLASS="LITERAL"
355 >\</TT
356 >") as the very last character
357  in a line. If the <TT
358 CLASS="LITERAL"
359 >#</TT
360 > is preceded by a backslash, it looses
361  its special function. Placing a <TT
362 CLASS="LITERAL"
363 >#</TT
364 > in front of an otherwise
365  valid configuration line to prevent it from being interpreted is called "commenting
366  out" that line.</P
367 ><P
368 > The actions files and <TT
369 CLASS="FILENAME"
370 >default.filter</TT
371
372  can use Perl style <A
373 HREF="appendix.html#REGEX"
374 >regular expressions</A
375 > for
376  maximum flexibility. </P
377 ><P
378 > After making any changes, there is no need to restart
379  <SPAN
380 CLASS="APPLICATION"
381 >Privoxy</SPAN
382 > in order for the changes to take
383  effect. <SPAN
384 CLASS="APPLICATION"
385 >Privoxy</SPAN
386 > detects such changes 
387  automatically. Note, however, that it may take one or two additional
388  requests for the change to take effect. When changing the listening address
389  of <SPAN
390 CLASS="APPLICATION"
391 >Privoxy</SPAN
392 >, these <SPAN
393 CLASS="QUOTE"
394 >"wake up"</SPAN
395 > requests
396  must obviously be sent to the <I
397 CLASS="EMPHASIS"
398 >old</I
399 > listening address.</P
400 ><P
401 > While under development, the configuration content is subject to change. 
402  The below documentation may not be accurate by the time you read this. 
403  Also, what constitutes a <SPAN
404 CLASS="QUOTE"
405 >"default"</SPAN
406 > setting, may change, so 
407  please check all your configuration files on important issues.</P
408 ></DIV
409 ><DIV
410 CLASS="SECT2"
411 ><H2
412 CLASS="SECT2"
413 ><A
414 NAME="CONFIG"
415 >7.3. The Main Configuration File</A
416 ></H2
417 ><P
418 > Again, the main configuration file is named <TT
419 CLASS="FILENAME"
420 >config</TT
421 > on
422  Linux/Unix/BSD and OS/2, and <TT
423 CLASS="FILENAME"
424 >config.txt</TT
425 > on Windows.
426  Configuration lines consist of an initial keyword followed by a list of
427  values, all separated by whitespace (any number of spaces or tabs). For
428  example:</P
429 ><P
430 > <TT
431 CLASS="LITERAL"
432 >  <P
433 CLASS="LITERALLAYOUT"
434 >&nbsp;&nbsp;<I
435 CLASS="EMPHASIS"
436 >confdir /etc/privoxy</I
437 ><br>
438 &nbsp;&nbsp;&nbsp;</P
439 >
440  </TT
441 > </P
442 ><P
443 > Assigns the value <TT
444 CLASS="LITERAL"
445 >/etc/privoxy</TT
446 > to the option
447  <TT
448 CLASS="LITERAL"
449 >confdir</TT
450 > and thus indicates that the configuration
451  directory is named <SPAN
452 CLASS="QUOTE"
453 >"/etc/privoxy/"</SPAN
454 >.</P
455 ><P
456 > All options in the config file except for <TT
457 CLASS="LITERAL"
458 >confdir</TT
459 > and
460  <TT
461 CLASS="LITERAL"
462 >logdir</TT
463 > are optional. Watch out in the below description
464  for what happens if you leave them unset.</P
465 ><P
466 > The main config file controls all aspects of <SPAN
467 CLASS="APPLICATION"
468 >Privoxy</SPAN
469 >'s
470  operation that are not location dependent (i.e. they apply universally, no matter
471  where you may be surfing).</P
472 ><DIV
473 CLASS="SECT3"
474 ><H3
475 CLASS="SECT3"
476 ><A
477 NAME="CONF-LOG-LOC"
478 >7.3.1. Configuration and Log File Locations</A
479 ></H3
480 ><P
481 > <SPAN
482 CLASS="APPLICATION"
483 >Privoxy</SPAN
484 > can (and normally does) use a number of
485  other files for additional configuration and logging.
486  This section of the configuration file tells <SPAN
487 CLASS="APPLICATION"
488 >Privoxy</SPAN
489 >
490  where to find those other files. </P
491 ><DIV
492 CLASS="SECT4"
493 ><H4
494 CLASS="SECT4"
495 ><A
496 NAME="CONFDIR"
497 >7.3.1.1. confdir</A
498 ></H4
499 ><P
500 ></P
501 ><DIV
502 CLASS="VARIABLELIST"
503 ><DL
504 ><DT
505 >Specifies:</DT
506 ><DD
507 ><P
508 >The directory where the other configuration files are located</P
509 ></DD
510 ><DT
511 >Type of value:</DT
512 ><DD
513 ><P
514 >Path name</P
515 ></DD
516 ><DT
517 >Default value:</DT
518 ><DD
519 ><P
520 >/etc/privoxy (Unix) <I
521 CLASS="EMPHASIS"
522 >or</I
523 > <SPAN
524 CLASS="APPLICATION"
525 >Privoxy</SPAN
526 > installation dir (Windows) </P
527 ></DD
528 ><DT
529 >Effect if unset:</DT
530 ><DD
531 ><P
532 ><I
533 CLASS="EMPHASIS"
534 >Mandatory</I
535 ></P
536 ></DD
537 ><DT
538 >Notes:</DT
539 ><DD
540 ><P
541 >    No trailing <SPAN
542 CLASS="QUOTE"
543 >"<TT
544 CLASS="LITERAL"
545 >/</TT
546 >"</SPAN
547 >, please
548    </P
549 ><P
550 >    When development goes modular and multi-user, the blocker, filter, and
551     per-user config will be stored in subdirectories of <SPAN
552 CLASS="QUOTE"
553 >"confdir"</SPAN
554 >.
555     For now, the configuration directory structure is flat, except for 
556     <TT
557 CLASS="FILENAME"
558 >confdir/templates</TT
559 >, where the HTML templates for CGI 
560     output reside (e.g. <SPAN
561 CLASS="APPLICATION"
562 >Privoxy's</SPAN
563 > 404 error page). 
564    </P
565 ></DD
566 ></DL
567 ></DIV
568 ></DIV
569 ><DIV
570 CLASS="SECT4"
571 ><H4
572 CLASS="SECT4"
573 ><A
574 NAME="LOGDIR"
575 >7.3.1.2. logdir</A
576 ></H4
577 ><P
578 ></P
579 ><DIV
580 CLASS="VARIABLELIST"
581 ><DL
582 ><DT
583 >Specifies:</DT
584 ><DD
585 ><P
586 >    The directory where all logging takes place (i.e. where <TT
587 CLASS="FILENAME"
588 >logfile</TT
589 > and 
590     <TT
591 CLASS="FILENAME"
592 >jarfile</TT
593 > are located) 
594    </P
595 ></DD
596 ><DT
597 >Type of value:</DT
598 ><DD
599 ><P
600 >Path name</P
601 ></DD
602 ><DT
603 >Default value:</DT
604 ><DD
605 ><P
606 >/var/log/privoxy (Unix) <I
607 CLASS="EMPHASIS"
608 >or</I
609 > <SPAN
610 CLASS="APPLICATION"
611 >Privoxy</SPAN
612 > installation dir (Windows) </P
613 ></DD
614 ><DT
615 >Effect if unset:</DT
616 ><DD
617 ><P
618 ><I
619 CLASS="EMPHASIS"
620 >Mandatory</I
621 ></P
622 ></DD
623 ><DT
624 >Notes:</DT
625 ><DD
626 ><P
627 >    No trailing <SPAN
628 CLASS="QUOTE"
629 >"<TT
630 CLASS="LITERAL"
631 >/</TT
632 >"</SPAN
633 >, please
634    </P
635 ></DD
636 ></DL
637 ></DIV
638 ></DIV
639 ><DIV
640 CLASS="SECT4"
641 ><H4
642 CLASS="SECT4"
643 ><A
644 NAME="ACTIONSFILE"
645 >7.3.1.3. <A
646 NAME="DEFAULT.ACTION"
647 ></A
648 >
649 <A
650 NAME="STANDARD.ACTION"
651 ></A
652 >
653 <A
654 NAME="USER.ACTION"
655 ></A
656 >
657 actionsfile</A
658 ></H4
659 ><P
660 ></P
661 ><DIV
662 CLASS="VARIABLELIST"
663 ><DL
664 ><DT
665 >Specifies:</DT
666 ><DD
667 ><P
668 >    The <A
669 HREF="configuration.html#ACTIONS"
670 >actions</A
671 > file(s) to use
672    </P
673 ></DD
674 ><DT
675 >Type of value:</DT
676 ><DD
677 ><P
678 >File name, relative to <TT
679 CLASS="LITERAL"
680 >confdir</TT
681 ></P
682 ></DD
683 ><DT
684 >Default value:</DT
685 ><DD
686 ><P
687 ></P
688 ><TABLE
689 BORDER="0"
690 ><TBODY
691 ><TR
692 ><TD
693 >     <P
694 CLASS="LITERALLAYOUT"
695 >&nbsp;&nbsp;standard&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Internal&nbsp;purposes,&nbsp;recommended&nbsp;not&nbsp;editing</P
696 >
697     </TD
698 ></TR
699 ><TR
700 ><TD
701 >     <P
702 CLASS="LITERALLAYOUT"
703 >&nbsp;&nbsp;default&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Main&nbsp;actions&nbsp;file</P
704 >
705     </TD
706 ></TR
707 ><TR
708 ><TD
709 >     <P
710 CLASS="LITERALLAYOUT"
711 >&nbsp;&nbsp;user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;User&nbsp;customizations</P
712 >
713     </TD
714 ></TR
715 ></TBODY
716 ></TABLE
717 ><P
718 ></P
719 ></DD
720 ><DT
721 >Effect if unset:</DT
722 ><DD
723 ><P
724 >    No actions are taken at all. Simple neutral proxying. 
725    </P
726 ></DD
727 ><DT
728 >Notes:</DT
729 ><DD
730 ><P
731 >    Multiple <TT
732 CLASS="LITERAL"
733 >actionsfile</TT
734 > lines are OK and are in fact recommended!
735    </P
736 ><P
737
738     The default values include standard.action, which is used for internal
739     purposes and should be loaded, default.action, which is the
740     <SPAN
741 CLASS="QUOTE"
742 >"main"</SPAN
743 > actions file maintained by the developers, and
744     <TT
745 CLASS="FILENAME"
746 >user.action</TT
747 >, where you can make your personal additions.
748    </P
749 ><P
750
751     There is no point in using <SPAN
752 CLASS="APPLICATION"
753 >Privoxy</SPAN
754 > without an actions file.
755    </P
756 ></DD
757 ></DL
758 ></DIV
759 ></DIV
760 ><DIV
761 CLASS="SECT4"
762 ><H4
763 CLASS="SECT4"
764 ><A
765 NAME="FILTERFILE"
766 >7.3.1.4. <A
767 NAME="DEFAULT.FILTER"
768 ></A
769 >filterfile</A
770 ></H4
771 ><P
772 ></P
773 ><DIV
774 CLASS="VARIABLELIST"
775 ><DL
776 ><DT
777 >Specifies:</DT
778 ><DD
779 ><P
780 >    The <A
781 HREF="configuration.html#FILTER"
782 >filter</A
783 > file to use
784    </P
785 ></DD
786 ><DT
787 >Type of value:</DT
788 ><DD
789 ><P
790 >File name, relative to <TT
791 CLASS="LITERAL"
792 >confdir</TT
793 ></P
794 ></DD
795 ><DT
796 >Default value:</DT
797 ><DD
798 ><P
799 >default.filter (Unix) <I
800 CLASS="EMPHASIS"
801 >or</I
802 > default.filter.txt (Windows)</P
803 ></DD
804 ><DT
805 >Effect if unset:</DT
806 ><DD
807 ><P
808 >    No textual content filtering takes place, i.e. all
809     <TT
810 CLASS="LITERAL"
811 >+filter{<TT
812 CLASS="REPLACEABLE"
813 ><I
814 >name</I
815 ></TT
816 >}</TT
817 >
818     actions in the actions files are turned off
819    </P
820 ></DD
821 ><DT
822 >Notes:</DT
823 ><DD
824 ><P
825 >    The <SPAN
826 CLASS="QUOTE"
827 >"default.filter"</SPAN
828 > file contains content modification rules 
829     that use <SPAN
830 CLASS="QUOTE"
831 >"regular expressions"</SPAN
832 >. These rules permit powerful
833     changes on the content of Web pages, e.g., you could disable your favorite
834     JavaScript annoyances, re-write the actual displayed text, or just have some
835     fun replacing <SPAN
836 CLASS="QUOTE"
837 >"Microsoft"</SPAN
838 > with <SPAN
839 CLASS="QUOTE"
840 >"MicroSuck"</SPAN
841 > wherever
842     it appears on a Web page.
843    </P
844 ></DD
845 ></DL
846 ></DIV
847 ></DIV
848 ><DIV
849 CLASS="SECT4"
850 ><H4
851 CLASS="SECT4"
852 ><A
853 NAME="LOGFILE"
854 >7.3.1.5. logfile</A
855 ></H4
856 ><P
857 ></P
858 ><DIV
859 CLASS="VARIABLELIST"
860 ><DL
861 ><DT
862 >Specifies:</DT
863 ><DD
864 ><P
865 >    The log file to use
866    </P
867 ></DD
868 ><DT
869 >Type of value:</DT
870 ><DD
871 ><P
872 >File name, relative to <TT
873 CLASS="LITERAL"
874 >logdir</TT
875 ></P
876 ></DD
877 ><DT
878 >Default value:</DT
879 ><DD
880 ><P
881 >logfile (Unix) <I
882 CLASS="EMPHASIS"
883 >or</I
884 > privoxy.log (Windows)</P
885 ></DD
886 ><DT
887 >Effect if unset:</DT
888 ><DD
889 ><P
890 >    No log file is used, all log messages go to the console (<TT
891 CLASS="LITERAL"
892 >stderr</TT
893 >).
894    </P
895 ></DD
896 ><DT
897 >Notes:</DT
898 ><DD
899 ><P
900 >    The windows version will additionally log to the console.
901    </P
902 ><P
903 >    The logfile is where all logging and error messages are written. The level
904     of detail and number of messages are set with the <TT
905 CLASS="LITERAL"
906 >debug</TT
907 >
908     option (see below). The logfile can be useful for tracking down a problem with
909     <SPAN
910 CLASS="APPLICATION"
911 >Privoxy</SPAN
912 > (e.g., it's not blocking an ad you
913     think it should block) but in most cases you probably will never look at it.
914    </P
915 ><P
916 >    Your logfile will grow indefinitely, and you will probably want to
917     periodically remove it.  On Unix systems, you can do this with a cron job
918     (see <SPAN
919 CLASS="QUOTE"
920 >"man cron"</SPAN
921 >). For Red Hat, a <B
922 CLASS="COMMAND"
923 >logrotate</B
924
925     script has been included.
926    </P
927 ><P
928 >    On SuSE Linux systems, you can place a line like <SPAN
929 CLASS="QUOTE"
930 >"/var/log/privoxy.*
931     +1024k 644 nobody.nogroup"</SPAN
932 > in <TT
933 CLASS="FILENAME"
934 >/etc/logfiles</TT
935 >, with
936     the effect that cron.daily will automatically archive, gzip, and empty the
937     log, when it exceeds 1M size.
938    </P
939 ></DD
940 ></DL
941 ></DIV
942 ></DIV
943 ><DIV
944 CLASS="SECT4"
945 ><H4
946 CLASS="SECT4"
947 ><A
948 NAME="JARFILE"
949 >7.3.1.6. jarfile</A
950 ></H4
951 ><P
952 ></P
953 ><DIV
954 CLASS="VARIABLELIST"
955 ><DL
956 ><DT
957 >Specifies:</DT
958 ><DD
959 ><P
960 >    The file to store intercepted cookies in
961    </P
962 ></DD
963 ><DT
964 >Type of value:</DT
965 ><DD
966 ><P
967 >File name, relative to <TT
968 CLASS="LITERAL"
969 >logdir</TT
970 ></P
971 ></DD
972 ><DT
973 >Default value:</DT
974 ><DD
975 ><P
976 >jarfile (Unix) <I
977 CLASS="EMPHASIS"
978 >or</I
979 > privoxy.jar (Windows)</P
980 ></DD
981 ><DT
982 >Effect if unset:</DT
983 ><DD
984 ><P
985 >    Intercepted cookies are not stored at all.
986    </P
987 ></DD
988 ><DT
989 >Notes:</DT
990 ><DD
991 ><P
992 >    The jarfile may grow to ridiculous sizes over time.
993    </P
994 ></DD
995 ></DL
996 ></DIV
997 ></DIV
998 ><DIV
999 CLASS="SECT4"
1000 ><H4
1001 CLASS="SECT4"
1002 ><A
1003 NAME="TRUSTFILE"
1004 >7.3.1.7. trustfile</A
1005 ></H4
1006 ><P
1007 ></P
1008 ><DIV
1009 CLASS="VARIABLELIST"
1010 ><DL
1011 ><DT
1012 >Specifies:</DT
1013 ><DD
1014 ><P
1015 >    The trust file to use
1016    </P
1017 ></DD
1018 ><DT
1019 >Type of value:</DT
1020 ><DD
1021 ><P
1022 >File name, relative to <TT
1023 CLASS="LITERAL"
1024 >confdir</TT
1025 ></P
1026 ></DD
1027 ><DT
1028 >Default value:</DT
1029 ><DD
1030 ><P
1031 ><I
1032 CLASS="EMPHASIS"
1033 >Unset (commented out)</I
1034 >. When activated: trust (Unix) <I
1035 CLASS="EMPHASIS"
1036 >or</I
1037 > trust.txt (Windows)</P
1038 ></DD
1039 ><DT
1040 >Effect if unset:</DT
1041 ><DD
1042 ><P
1043 >    The whole trust mechanism is turned off.
1044    </P
1045 ></DD
1046 ><DT
1047 >Notes:</DT
1048 ><DD
1049 ><P
1050 >    The trust mechanism is an experimental feature for building white-lists and should
1051     be used with care. It is <I
1052 CLASS="EMPHASIS"
1053 >NOT</I
1054 > recommended for the casual user.
1055    </P
1056 ><P
1057 >    If you specify a trust file, <SPAN
1058 CLASS="APPLICATION"
1059 >Privoxy</SPAN
1060 > will only allow
1061     access to sites that are named in the trustfile. 
1062     You can also mark sites as trusted referrers (with <TT
1063 CLASS="LITERAL"
1064 >+</TT
1065 >), with
1066     the effect that access to untrusted sites will be granted, if a link from a
1067     trusted referrer was used.
1068     The link target will then be added to the <SPAN
1069 CLASS="QUOTE"
1070 >"trustfile"</SPAN
1071 >.
1072     Possible applications include limiting Internet access for children.
1073    </P
1074 ><P
1075 >    If you use <TT
1076 CLASS="LITERAL"
1077 >+</TT
1078 > operator in the trust file, it may grow considerably over time.
1079    </P
1080 ></DD
1081 ></DL
1082 ></DIV
1083 ></DIV
1084 ></DIV
1085 ><DIV
1086 CLASS="SECT3"
1087 ><H3
1088 CLASS="SECT3"
1089 ><A
1090 NAME="LOCAL-SET-UP"
1091 >7.3.2. Local Set-up Documentation</A
1092 ></H3
1093 ><P
1094 >    If you intend to operate <SPAN
1095 CLASS="APPLICATION"
1096 >Privoxy</SPAN
1097 > for more users
1098     that just yourself, it might be a good idea to let them know how to reach
1099     you, what you block and why you do that, your policies etc.
1100    </P
1101 ><DIV
1102 CLASS="SECT4"
1103 ><H4
1104 CLASS="SECT4"
1105 ><A
1106 NAME="TRUST-INFO-URL"
1107 >7.3.2.1. trust-info-url</A
1108 ></H4
1109 ><P
1110 ></P
1111 ><DIV
1112 CLASS="VARIABLELIST"
1113 ><DL
1114 ><DT
1115 >Specifies:</DT
1116 ><DD
1117 ><P
1118 >    A URL to be displayed in the error page that users will see if access to an untrusted page is denied.    
1119    </P
1120 ></DD
1121 ><DT
1122 >Type of value:</DT
1123 ><DD
1124 ><P
1125 >URL</P
1126 ></DD
1127 ><DT
1128 >Default value:</DT
1129 ><DD
1130 ><P
1131 >Two example URL are provided</P
1132 ></DD
1133 ><DT
1134 >Effect if unset:</DT
1135 ><DD
1136 ><P
1137 >    No links are displayed on the "untrusted" error page.
1138    </P
1139 ></DD
1140 ><DT
1141 >Notes:</DT
1142 ><DD
1143 ><P
1144 >    The value of this option only matters if the experimental trust mechanism has been
1145     activated. (See <TT
1146 CLASS="LITERAL"
1147 >trustfile</TT
1148 > above.)
1149    </P
1150 ><P
1151 >    If you use the trust mechanism, it is a good idea to write up some on-line
1152     documentation about your trust policy and to specify the URL(s) here.
1153     Use multiple times for multiple URLs.
1154    </P
1155 ><P
1156 >    The URL(s) should be added to the trustfile as well, so users don't end up
1157     locked out from the information on why they were locked out in the first place!
1158    </P
1159 ></DD
1160 ></DL
1161 ></DIV
1162 ></DIV
1163 ><DIV
1164 CLASS="SECT4"
1165 ><H4
1166 CLASS="SECT4"
1167 ><A
1168 NAME="ADMIN-ADDRESS"
1169 >7.3.2.2. admin-address</A
1170 ></H4
1171 ><P
1172 ></P
1173 ><DIV
1174 CLASS="VARIABLELIST"
1175 ><DL
1176 ><DT
1177 >Specifies:</DT
1178 ><DD
1179 ><P
1180 >    An email address to reach the proxy administrator.
1181    </P
1182 ></DD
1183 ><DT
1184 >Type of value:</DT
1185 ><DD
1186 ><P
1187 >Email address</P
1188 ></DD
1189 ><DT
1190 >Default value:</DT
1191 ><DD
1192 ><P
1193 ><I
1194 CLASS="EMPHASIS"
1195 >Unset</I
1196 ></P
1197 ></DD
1198 ><DT
1199 >Effect if unset:</DT
1200 ><DD
1201 ><P
1202 >    No email address is displayed on error pages and the CGI user interface.
1203    </P
1204 ></DD
1205 ><DT
1206 >Notes:</DT
1207 ><DD
1208 ><P
1209 >    If both <TT
1210 CLASS="LITERAL"
1211 >admin-address</TT
1212 > and <TT
1213 CLASS="LITERAL"
1214 >proxy-info-url</TT
1215 >
1216     are unset, the whole "Local Privoxy Support" box on all generated pages will
1217     not be shown.
1218    </P
1219 ></DD
1220 ></DL
1221 ></DIV
1222 ></DIV
1223 ><DIV
1224 CLASS="SECT4"
1225 ><H4
1226 CLASS="SECT4"
1227 ><A
1228 NAME="PROXY-INFO-URL"
1229 >7.3.2.3. proxy-info-url</A
1230 ></H4
1231 ><P
1232 ></P
1233 ><DIV
1234 CLASS="VARIABLELIST"
1235 ><DL
1236 ><DT
1237 >Specifies:</DT
1238 ><DD
1239 ><P
1240 >    A URL to documentation about the local <SPAN
1241 CLASS="APPLICATION"
1242 >Privoxy</SPAN
1243 > setup,
1244     configuration or policies.
1245    </P
1246 ></DD
1247 ><DT
1248 >Type of value:</DT
1249 ><DD
1250 ><P
1251 >URL</P
1252 ></DD
1253 ><DT
1254 >Default value:</DT
1255 ><DD
1256 ><P
1257 ><I
1258 CLASS="EMPHASIS"
1259 >Unset</I
1260 ></P
1261 ></DD
1262 ><DT
1263 >Effect if unset:</DT
1264 ><DD
1265 ><P
1266 >    No link to local documentation is displayed on error pages and the CGI user interface.
1267    </P
1268 ></DD
1269 ><DT
1270 >Notes:</DT
1271 ><DD
1272 ><P
1273 >    If both <TT
1274 CLASS="LITERAL"
1275 >admin-address</TT
1276 > and <TT
1277 CLASS="LITERAL"
1278 >proxy-info-url</TT
1279 >
1280     are unset, the whole "Local Privoxy Support" box on all generated pages will
1281     not be shown.
1282    </P
1283 ><P
1284 >    This URL shouldn't be blocked ;-)
1285    </P
1286 ></DD
1287 ></DL
1288 ></DIV
1289 ></DIV
1290 ></DIV
1291 ><DIV
1292 CLASS="SECT3"
1293 ><H3
1294 CLASS="SECT3"
1295 ><A
1296 NAME="DEBUGGING"
1297 >7.3.3. Debugging</A
1298 ></H3
1299 ><P
1300 >  These options are mainly useful when tracing a problem.
1301   Note that you might also want to invoke
1302   <SPAN
1303 CLASS="APPLICATION"
1304 >Privoxy</SPAN
1305 > with the <TT
1306 CLASS="LITERAL"
1307 >--no-daemon</TT
1308 >
1309   command line option when debugging.
1310  </P
1311 ><DIV
1312 CLASS="SECT4"
1313 ><H4
1314 CLASS="SECT4"
1315 ><A
1316 NAME="DEBUG"
1317 >7.3.3.1. debug</A
1318 ></H4
1319 ><P
1320 ></P
1321 ><DIV
1322 CLASS="VARIABLELIST"
1323 ><DL
1324 ><DT
1325 >Specifies:</DT
1326 ><DD
1327 ><P
1328 >    Key values that determine what information gets logged.
1329    </P
1330 ></DD
1331 ><DT
1332 >Type of value:</DT
1333 ><DD
1334 ><P
1335 >Integer values</P
1336 ></DD
1337 ><DT
1338 >Default value:</DT
1339 ><DD
1340 ><P
1341 >12289 (i.e.: URLs plus informational and warning messages)</P
1342 ></DD
1343 ><DT
1344 >Effect if unset:</DT
1345 ><DD
1346 ><P
1347 >    Nothing gets logged.
1348    </P
1349 ></DD
1350 ><DT
1351 >Notes:</DT
1352 ><DD
1353 ><P
1354 >    The available debug levels are:
1355    </P
1356 ><P
1357 >    <TABLE
1358 BORDER="0"
1359 BGCOLOR="#E0E0E0"
1360 WIDTH="90%"
1361 ><TR
1362 ><TD
1363 ><PRE
1364 CLASS="PROGRAMLISTING"
1365 >  debug         1 # show each GET/POST/CONNECT request
1366   debug         2 # show each connection status
1367   debug         4 # show I/O status
1368   debug         8 # show header parsing
1369   debug        16 # log all data into the logfile
1370   debug        32 # debug force feature
1371   debug        64 # debug regular expression filter 
1372   debug       128 # debug fast redirects
1373   debug       256 # debug GIF de-animation
1374   debug       512 # Common Log Format
1375   debug      1024 # debug kill pop-ups
1376   debug      4096 # Startup banner and warnings.
1377   debug      8192 # Non-fatal errors</PRE
1378 ></TD
1379 ></TR
1380 ></TABLE
1381 >
1382    </P
1383 ><P
1384 >    To select multiple debug levels, you can either add them or use
1385     multiple <TT
1386 CLASS="LITERAL"
1387 >debug</TT
1388 > lines.
1389    </P
1390 ><P
1391 >    A debug level of 1 is informative because it will show you each request
1392     as it happens. <I
1393 CLASS="EMPHASIS"
1394 >1, 4096 and 8192 are highly recommended</I
1395 >
1396     so that you will notice when things go wrong. The other levels are probably
1397     only of interest if you are hunting down a specific problem. They can produce
1398     a hell of an output (especially 16).
1399     
1400    </P
1401 ><P
1402 >    The reporting of <I
1403 CLASS="EMPHASIS"
1404 >fatal</I
1405 > errors (i.e. ones which crash 
1406     <SPAN
1407 CLASS="APPLICATION"
1408 >Privoxy</SPAN
1409 >) is always on and cannot be disabled.
1410    </P
1411 ><P
1412 >    If you want to use CLF (Common Log Format), you should set <SPAN
1413 CLASS="QUOTE"
1414 >"debug
1415     512"</SPAN
1416 > <I
1417 CLASS="EMPHASIS"
1418 >ONLY</I
1419 > and not enable anything else.
1420    </P
1421 ></DD
1422 ></DL
1423 ></DIV
1424 ></DIV
1425 ><DIV
1426 CLASS="SECT4"
1427 ><H4
1428 CLASS="SECT4"
1429 ><A
1430 NAME="SINGLE-THREADED"
1431 >7.3.3.2. single-threaded</A
1432 ></H4
1433 ><P
1434 ></P
1435 ><DIV
1436 CLASS="VARIABLELIST"
1437 ><DL
1438 ><DT
1439 >Specifies:</DT
1440 ><DD
1441 ><P
1442 >    Whether to run only one server thread
1443    </P
1444 ></DD
1445 ><DT
1446 >Type of value:</DT
1447 ><DD
1448 ><P
1449 ><I
1450 CLASS="EMPHASIS"
1451 >None</I
1452 ></P
1453 ></DD
1454 ><DT
1455 >Default value:</DT
1456 ><DD
1457 ><P
1458 ><I
1459 CLASS="EMPHASIS"
1460 >Unset</I
1461 ></P
1462 ></DD
1463 ><DT
1464 >Effect if unset:</DT
1465 ><DD
1466 ><P
1467 >    Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to
1468     serve multiple requests simultaneously.
1469    </P
1470 ></DD
1471 ><DT
1472 >Notes:</DT
1473 ><DD
1474 ><P
1475 >    This option is only there for debug purposes and you should never
1476     need to use it. <I
1477 CLASS="EMPHASIS"
1478 >It will drastically reduce performance.</I
1479 >
1480    </P
1481 ></DD
1482 ></DL
1483 ></DIV
1484 ></DIV
1485 ></DIV
1486 ><DIV
1487 CLASS="SECT3"
1488 ><H3
1489 CLASS="SECT3"
1490 ><A
1491 NAME="ACCESS-CONTROL"
1492 >7.3.4. Access Control and Security</A
1493 ></H3
1494 ><P
1495 >  This section of the config file controls the security-relevant aspects
1496   of <SPAN
1497 CLASS="APPLICATION"
1498 >Privoxy</SPAN
1499 >'s configuration.
1500  </P
1501 ><DIV
1502 CLASS="SECT4"
1503 ><H4
1504 CLASS="SECT4"
1505 ><A
1506 NAME="LISTEN-ADDRESS"
1507 >7.3.4.1. listen-address</A
1508 ></H4
1509 ><P
1510 ></P
1511 ><DIV
1512 CLASS="VARIABLELIST"
1513 ><DL
1514 ><DT
1515 >Specifies:</DT
1516 ><DD
1517 ><P
1518 >    The IP address and TCP port on which <SPAN
1519 CLASS="APPLICATION"
1520 >Privoxy</SPAN
1521 > will
1522     listen for client requests.
1523    </P
1524 ></DD
1525 ><DT
1526 >Type of value:</DT
1527 ><DD
1528 ><P
1529 >[<TT
1530 CLASS="REPLACEABLE"
1531 ><I
1532 >IP-Address</I
1533 ></TT
1534 >]:<TT
1535 CLASS="REPLACEABLE"
1536 ><I
1537 >Port</I
1538 ></TT
1539 ></P
1540 ></DD
1541 ><DT
1542 >Default value:</DT
1543 ><DD
1544 ><P
1545 >localhost:8118</P
1546 ></DD
1547 ><DT
1548 >Effect if unset:</DT
1549 ><DD
1550 ><P
1551 >    Bind to localhost (127.0.0.1), port 8118. This is suitable and recommended for
1552     home users who run <SPAN
1553 CLASS="APPLICATION"
1554 >Privoxy</SPAN
1555 > on the same machine as
1556     their browser.
1557    </P
1558 ></DD
1559 ><DT
1560 >Notes:</DT
1561 ><DD
1562 ><P
1563 >    You will need to configure your browser(s) to this proxy address and port.
1564    </P
1565 ><P
1566 >    If you already have another service running on port 8118, or if you want to
1567     serve requests from other machines (e.g. on your local network) as well, you
1568     will need to override the default.
1569    </P
1570 ><P
1571 >    If you leave out the IP address, <SPAN
1572 CLASS="APPLICATION"
1573 >Privoxy</SPAN
1574 > will
1575     bind to all interfaces (addresses) on your machine and may become reachable
1576     from the Internet. In that case, consider using access control lists (ACL's)
1577     (see <SPAN
1578 CLASS="QUOTE"
1579 >"ACLs"</SPAN
1580 > below), or a firewall.
1581    </P
1582 ></DD
1583 ><DT
1584 >Example:</DT
1585 ><DD
1586 ><P
1587 >     Suppose you are running <SPAN
1588 CLASS="APPLICATION"
1589 >Privoxy</SPAN
1590 > on
1591      a machine which has the address 192.168.0.1 on your local private network
1592      (192.168.0.0) and has another outside connection with a different address.
1593      You want it to serve requests from inside only:
1594    </P
1595 ><P
1596 >    <TABLE
1597 BORDER="0"
1598 BGCOLOR="#E0E0E0"
1599 WIDTH="90%"
1600 ><TR
1601 ><TD
1602 ><PRE
1603 CLASS="PROGRAMLISTING"
1604 >  listen-address  192.168.0.1:8118</PRE
1605 ></TD
1606 ></TR
1607 ></TABLE
1608 >
1609    </P
1610 ></DD
1611 ></DL
1612 ></DIV
1613 ></DIV
1614 ><DIV
1615 CLASS="SECT4"
1616 ><H4
1617 CLASS="SECT4"
1618 ><A
1619 NAME="TOGGLE"
1620 >7.3.4.2. toggle</A
1621 ></H4
1622 ><P
1623 ></P
1624 ><DIV
1625 CLASS="VARIABLELIST"
1626 ><DL
1627 ><DT
1628 >Specifies:</DT
1629 ><DD
1630 ><P
1631 >    Initial state of "toggle" status
1632    </P
1633 ></DD
1634 ><DT
1635 >Type of value:</DT
1636 ><DD
1637 ><P
1638 >1 or 0</P
1639 ></DD
1640 ><DT
1641 >Default value:</DT
1642 ><DD
1643 ><P
1644 >1</P
1645 ></DD
1646 ><DT
1647 >Effect if unset:</DT
1648 ><DD
1649 ><P
1650 >    Act as if toggled on
1651    </P
1652 ></DD
1653 ><DT
1654 >Notes:</DT
1655 ><DD
1656 ><P
1657 >    If set to 0, <SPAN
1658 CLASS="APPLICATION"
1659 >Privoxy</SPAN
1660 > will start in
1661     <SPAN
1662 CLASS="QUOTE"
1663 >"toggled off"</SPAN
1664 > mode, i.e. behave like a normal, content-neutral
1665     proxy. See <TT
1666 CLASS="LITERAL"
1667 >enable-remote-toggle</TT
1668 >
1669     below. This is not really useful anymore, since toggling is much easier
1670     via <A
1671 HREF="http://config.privoxy.org/toggle"
1672 TARGET="_top"
1673 >the web
1674     interface</A
1675 > then via editing the <TT
1676 CLASS="FILENAME"
1677 >conf</TT
1678 > file.
1679    </P
1680 ><P
1681 >    The windows version will only display the toggle icon in the system tray
1682     if this option is present.
1683    </P
1684 ></DD
1685 ></DL
1686 ></DIV
1687 ></DIV
1688 ><DIV
1689 CLASS="SECT4"
1690 ><H4
1691 CLASS="SECT4"
1692 ><A
1693 NAME="ENABLE-REMOTE-TOGGLE"
1694 >7.3.4.3. enable-remote-toggle</A
1695 ></H4
1696 ><P
1697 ></P
1698 ><DIV
1699 CLASS="VARIABLELIST"
1700 ><DL
1701 ><DT
1702 >Specifies:</DT
1703 ><DD
1704 ><P
1705 >    Whether or not the <A
1706 HREF="http://config.privoxy.org/toggle"
1707 TARGET="_top"
1708 >web-based toggle
1709     feature</A
1710 > may be used
1711    </P
1712 ></DD
1713 ><DT
1714 >Type of value:</DT
1715 ><DD
1716 ><P
1717 >0 or 1</P
1718 ></DD
1719 ><DT
1720 >Default value:</DT
1721 ><DD
1722 ><P
1723 >1</P
1724 ></DD
1725 ><DT
1726 >Effect if unset:</DT
1727 ><DD
1728 ><P
1729 >    The web-based toggle feature is disabled.
1730    </P
1731 ></DD
1732 ><DT
1733 >Notes:</DT
1734 ><DD
1735 ><P
1736 >    When toggled off, <SPAN
1737 CLASS="APPLICATION"
1738 >Privoxy</SPAN
1739 > acts like a normal,
1740     content-neutral proxy, i.e. it acts as if none of the actions applied to
1741     any URL.
1742    </P
1743 ><P
1744 >    For the time being, access to the toggle feature can <I
1745 CLASS="EMPHASIS"
1746 >not</I
1747 > be
1748     controlled separately by <SPAN
1749 CLASS="QUOTE"
1750 >"ACLs"</SPAN
1751 > or HTTP authentication,
1752     so that everybody who can access <SPAN
1753 CLASS="APPLICATION"
1754 >Privoxy</SPAN
1755 > (see
1756     <SPAN
1757 CLASS="QUOTE"
1758 >"ACLs"</SPAN
1759 > and <TT
1760 CLASS="LITERAL"
1761 >listen-address</TT
1762 > above) can
1763     toggle it for all users. So this option is <I
1764 CLASS="EMPHASIS"
1765 >not recommended</I
1766 >
1767     for multi-user environments with untrusted users.
1768    </P
1769 ><P
1770 >    Note that you must have compiled <SPAN
1771 CLASS="APPLICATION"
1772 >Privoxy</SPAN
1773 > with
1774     support for this feature, otherwise this option has no effect. 
1775    </P
1776 ></DD
1777 ></DL
1778 ></DIV
1779 ></DIV
1780 ><DIV
1781 CLASS="SECT4"
1782 ><H4
1783 CLASS="SECT4"
1784 ><A
1785 NAME="ENABLE-EDIT-ACTIONS"
1786 >7.3.4.4. enable-edit-actions</A
1787 ></H4
1788 ><P
1789 ></P
1790 ><DIV
1791 CLASS="VARIABLELIST"
1792 ><DL
1793 ><DT
1794 >Specifies:</DT
1795 ><DD
1796 ><P
1797 >    Whether or not the <A
1798 HREF="http://config.privoxy.org/show-status"
1799 TARGET="_top"
1800 >web-based actions
1801     file editor</A
1802 > may be used
1803    </P
1804 ></DD
1805 ><DT
1806 >Type of value:</DT
1807 ><DD
1808 ><P
1809 >0 or 1</P
1810 ></DD
1811 ><DT
1812 >Default value:</DT
1813 ><DD
1814 ><P
1815 >1</P
1816 ></DD
1817 ><DT
1818 >Effect if unset:</DT
1819 ><DD
1820 ><P
1821 >    The web-based actions file editor is disabled.
1822    </P
1823 ></DD
1824 ><DT
1825 >Notes:</DT
1826 ><DD
1827 ><P
1828 >    For the time being, access to the editor can <I
1829 CLASS="EMPHASIS"
1830 >not</I
1831 > be
1832     controlled separately by <SPAN
1833 CLASS="QUOTE"
1834 >"ACLs"</SPAN
1835 > or HTTP authentication,
1836     so that everybody who can access <SPAN
1837 CLASS="APPLICATION"
1838 >Privoxy</SPAN
1839 > (see
1840     <SPAN
1841 CLASS="QUOTE"
1842 >"ACLs"</SPAN
1843 > and <TT
1844 CLASS="LITERAL"
1845 >listen-address</TT
1846 > above) can
1847     modify its configuration for all users. So this option is <I
1848 CLASS="EMPHASIS"
1849 >not
1850     recommended</I
1851 > for multi-user environments with untrusted users.
1852    </P
1853 ><P
1854 >    Note that you must have compiled <SPAN
1855 CLASS="APPLICATION"
1856 >Privoxy</SPAN
1857 > with
1858     support for this feature, otherwise this option has no effect. 
1859    </P
1860 ></DD
1861 ></DL
1862 ></DIV
1863 ></DIV
1864 ><DIV
1865 CLASS="SECT4"
1866 ><H4
1867 CLASS="SECT4"
1868 ><A
1869 NAME="ACLS"
1870 >7.3.4.5. <A
1871 NAME="PERMIT-ACCES"
1872 ></A
1873 >
1874 <A
1875 NAME="DENY-ACCES"
1876 ></A
1877 >
1878 ACLs: permit-access and deny-access</A
1879 ></H4
1880 ><P
1881 ></P
1882 ><DIV
1883 CLASS="VARIABLELIST"
1884 ><DL
1885 ><DT
1886 >Specifies:</DT
1887 ><DD
1888 ><P
1889 >    Who can access what.
1890    </P
1891 ></DD
1892 ><DT
1893 >Type of value:</DT
1894 ><DD
1895 ><P
1896 >    <TT
1897 CLASS="REPLACEABLE"
1898 ><I
1899 >src_addr</I
1900 ></TT
1901 >[/<TT
1902 CLASS="REPLACEABLE"
1903 ><I
1904 >src_masklen</I
1905 ></TT
1906 >]
1907     [<TT
1908 CLASS="REPLACEABLE"
1909 ><I
1910 >dst_addr</I
1911 ></TT
1912 >[/<TT
1913 CLASS="REPLACEABLE"
1914 ><I
1915 >dst_masklen</I
1916 ></TT
1917 >]]
1918    </P
1919 ><P
1920 >    Where <TT
1921 CLASS="REPLACEABLE"
1922 ><I
1923 >src_addr</I
1924 ></TT
1925 > and 
1926    <TT
1927 CLASS="REPLACEABLE"
1928 ><I
1929 >dst_addr</I
1930 ></TT
1931 > are IP addresses in dotted decimal notation or valid
1932     DNS names, and <TT
1933 CLASS="REPLACEABLE"
1934 ><I
1935 >src_masklen</I
1936 ></TT
1937 > and
1938     <TT
1939 CLASS="REPLACEABLE"
1940 ><I
1941 >dst_masklen</I
1942 ></TT
1943 > are subnet masks in CIDR notation, i.e. integer
1944     values from 2 to 30 representing the length (in bits) of the network address. The masks and the whole
1945     destination part are optional.
1946    </P
1947 ></DD
1948 ><DT
1949 >Default value:</DT
1950 ><DD
1951 ><P
1952 ><I
1953 CLASS="EMPHASIS"
1954 >Unset</I
1955 ></P
1956 ></DD
1957 ><DT
1958 >Effect if unset:</DT
1959 ><DD
1960 ><P
1961 >    Don't restrict access further than implied by <TT
1962 CLASS="LITERAL"
1963 >listen-address</TT
1964 >
1965    </P
1966 ></DD
1967 ><DT
1968 >Notes:</DT
1969 ><DD
1970 ><P
1971 >    Access controls are included at the request of ISPs and systems
1972     administrators, and <I
1973 CLASS="EMPHASIS"
1974 >are not usually needed by individual users</I
1975 >.
1976     For a typical home user, it will normally suffice to ensure that 
1977     <SPAN
1978 CLASS="APPLICATION"
1979 >Privoxy</SPAN
1980 > only listens on the localhost or internal (home)
1981     network address by means of the <TT
1982 CLASS="LITERAL"
1983 >listen-address</TT
1984 > option.
1985    </P
1986 ><P
1987 >    Please see the warnings in the FAQ that this proxy is not intended to be a substitute
1988     for a firewall or to encourage anyone to defer addressing basic security
1989     weaknesses.
1990    </P
1991 ><P
1992 >    Multiple ACL lines are OK.
1993     If any ACLs are specified, then the <SPAN
1994 CLASS="APPLICATION"
1995 >Privoxy</SPAN
1996 >
1997     talks only to IP addresses that match at least one <TT
1998 CLASS="LITERAL"
1999 >permit-access</TT
2000 > line
2001     and don't match any subsequent <TT
2002 CLASS="LITERAL"
2003 >deny-access</TT
2004 > line. In other words, the
2005     last match wins, with the default being <TT
2006 CLASS="LITERAL"
2007 >deny-access</TT
2008 >.
2009    </P
2010 ><P
2011 >    If <SPAN
2012 CLASS="APPLICATION"
2013 >Privoxy</SPAN
2014 > is using a forwarder (see <TT
2015 CLASS="LITERAL"
2016 >forward</TT
2017 > below)
2018     for a particular destination URL, the <TT
2019 CLASS="REPLACEABLE"
2020 ><I
2021 >dst_addr</I
2022 ></TT
2023 >
2024     that is examined is the address of the forwarder and <I
2025 CLASS="EMPHASIS"
2026 >NOT</I
2027 > the address
2028     of the ultimate target. This is necessary because it may be impossible for the local
2029     <SPAN
2030 CLASS="APPLICATION"
2031 >Privoxy</SPAN
2032 > to determine the IP address of the
2033     ultimate target (that's often what gateways are used for).
2034    </P
2035 ><P
2036 >    You should prefer using IP addresses over DNS names, because the address lookups take
2037     time. All DNS names must resolve! You can <I
2038 CLASS="EMPHASIS"
2039 >not</I
2040 > use domain patterns
2041     like <SPAN
2042 CLASS="QUOTE"
2043 >"*.org"</SPAN
2044 > or partial domain names. If a DNS name resolves to multiple
2045     IP addresses, only the first one is used.
2046    </P
2047 ><P
2048 >    Denying access to particular sites by ACL may have undesired side effects
2049     if the site in question is hosted on a machine which also hosts other sites.
2050    </P
2051 ></DD
2052 ><DT
2053 >Examples:</DT
2054 ><DD
2055 ><P
2056 >    Explicitly define the default behavior if no ACL and
2057     <TT
2058 CLASS="LITERAL"
2059 >listen-address</TT
2060 > are set: <SPAN
2061 CLASS="QUOTE"
2062 >"localhost"</SPAN
2063 >
2064     is OK. The absence of a <TT
2065 CLASS="REPLACEABLE"
2066 ><I
2067 >dst_addr</I
2068 ></TT
2069 > implies that
2070     <I
2071 CLASS="EMPHASIS"
2072 >all</I
2073 > destination addresses are OK:
2074    </P
2075 ><P
2076 >    <TABLE
2077 BORDER="0"
2078 BGCOLOR="#E0E0E0"
2079 WIDTH="90%"
2080 ><TR
2081 ><TD
2082 ><PRE
2083 CLASS="SCREEN"
2084 >  permit-access  localhost</PRE
2085 ></TD
2086 ></TR
2087 ></TABLE
2088 >
2089    </P
2090 ><P
2091 >    Allow any host on the same class C subnet as www.privoxy.org access to
2092     nothing but www.example.com:
2093    </P
2094 ><P
2095 >    <TABLE
2096 BORDER="0"
2097 BGCOLOR="#E0E0E0"
2098 WIDTH="90%"
2099 ><TR
2100 ><TD
2101 ><PRE
2102 CLASS="SCREEN"
2103 >  permit-access  www.privoxy.org/24 www.example.com/32</PRE
2104 ></TD
2105 ></TR
2106 ></TABLE
2107 >
2108    </P
2109 ><P
2110 >    Allow access from any host on the 26-bit subnet 192.168.45.64 to anywhere,
2111     with the exception that 192.168.45.73 may not access www.dirty-stuff.example.com:
2112    </P
2113 ><P
2114 >    <TABLE
2115 BORDER="0"
2116 BGCOLOR="#E0E0E0"
2117 WIDTH="90%"
2118 ><TR
2119 ><TD
2120 ><PRE
2121 CLASS="SCREEN"
2122 >  permit-access  192.168.45.64/26
2123   deny-access    192.168.45.73    www.dirty-stuff.example.com</PRE
2124 ></TD
2125 ></TR
2126 ></TABLE
2127 >
2128    </P
2129 ></DD
2130 ></DL
2131 ></DIV
2132 ></DIV
2133 ><DIV
2134 CLASS="SECT4"
2135 ><H4
2136 CLASS="SECT4"
2137 ><A
2138 NAME="BUFFER-LIMIT"
2139 >7.3.4.6. buffer-limit</A
2140 ></H4
2141 ><P
2142 ></P
2143 ><DIV
2144 CLASS="VARIABLELIST"
2145 ><DL
2146 ><DT
2147 >Specifies:</DT
2148 ><DD
2149 ><P
2150 >    Maximum size of the buffer for content filtering.
2151    </P
2152 ></DD
2153 ><DT
2154 >Type of value:</DT
2155 ><DD
2156 ><P
2157 >Size in Kbytes</P
2158 ></DD
2159 ><DT
2160 >Default value:</DT
2161 ><DD
2162 ><P
2163 >4096</P
2164 ></DD
2165 ><DT
2166 >Effect if unset:</DT
2167 ><DD
2168 ><P
2169 >    Use a 4MB (4096 KB) limit.
2170    </P
2171 ></DD
2172 ><DT
2173 >Notes:</DT
2174 ><DD
2175 ><P
2176 >    For content filtering, i.e. the <TT
2177 CLASS="LITERAL"
2178 >+filter</TT
2179 > and
2180     <TT
2181 CLASS="LITERAL"
2182 >+deanimate-gif</TT
2183 > actions, it is necessary that 
2184     <SPAN
2185 CLASS="APPLICATION"
2186 >Privoxy</SPAN
2187 > buffers the entire document body.
2188     This can be potentially dangerous, since a server could just keep sending
2189     data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
2190     Hence this option.
2191    </P
2192 ><P
2193 >    When a document buffer size reaches the <TT
2194 CLASS="LITERAL"
2195 >buffer-limit</TT
2196 >, it is
2197     flushed to the client unfiltered and no further attempt to
2198     filter the rest of the document is made. Remember that there may be multiple threads
2199     running, which might require up to <TT
2200 CLASS="LITERAL"
2201 >buffer-limit</TT
2202 > Kbytes
2203     <I
2204 CLASS="EMPHASIS"
2205 >each</I
2206 >, unless you have enabled <SPAN
2207 CLASS="QUOTE"
2208 >"single-threaded"</SPAN
2209 >
2210     above.
2211    </P
2212 ></DD
2213 ></DL
2214 ></DIV
2215 ></DIV
2216 ></DIV
2217 ><DIV
2218 CLASS="SECT3"
2219 ><H3
2220 CLASS="SECT3"
2221 ><A
2222 NAME="FORWARDING"
2223 >7.3.5. Forwarding</A
2224 ></H3
2225 ><P
2226 > This feature allows routing of HTTP requests through a chain of
2227  multiple proxies.
2228  It can be used to better protect privacy and confidentiality when
2229  accessing specific domains by routing requests to those domains
2230  through an anonymous public proxy (see e.g. <A
2231 HREF="http://www.multiproxy.org/anon_list.htm"
2232 TARGET="_top"
2233 >http://www.multiproxy.org/anon_list.htm</A
2234 >)
2235  Or to use a caching proxy to speed up browsing. Or chaining to a parent
2236  proxy may be necessary because the machine that <SPAN
2237 CLASS="APPLICATION"
2238 >Privoxy</SPAN
2239 >
2240  runs on has no direct Internet access.</P
2241 ><P
2242 > Also specified here are SOCKS proxies. <SPAN
2243 CLASS="APPLICATION"
2244 >Privoxy</SPAN
2245 >
2246  supports the SOCKS 4 and SOCKS 4A protocols.</P
2247 ><DIV
2248 CLASS="SECT4"
2249 ><H4
2250 CLASS="SECT4"
2251 ><A
2252 NAME="FORWARD"
2253 >7.3.5.1. forward</A
2254 ></H4
2255 ><P
2256 ></P
2257 ><DIV
2258 CLASS="VARIABLELIST"
2259 ><DL
2260 ><DT
2261 >Specifies:</DT
2262 ><DD
2263 ><P
2264 >    To which parent HTTP proxy specific requests should be routed.
2265    </P
2266 ></DD
2267 ><DT
2268 >Type of value:</DT
2269 ><DD
2270 ><P
2271 >    <TT
2272 CLASS="REPLACEABLE"
2273 ><I
2274 >target_domain</I
2275 ></TT
2276 >[:<TT
2277 CLASS="REPLACEABLE"
2278 ><I
2279 >port</I
2280 ></TT
2281 >]
2282     <TT
2283 CLASS="REPLACEABLE"
2284 ><I
2285 >http_parent</I
2286 ></TT
2287 >[/<TT
2288 CLASS="REPLACEABLE"
2289 ><I
2290 >port</I
2291 ></TT
2292 >]
2293    </P
2294 ><P
2295 >    Where <TT
2296 CLASS="REPLACEABLE"
2297 ><I
2298 >target_domain</I
2299 ></TT
2300 > is a domain name pattern (see the
2301     chapter on domain matching in the <TT
2302 CLASS="FILENAME"
2303 >default.action</TT
2304 > file),
2305     <TT
2306 CLASS="REPLACEABLE"
2307 ><I
2308 >http_parent</I
2309 ></TT
2310 > is the address of the parent HTTP proxy
2311     as an IP addresses in dotted decimal notation or as a valid DNS name (or <SPAN
2312 CLASS="QUOTE"
2313 >"."</SPAN
2314 > to denote
2315     <SPAN
2316 CLASS="QUOTE"
2317 >"no forwarding"</SPAN
2318 >, and the optional 
2319     <TT
2320 CLASS="REPLACEABLE"
2321 ><I
2322 >port</I
2323 ></TT
2324 > parameters are TCP ports, i.e. integer
2325     values from 1 to 64535
2326    </P
2327 ></DD
2328 ><DT
2329 >Default value:</DT
2330 ><DD
2331 ><P
2332 ><I
2333 CLASS="EMPHASIS"
2334 >Unset</I
2335 ></P
2336 ></DD
2337 ><DT
2338 >Effect if unset:</DT
2339 ><DD
2340 ><P
2341 >    Don't use parent HTTP proxies.
2342    </P
2343 ></DD
2344 ><DT
2345 >Notes:</DT
2346 ><DD
2347 ><P
2348 >    If <TT
2349 CLASS="REPLACEABLE"
2350 ><I
2351 >http_parent</I
2352 ></TT
2353 > is <SPAN
2354 CLASS="QUOTE"
2355 >"."</SPAN
2356 >, then requests are not
2357     forwarded to another HTTP proxy but are made directly to the web servers.
2358    </P
2359 ><P
2360 >    Multiple lines are OK, they are checked in sequence, and the last match wins.
2361    </P
2362 ></DD
2363 ><DT
2364 >Examples:</DT
2365 ><DD
2366 ><P
2367 >    Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle):
2368    </P
2369 ><P
2370 >    <TABLE
2371 BORDER="0"
2372 BGCOLOR="#E0E0E0"
2373 WIDTH="90%"
2374 ><TR
2375 ><TD
2376 ><PRE
2377 CLASS="SCREEN"
2378 >  forward   .*     anon-proxy.example.org:8080
2379   forward   :443   .</PRE
2380 ></TD
2381 ></TR
2382 ></TABLE
2383 >
2384    </P
2385 ><P
2386 >    Everything goes to our example ISP's caching proxy, except for requests
2387     to that ISP's sites:
2388    </P
2389 ><P
2390 >    <TABLE
2391 BORDER="0"
2392 BGCOLOR="#E0E0E0"
2393 WIDTH="90%"
2394 ><TR
2395 ><TD
2396 ><PRE
2397 CLASS="SCREEN"
2398 >  forward   .*.                caching-proxy.example-isp.net:8000
2399   forward   .example-isp.net   .</PRE
2400 ></TD
2401 ></TR
2402 ></TABLE
2403 >
2404    </P
2405 ></DD
2406 ></DL
2407 ></DIV
2408 ></DIV
2409 ><DIV
2410 CLASS="SECT4"
2411 ><H4
2412 CLASS="SECT4"
2413 ><A
2414 NAME="SOCKS"
2415 >7.3.5.2. <A
2416 NAME="FORWARD-SOCKS4"
2417 ></A
2418 >
2419 <A
2420 NAME="FORWARD-SOCKS4A"
2421 ></A
2422 >
2423 forward-socks4 and forward-socks4a</A
2424 ></H4
2425 ><P
2426 ></P
2427 ><DIV
2428 CLASS="VARIABLELIST"
2429 ><DL
2430 ><DT
2431 >Specifies:</DT
2432 ><DD
2433 ><P
2434 >    Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed.
2435    </P
2436 ></DD
2437 ><DT
2438 >Type of value:</DT
2439 ><DD
2440 ><P
2441 >    <TT
2442 CLASS="REPLACEABLE"
2443 ><I
2444 >target_domain</I
2445 ></TT
2446 >[:<TT
2447 CLASS="REPLACEABLE"
2448 ><I
2449 >port</I
2450 ></TT
2451 >]
2452     <TT
2453 CLASS="REPLACEABLE"
2454 ><I
2455 >socks_proxy</I
2456 ></TT
2457 >[/<TT
2458 CLASS="REPLACEABLE"
2459 ><I
2460 >port</I
2461 ></TT
2462 >]
2463     <TT
2464 CLASS="REPLACEABLE"
2465 ><I
2466 >http_parent</I
2467 ></TT
2468 >[/<TT
2469 CLASS="REPLACEABLE"
2470 ><I
2471 >port</I
2472 ></TT
2473 >]
2474    </P
2475 ><P
2476 >    Where <TT
2477 CLASS="REPLACEABLE"
2478 ><I
2479 >target_domain</I
2480 ></TT
2481 > is a domain name pattern (see the
2482     chapter on domain matching in the <TT
2483 CLASS="FILENAME"
2484 >default.action</TT
2485 > file),
2486     <TT
2487 CLASS="REPLACEABLE"
2488 ><I
2489 >http_parent</I
2490 ></TT
2491 > and <TT
2492 CLASS="REPLACEABLE"
2493 ><I
2494 >socks_proxy</I
2495 ></TT
2496 >
2497     are IP addresses in dotted decimal notation or valid DNS names (<TT
2498 CLASS="REPLACEABLE"
2499 ><I
2500 >http_parent</I
2501 ></TT
2502 >
2503     may be <SPAN
2504 CLASS="QUOTE"
2505 >"."</SPAN
2506 > to denote <SPAN
2507 CLASS="QUOTE"
2508 >"no HTTP forwarding"</SPAN
2509 >), and the optional 
2510     <TT
2511 CLASS="REPLACEABLE"
2512 ><I
2513 >port</I
2514 ></TT
2515 > parameters are TCP ports, i.e. integer values from 1 to 64535
2516    </P
2517 ></DD
2518 ><DT
2519 >Default value:</DT
2520 ><DD
2521 ><P
2522 ><I
2523 CLASS="EMPHASIS"
2524 >Unset</I
2525 ></P
2526 ></DD
2527 ><DT
2528 >Effect if unset:</DT
2529 ><DD
2530 ><P
2531 >    Don't use SOCKS proxies.
2532    </P
2533 ></DD
2534 ><DT
2535 >Notes:</DT
2536 ><DD
2537 ><P
2538 >    Multiple lines are OK, they are checked in sequence, and the last match wins.
2539    </P
2540 ><P
2541 >    The difference between <TT
2542 CLASS="LITERAL"
2543 >forward-socks4</TT
2544 > and <TT
2545 CLASS="LITERAL"
2546 >forward-socks4a</TT
2547 >
2548     is that in the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS
2549     server, while in SOCKS 4 it happens locally.
2550    </P
2551 ><P
2552 >    If <TT
2553 CLASS="REPLACEABLE"
2554 ><I
2555 >http_parent</I
2556 ></TT
2557 > is <SPAN
2558 CLASS="QUOTE"
2559 >"."</SPAN
2560 >, then requests are not
2561     forwarded to another HTTP proxy but are made (HTTP-wise) directly to the web servers, albeit through
2562     a SOCKS proxy.
2563    </P
2564 ></DD
2565 ><DT
2566 >Examples:</DT
2567 ><DD
2568 ><P
2569 >     From the company example.com, direct connections are made to all
2570      <SPAN
2571 CLASS="QUOTE"
2572 >"internal"</SPAN
2573 > domains, but everything outbound goes through
2574      their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to
2575      the Internet.
2576    </P
2577 ><P
2578 >    <TABLE
2579 BORDER="0"
2580 BGCOLOR="#E0E0E0"
2581 WIDTH="90%"
2582 ><TR
2583 ><TD
2584 ><PRE
2585 CLASS="SCREEN"
2586 >  forward-socks4a   .*.            socks-gw.example.com:1080  www-cache.example-isp.net:8080
2587   forward           .example.com   .</PRE
2588 ></TD
2589 ></TR
2590 ></TABLE
2591 >
2592    </P
2593 ><P
2594 >    A rule that uses a SOCKS 4 gateway for all destinations but no HTTP parent looks like this:
2595    </P
2596 ><P
2597 >    <TABLE
2598 BORDER="0"
2599 BGCOLOR="#E0E0E0"
2600 WIDTH="90%"
2601 ><TR
2602 ><TD
2603 ><PRE
2604 CLASS="SCREEN"
2605 >  forward-socks4   .*.            socks-gw.example.com:1080  .</PRE
2606 ></TD
2607 ></TR
2608 ></TABLE
2609 >
2610    </P
2611 ></DD
2612 ></DL
2613 ></DIV
2614 ></DIV
2615 ><DIV
2616 CLASS="SECT4"
2617 ><H4
2618 CLASS="SECT4"
2619 ><A
2620 NAME="ADVANCED-FORWARDING-EXAMPLES"
2621 >7.3.5.3. Advanced Forwarding Examples</A
2622 ></H4
2623 ><P
2624 > If you have links to multiple ISPs that provide various special content 
2625  only to their subscribers, you can configure multiple <SPAN
2626 CLASS="APPLICATION"
2627 >Privoxies</SPAN
2628 >
2629  which have connections to the respective ISPs to act as forwarders to each other, so that
2630  <I
2631 CLASS="EMPHASIS"
2632 >your</I
2633 > users can see the internal content of all ISPs.</P
2634 ><P
2635 > Assume that host-a has a PPP connection to isp-a.net. And host-b has a PPP connection to
2636  isp-b.net. Both run <SPAN
2637 CLASS="APPLICATION"
2638 >Privoxy</SPAN
2639 >. Their forwarding
2640  configuration can look like this:</P
2641 ><P
2642 > host-a:</P
2643 ><P
2644 > <TABLE
2645 BORDER="0"
2646 BGCOLOR="#E0E0E0"
2647 WIDTH="100%"
2648 ><TR
2649 ><TD
2650 ><PRE
2651 CLASS="SCREEN"
2652 >  forward    .*.         .
2653   forward    .isp-b.net  host-b:8118</PRE
2654 ></TD
2655 ></TR
2656 ></TABLE
2657 ></P
2658 ><P
2659 > host-b:</P
2660 ><P
2661 > <TABLE
2662 BORDER="0"
2663 BGCOLOR="#E0E0E0"
2664 WIDTH="100%"
2665 ><TR
2666 ><TD
2667 ><PRE
2668 CLASS="SCREEN"
2669 >  forward    .*.         .
2670   forward    .isp-a.net  host-a:8118</PRE
2671 ></TD
2672 ></TR
2673 ></TABLE
2674 ></P
2675 ><P
2676 > Now, your users can set their browser's proxy to use either
2677  host-a or host-b and be able to browse the internal content
2678  of both isp-a and isp-b.</P
2679 ><P
2680 > If you intend to chain <SPAN
2681 CLASS="APPLICATION"
2682 >Privoxy</SPAN
2683 > and 
2684  <SPAN
2685 CLASS="APPLICATION"
2686 >squid</SPAN
2687 > locally, then chain as 
2688  <TT
2689 CLASS="LITERAL"
2690 >browser -&#62; squid -&#62; privoxy</TT
2691 > is the recommended way. </P
2692 ><P
2693 > Assuming that <SPAN
2694 CLASS="APPLICATION"
2695 >Privoxy</SPAN
2696 > and <SPAN
2697 CLASS="APPLICATION"
2698 >squid</SPAN
2699 >
2700  run on the same box, your squid configuration could then look like this:</P
2701 ><P
2702 > <TABLE
2703 BORDER="0"
2704 BGCOLOR="#E0E0E0"
2705 WIDTH="100%"
2706 ><TR
2707 ><TD
2708 ><PRE
2709 CLASS="SCREEN"
2710 >  # Define Privoxy as parent proxy (without ICP) 
2711   cache_peer 127.0.0.1 parent 8118 7 no-query 
2712
2713   # Define ACL for protocol FTP 
2714   acl ftp proto FTP 
2715
2716   # Do not forward FTP requests to Privoxy
2717   always_direct allow ftp 
2718
2719   # Forward all the rest to Privoxy
2720   never_direct allow all</PRE
2721 ></TD
2722 ></TR
2723 ></TABLE
2724 ></P
2725 ><P
2726 > You would then need to change your browser's proxy settings to <SPAN
2727 CLASS="APPLICATION"
2728 >squid</SPAN
2729 >'s address and port.
2730  Squid normally uses port 3128. If unsure consult <TT
2731 CLASS="LITERAL"
2732 >http_port</TT
2733 > in <TT
2734 CLASS="FILENAME"
2735 >squid.conf</TT
2736 >.</P
2737 ></DIV
2738 ></DIV
2739 ><DIV
2740 CLASS="SECT3"
2741 ><H3
2742 CLASS="SECT3"
2743 ><A
2744 NAME="WINDOWS-GUI"
2745 >7.3.6. Windows GUI Options</A
2746 ></H3
2747 ><P
2748 > <SPAN
2749 CLASS="APPLICATION"
2750 >Privoxy</SPAN
2751 > has a number of options specific to the
2752  Windows GUI interface:</P
2753 ><A
2754 NAME="ACTIVITY-ANIMATION"
2755 ></A
2756 ><P
2757 > If <SPAN
2758 CLASS="QUOTE"
2759 >"activity-animation"</SPAN
2760 > is set to 1, the
2761  <SPAN
2762 CLASS="APPLICATION"
2763 >Privoxy</SPAN
2764 > icon will animate when
2765  <SPAN
2766 CLASS="QUOTE"
2767 >"Privoxy"</SPAN
2768 > is active. To turn off, set to 0.</P
2769 ><P
2770 > <TT
2771 CLASS="LITERAL"
2772 >  <P
2773 CLASS="LITERALLAYOUT"
2774 >&nbsp;&nbsp;<I
2775 CLASS="EMPHASIS"
2776 >activity-animation   1</I
2777 ><br>
2778 &nbsp;&nbsp;&nbsp;</P
2779
2780  </TT
2781 ></P
2782 ><A
2783 NAME="LOG-MESSAGES"
2784 ></A
2785 ><P
2786 > If <SPAN
2787 CLASS="QUOTE"
2788 >"log-messages"</SPAN
2789 > is set to 1,
2790  <SPAN
2791 CLASS="APPLICATION"
2792 >Privoxy</SPAN
2793 > will log messages to the console
2794  window:</P
2795 ><P
2796 > <TT
2797 CLASS="LITERAL"
2798 >  <P
2799 CLASS="LITERALLAYOUT"
2800 >&nbsp;&nbsp;<I
2801 CLASS="EMPHASIS"
2802 >log-messages       1</I
2803 ><br>
2804 &nbsp;&nbsp;&nbsp;</P
2805
2806  </TT
2807 ></P
2808 ><A
2809 NAME="LOG-BUFFER-SIZE"
2810 ></A
2811 ><P
2812
2813  If <SPAN
2814 CLASS="QUOTE"
2815 >"log-buffer-size"</SPAN
2816 > is set to 1, the size of the log buffer,
2817  i.e. the amount of memory used for the log messages displayed in the
2818  console window, will be limited to <SPAN
2819 CLASS="QUOTE"
2820 >"log-max-lines"</SPAN
2821 > (see below).</P
2822 ><P
2823 > Warning: Setting this to 0 will result in the buffer to grow infinitely and
2824  eat up all your memory!</P
2825 ><P
2826 > <TT
2827 CLASS="LITERAL"
2828 >  <P
2829 CLASS="LITERALLAYOUT"
2830 >&nbsp;&nbsp;<I
2831 CLASS="EMPHASIS"
2832 >log-buffer-size      1</I
2833 ><br>
2834 &nbsp;&nbsp;&nbsp;</P
2835
2836  </TT
2837 ></P
2838 ><A
2839 NAME="LOG-MAX-LINES"
2840 ></A
2841 ><P
2842 > <SPAN
2843 CLASS="APPLICATION"
2844 >log-max-lines</SPAN
2845 > is the maximum number of lines held
2846  in the log buffer. See above.</P
2847 ><P
2848 > <TT
2849 CLASS="LITERAL"
2850 >  <P
2851 CLASS="LITERALLAYOUT"
2852 >&nbsp;&nbsp;<I
2853 CLASS="EMPHASIS"
2854 >log-max-lines      200</I
2855 ><br>
2856 &nbsp;&nbsp;&nbsp;</P
2857
2858  </TT
2859 ></P
2860 ><A
2861 NAME="LOG-HIGHLIGHT-MESSAGES"
2862 ></A
2863 ><P
2864 > If <SPAN
2865 CLASS="QUOTE"
2866 >"log-highlight-messages"</SPAN
2867 > is set to 1,
2868  <SPAN
2869 CLASS="APPLICATION"
2870 >Privoxy</SPAN
2871 > will highlight portions of the log
2872  messages with a bold-faced font:</P
2873 ><P
2874 > <TT
2875 CLASS="LITERAL"
2876 >  <P
2877 CLASS="LITERALLAYOUT"
2878 >&nbsp;&nbsp;<I
2879 CLASS="EMPHASIS"
2880 >log-highlight-messages   1</I
2881 ><br>
2882 &nbsp;&nbsp;&nbsp;</P
2883
2884  </TT
2885 ></P
2886 ><A
2887 NAME="LOG-FONT-NAME"
2888 ></A
2889 ><P
2890 > The font used in the console window:</P
2891 ><P
2892 > <TT
2893 CLASS="LITERAL"
2894 >  <P
2895 CLASS="LITERALLAYOUT"
2896 >&nbsp;&nbsp;<I
2897 CLASS="EMPHASIS"
2898 >log-font-name        Comic Sans MS</I
2899 ><br>
2900 &nbsp;&nbsp;&nbsp;</P
2901
2902  </TT
2903 ></P
2904 ><A
2905 NAME="LOG-FONT-SIZE"
2906 ></A
2907 ><P
2908 > Font size used in the console window:</P
2909 ><P
2910 > <TT
2911 CLASS="LITERAL"
2912 >  <P
2913 CLASS="LITERALLAYOUT"
2914 >&nbsp;&nbsp;<I
2915 CLASS="EMPHASIS"
2916 >log-font-size        8</I
2917 ><br>
2918 &nbsp;&nbsp;&nbsp;</P
2919
2920  </TT
2921 ></P
2922 ><A
2923 NAME="SHOW-ON-TASK-BAR"
2924 ></A
2925 ><P
2926 >  
2927  <SPAN
2928 CLASS="QUOTE"
2929 >"show-on-task-bar"</SPAN
2930 > controls whether or not
2931  <SPAN
2932 CLASS="APPLICATION"
2933 >Privoxy</SPAN
2934 > will appear as a button on the Task bar
2935  when minimized:</P
2936 ><P
2937 > <TT
2938 CLASS="LITERAL"
2939 >  <P
2940 CLASS="LITERALLAYOUT"
2941 >&nbsp;&nbsp;<I
2942 CLASS="EMPHASIS"
2943 >show-on-task-bar     0</I
2944 ><br>
2945 &nbsp;&nbsp;&nbsp;</P
2946
2947  </TT
2948 ></P
2949 ><A
2950 NAME="CLOSE-BUTTON-MINIMIZES"
2951 ></A
2952 ><P
2953 > If <SPAN
2954 CLASS="QUOTE"
2955 >"close-button-minimizes"</SPAN
2956 > is set to 1, the Windows close
2957  button will minimize <SPAN
2958 CLASS="APPLICATION"
2959 >Privoxy</SPAN
2960 > instead of closing
2961  the program (close with the exit option on the File menu).</P
2962 ><P
2963 > <TT
2964 CLASS="LITERAL"
2965 >  <P
2966 CLASS="LITERALLAYOUT"
2967 >&nbsp;&nbsp;<I
2968 CLASS="EMPHASIS"
2969 >close-button-minimizes  1</I
2970 ><br>
2971 &nbsp;&nbsp;&nbsp;</P
2972
2973  </TT
2974 ></P
2975 ><A
2976 NAME="HIDE-CONSOLE"
2977 ></A
2978 ><P
2979 > The <SPAN
2980 CLASS="QUOTE"
2981 >"hide-console"</SPAN
2982 > option is specific to the MS-Win console
2983  version of <SPAN
2984 CLASS="APPLICATION"
2985 >Privoxy</SPAN
2986 >. If this option is used,
2987  <SPAN
2988 CLASS="APPLICATION"
2989 >Privoxy</SPAN
2990 > will disconnect from and hide  the
2991  command console.</P
2992 ><P
2993 > <TT
2994 CLASS="LITERAL"
2995 >  <P
2996 CLASS="LITERALLAYOUT"
2997 >&nbsp;&nbsp;#hide-console<br>
2998 &nbsp;&nbsp;&nbsp;</P
2999
3000  </TT
3001 ></P
3002 ></DIV
3003 ></DIV
3004 ><DIV
3005 CLASS="SECT2"
3006 ><H2
3007 CLASS="SECT2"
3008 ><A
3009 NAME="ACTIONS-FILE"
3010 >7.4. Actions Files</A
3011 ></H2
3012 ><P
3013 > The actions files are used to define what actions
3014  <SPAN
3015 CLASS="APPLICATION"
3016 >Privoxy</SPAN
3017 > takes for which URLs, and thus determines
3018  how ad images, cookies and various other aspects of HTTP content and
3019  transactions are handled, and on which sites (or even parts thereof). There 
3020  are three such files included with <SPAN
3021 CLASS="APPLICATION"
3022 >Privoxy</SPAN
3023 >, 
3024  with slightly different purposes. <TT
3025 CLASS="FILENAME"
3026 >default.action</TT
3027 > sets
3028  the default policies. <TT
3029 CLASS="FILENAME"
3030 >standard.action</TT
3031 > is used by 
3032  <SPAN
3033 CLASS="APPLICATION"
3034 >Privoxy</SPAN
3035 > and the web based editor to set 
3036  pre-defined values (and normally should not be edited). Local exceptions 
3037  are best done in <TT
3038 CLASS="FILENAME"
3039 >user.action</TT
3040 >. The content of these 
3041  can all be viewed and edited from <A
3042 HREF="http://config.privoxy.org/show-status"
3043 TARGET="_top"
3044 >http://config.privoxy.org/show-status</A
3045 >.
3046  </P
3047 ><P
3048
3049  Anything you want can blocked, including ads, banners, or just some obnoxious
3050  URL that you would rather not see is done here. Cookies can be accepted or rejected, or
3051  accepted only during the current browser session (i.e. not written to disk),
3052  content can be modified, JavaScripts tamed, user-tracking fooled, and much more.
3053  See below for a complete list of available actions.</P
3054 ><P
3055 > An actions file typically has sections. Near the top, <SPAN
3056 CLASS="QUOTE"
3057 >"aliases"</SPAN
3058 > are 
3059  optionally defined (discussed <A
3060 HREF="configuration.html#ALIASES"
3061 TARGET="_top"
3062 >below</A
3063 >), then the default set of rules
3064  which will apply universally to all sites and pages. And then below that,
3065  exceptions to the defined universal policies. </P
3066 ><DIV
3067 CLASS="SECT3"
3068 ><H3
3069 CLASS="SECT3"
3070 ><A
3071 NAME="AEN1285"
3072 >7.4.1. Finding the Right Mix</A
3073 ></H3
3074 ><P
3075 > Note that some <A
3076 HREF="configuration.html#ACTIONS"
3077 >actions</A
3078 > like cookie suppression
3079  or script disabling may render some sites unusable, which rely on these
3080  techniques to work properly. Finding the right mix of actions is not easy and
3081  certainly a matter of personal taste. In general, it can be said that the more
3082  <SPAN
3083 CLASS="QUOTE"
3084 >"aggressive"</SPAN
3085 > your default settings (in the top section of the
3086  actions file) are, the more exceptions for <SPAN
3087 CLASS="QUOTE"
3088 >"trusted"</SPAN
3089 > sites you
3090  will have to make later. If, for example, you want to kill popup windows per
3091  default, you'll have to make exceptions from that rule for sites that you
3092  regularly use and that require popups for actually useful content, like maybe
3093  your bank, favorite shop, or newspaper.</P
3094 ><P
3095 > We have tried to provide you with reasonable rules to start from in the
3096  distribution actions files. But there is no general rule of thumb on these
3097  things. There just are too many variables, and sites are constantly changing.
3098  Sooner or later you will want to change the rules (and read this chapter again :).</P
3099 ></DIV
3100 ><DIV
3101 CLASS="SECT3"
3102 ><H3
3103 CLASS="SECT3"
3104 ><A
3105 NAME="AEN1292"
3106 >7.4.2. How to Edit</A
3107 ></H3
3108 ><P
3109 > The easiest way to edit the <SPAN
3110 CLASS="QUOTE"
3111 >"actions"</SPAN
3112 > files is with a browser by
3113  using our browser-based editor, which can be reached from <A
3114 HREF="http://config.privoxy.org/show-status"
3115 TARGET="_top"
3116 >http://config.privoxy.org/show-status</A
3117 >.</P
3118 ><P
3119 > If you prefer plain text editing to GUIs, you can of course also directly edit the
3120  the actions files.</P
3121 ></DIV
3122 ><DIV
3123 CLASS="SECT3"
3124 ><H3
3125 CLASS="SECT3"
3126 ><A
3127 NAME="AEN1298"
3128 >7.4.3. How Actions are Applied to URLs</A
3129 ></H3
3130 ><P
3131 > Actions files are divided into sections. There are special sections,
3132  like the <SPAN
3133 CLASS="QUOTE"
3134 >"<A
3135 HREF="configuration.html#ALIASES"
3136 >alias</A
3137 >"</SPAN
3138 > sections which will be discussed later. For now
3139  let's concentrate on regular sections: They have a heading line (often split
3140  up to multiple lines for readability) which consist of a list of actions,
3141  separated by whitespace and enclosed in curly braces. Below that, there
3142  is a list of URL patterns, each on a separate line.</P
3143 ><P
3144 > To determine which actions apply to a request, the URL of the request is
3145  compared to all patterns in this file. Every time it matches, the list of
3146  applicable actions for the URL is incrementally updated, using the heading
3147  of the section in which the pattern is located. If multiple matches for
3148  the same URL set the same action differently, the last match wins. If not, 
3149  the effects are aggregated (e.g. a URL might match both the 
3150  <A
3151 HREF="configuration.html#HANDLE-AS-IMAGE"
3152 TARGET="_top"
3153 ><SPAN
3154 CLASS="QUOTE"
3155 >"+handle-as-image"</SPAN
3156 ></A
3157 >
3158  and <A
3159 HREF="configuration.html#BLOCK"
3160 TARGET="_top"
3161 ><SPAN
3162 CLASS="QUOTE"
3163 >"+block"</SPAN
3164 ></A
3165 > actions).
3166  </P
3167 ><P
3168 > You can trace this process by visiting <A
3169 HREF="http://config.privoxy.org/show-url-info"
3170 TARGET="_top"
3171 >http://config.privoxy.org/show-url-info</A
3172 >.</P
3173 ><P
3174 > More detail on this is provided in the Appendix, <A
3175 HREF="appendix.html#ACTIONSANAT"
3176 > Anatomy of an Action</A
3177 >.</P
3178 ></DIV
3179 ><DIV
3180 CLASS="SECT3"
3181 ><H3
3182 CLASS="SECT3"
3183 ><A
3184 NAME="AEN1312"
3185 >7.4.4. Patterns</A
3186 ></H3
3187 ><P
3188 > Generally, a pattern has the form <TT
3189 CLASS="LITERAL"
3190 >&#60;domain&#62;/&#60;path&#62;</TT
3191 >,
3192  where both the <TT
3193 CLASS="LITERAL"
3194 >&#60;domain&#62;</TT
3195 > and <TT
3196 CLASS="LITERAL"
3197 >&#60;path&#62;</TT
3198 >
3199  are optional. (This is why the pattern <TT
3200 CLASS="LITERAL"
3201 >/</TT
3202 > matches all URLs).</P
3203 ><P
3204 ></P
3205 ><DIV
3206 CLASS="VARIABLELIST"
3207 ><DL
3208 ><DT
3209 ><TT
3210 CLASS="LITERAL"
3211 >www.example.com/</TT
3212 ></DT
3213 ><DD
3214 ><P
3215 >    is a domain-only pattern and will match any request to <TT
3216 CLASS="LITERAL"
3217 >www.example.com</TT
3218 >,
3219     regardless of which document on that server is requested.
3220    </P
3221 ></DD
3222 ><DT
3223 ><TT
3224 CLASS="LITERAL"
3225 >www.example.com</TT
3226 ></DT
3227 ><DD
3228 ><P
3229 >    means exactly the same. For domain-only patterns, the trailing <TT
3230 CLASS="LITERAL"
3231 >/</TT
3232 > may
3233     be omitted.
3234    </P
3235 ></DD
3236 ><DT
3237 ><TT
3238 CLASS="LITERAL"
3239 >www.example.com/index.html</TT
3240 ></DT
3241 ><DD
3242 ><P
3243 >    matches only the single document <TT
3244 CLASS="LITERAL"
3245 >/index.html</TT
3246 >
3247     on <TT
3248 CLASS="LITERAL"
3249 >www.example.com</TT
3250 >.
3251    </P
3252 ></DD
3253 ><DT
3254 ><TT
3255 CLASS="LITERAL"
3256 >/index.html</TT
3257 ></DT
3258 ><DD
3259 ><P
3260 >    matches the document <TT
3261 CLASS="LITERAL"
3262 >/index.html</TT
3263 >, regardless of the domain,
3264     i.e. on <I
3265 CLASS="EMPHASIS"
3266 >any</I
3267 > web server.
3268    </P
3269 ></DD
3270 ><DT
3271 ><TT
3272 CLASS="LITERAL"
3273 >index.html</TT
3274 ></DT
3275 ><DD
3276 ><P
3277 >    matches nothing, since it would be  interpreted as a domain name and
3278     there is no top-level domain called <TT
3279 CLASS="LITERAL"
3280 >.html</TT
3281 >.
3282    </P
3283 ></DD
3284 ></DL
3285 ></DIV
3286 ><DIV
3287 CLASS="SECT4"
3288 ><H4
3289 CLASS="SECT4"
3290 ><A
3291 NAME="AEN1352"
3292 >7.4.4.1. The Domain Pattern</A
3293 ></H4
3294 ><P
3295 > The matching of the domain part offers some flexible options: if the
3296  domain starts or ends with a dot, it becomes unanchored at that end. 
3297  For example:</P
3298 ><P
3299 ></P
3300 ><DIV
3301 CLASS="VARIABLELIST"
3302 ><DL
3303 ><DT
3304 ><TT
3305 CLASS="LITERAL"
3306 >.example.com</TT
3307 ></DT
3308 ><DD
3309 ><P
3310 >    matches any domain that <I
3311 CLASS="EMPHASIS"
3312 >ENDS</I
3313 > in
3314     <TT
3315 CLASS="LITERAL"
3316 >.example.com</TT
3317 >
3318    </P
3319 ></DD
3320 ><DT
3321 ><TT
3322 CLASS="LITERAL"
3323 >www.</TT
3324 ></DT
3325 ><DD
3326 ><P
3327 >    matches any domain that <I
3328 CLASS="EMPHASIS"
3329 >STARTS</I
3330 > with
3331     <TT
3332 CLASS="LITERAL"
3333 >www.</TT
3334 >
3335    </P
3336 ></DD
3337 ><DT
3338 ><TT
3339 CLASS="LITERAL"
3340 >.example.</TT
3341 ></DT
3342 ><DD
3343 ><P
3344 >    matches any domain that <I
3345 CLASS="EMPHASIS"
3346 >CONTAINS</I
3347 > <TT
3348 CLASS="LITERAL"
3349 >.example.</TT
3350 >
3351     (Correctly speaking: It matches any FQDN that contains <TT
3352 CLASS="LITERAL"
3353 >example</TT
3354 > as a domain.)
3355    </P
3356 ></DD
3357 ></DL
3358 ></DIV
3359 ><P
3360 > Additionally, there are wild-cards that you can use in the domain names
3361  themselves. They work pretty similar to shell wild-cards: <SPAN
3362 CLASS="QUOTE"
3363 >"*"</SPAN
3364 >
3365  stands for zero or more arbitrary characters, <SPAN
3366 CLASS="QUOTE"
3367 >"?"</SPAN
3368 > stands for
3369  any single character, you can define character classes in square
3370  brackets and all of that can be freely mixed:</P
3371 ><P
3372 ></P
3373 ><DIV
3374 CLASS="VARIABLELIST"
3375 ><DL
3376 ><DT
3377 ><TT
3378 CLASS="LITERAL"
3379 >ad*.example.com</TT
3380 ></DT
3381 ><DD
3382 ><P
3383 >    matches <SPAN
3384 CLASS="QUOTE"
3385 >"adserver.example.com"</SPAN
3386 >, 
3387     <SPAN
3388 CLASS="QUOTE"
3389 >"ads.example.com"</SPAN
3390 >, etc but not <SPAN
3391 CLASS="QUOTE"
3392 >"sfads.example.com"</SPAN
3393 >
3394    </P
3395 ></DD
3396 ><DT
3397 ><TT
3398 CLASS="LITERAL"
3399 >*ad*.example.com</TT
3400 ></DT
3401 ><DD
3402 ><P
3403 >    matches all of the above, and then some.
3404    </P
3405 ></DD
3406 ><DT
3407 ><TT
3408 CLASS="LITERAL"
3409 >.?pix.com</TT
3410 ></DT
3411 ><DD
3412 ><P
3413 >    matches <TT
3414 CLASS="LITERAL"
3415 >www.ipix.com</TT
3416 >,
3417     <TT
3418 CLASS="LITERAL"
3419 >pictures.epix.com</TT
3420 >, <TT
3421 CLASS="LITERAL"
3422 >a.b.c.d.e.upix.com</TT
3423 > etc. 
3424    </P
3425 ></DD
3426 ><DT
3427 ><TT
3428 CLASS="LITERAL"
3429 >www[1-9a-ez].example.c*</TT
3430 ></DT
3431 ><DD
3432 ><P
3433 >     matches <TT
3434 CLASS="LITERAL"
3435 >www1.example.com</TT
3436 >, 
3437      <TT
3438 CLASS="LITERAL"
3439 >www4.example.cc</TT
3440 >, <TT
3441 CLASS="LITERAL"
3442 >wwwd.example.cy</TT
3443 >, 
3444      <TT
3445 CLASS="LITERAL"
3446 >wwwz.example.com</TT
3447 > etc., but <I
3448 CLASS="EMPHASIS"
3449 >not</I
3450
3451      <TT
3452 CLASS="LITERAL"
3453 >wwww.example.com</TT
3454 >.
3455    </P
3456 ></DD
3457 ></DL
3458 ></DIV
3459 ></DIV
3460 ><DIV
3461 CLASS="SECT4"
3462 ><H4
3463 CLASS="SECT4"
3464 ><A
3465 NAME="AEN1414"
3466 >7.4.4.2. The Path Pattern</A
3467 ></H4
3468 ><P
3469 > <SPAN
3470 CLASS="APPLICATION"
3471 >Privoxy</SPAN
3472 > uses Perl compatible regular expressions
3473  (through the <A
3474 HREF="http://www.pcre.org/"
3475 TARGET="_top"
3476 >PCRE</A
3477 > library) for
3478  matching the path.</P
3479 ><P
3480 > There is an <A
3481 HREF="appendix.html#REGEX"
3482 >Appendix</A
3483 > with a brief quick-start into regular
3484  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
3485  at <A
3486 HREF="http://www.pcre.org/man.txt"
3487 TARGET="_top"
3488 >http://www.pcre.org/man.txt</A
3489 >.
3490  You might also find the Perl man page on regular expressions (<TT
3491 CLASS="LITERAL"
3492 >man perlre</TT
3493 >)
3494  useful, which is available on-line at <A
3495 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
3496 TARGET="_top"
3497 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
3498 >.</P
3499 ><P
3500 > Note that the path pattern is automatically left-anchored at the <SPAN
3501 CLASS="QUOTE"
3502 >"/"</SPAN
3503 >,
3504  i.e. it matches as if it would start with a <SPAN
3505 CLASS="QUOTE"
3506 >"^"</SPAN
3507 > (regular expression speak 
3508  for the beginning of a line).</P
3509 ><P
3510 > Please also note that matching in the path is case
3511  <I
3512 CLASS="EMPHASIS"
3513 >INSENSITIVE</I
3514 > by default, but you can switch to case
3515  sensitive at any point in the pattern by using the 
3516  <SPAN
3517 CLASS="QUOTE"
3518 >"(?-i)"</SPAN
3519 > switch:
3520  <TT
3521 CLASS="LITERAL"
3522 >www.example.com/(?-i)PaTtErN.*</TT
3523 > will match only
3524  documents whose path starts with <TT
3525 CLASS="LITERAL"
3526 >PaTtErN</TT
3527 > in
3528  <I
3529 CLASS="EMPHASIS"
3530 >exactly</I
3531 > this capitalization.</P
3532 ></DIV
3533 ></DIV
3534 ><DIV
3535 CLASS="SECT3"
3536 ><H3
3537 CLASS="SECT3"
3538 ><A
3539 NAME="ACTIONS"
3540 >7.4.5. Actions</A
3541 ></H3
3542 ><P
3543 > All actions are disabled by default, until they are explicitly enabled
3544  somewhere in an actions file. Actions are turned on if preceded with a
3545  <SPAN
3546 CLASS="QUOTE"
3547 >"+"</SPAN
3548 >, and turned off if preceded with a <SPAN
3549 CLASS="QUOTE"
3550 >"-"</SPAN
3551 >. So a
3552  <SPAN
3553 CLASS="QUOTE"
3554 >"+action"</SPAN
3555 > means <SPAN
3556 CLASS="QUOTE"
3557 >"do that action"</SPAN
3558 >, e.g.
3559  <SPAN
3560 CLASS="QUOTE"
3561 >"+block"</SPAN
3562 > means please <SPAN
3563 CLASS="QUOTE"
3564 >"block the following URL
3565  patterns"</SPAN
3566 >. </P
3567 ><P
3568
3569  Actions are invoked by enclosing the action name in curly braces (e.g.
3570  {+some_action}), followed by a list of URLs (or patterns that match URLs) to
3571  which the action applies. There are three classes of actions: </P
3572 ><P
3573 > <P
3574 ></P
3575 ><UL
3576 ><LI
3577 ><P
3578 >  
3579    Boolean, i.e the action can only be <SPAN
3580 CLASS="QUOTE"
3581 >"on"</SPAN
3582 > or
3583    <SPAN
3584 CLASS="QUOTE"
3585 >"off"</SPAN
3586 >. Examples: 
3587  </P
3588 ><P
3589 >   <TT
3590 CLASS="LITERAL"
3591 >    <P
3592 CLASS="LITERALLAYOUT"
3593 >&nbsp;&nbsp;<I
3594 CLASS="EMPHASIS"
3595 >{+name}</I
3596 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;enable&nbsp;this&nbsp;action<br>
3597 &nbsp;&nbsp;<I
3598 CLASS="EMPHASIS"
3599 >{-name}</I
3600 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;this&nbsp;action<br>
3601 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3602
3603    </TT
3604 >
3605   </P
3606 ></LI
3607 ><LI
3608 ><P
3609 >  
3610    Parameterized, e.g. <SPAN
3611 CLASS="QUOTE"
3612 >"+/-hide-user-agent{ Mozilla 1.0 }"</SPAN
3613 >, 
3614    where some value is required in order to enable this type of action.
3615    Examples:
3616   </P
3617 ><P
3618 >   <TT
3619 CLASS="LITERAL"
3620 >    <P
3621 CLASS="LITERALLAYOUT"
3622 >&nbsp;&nbsp;<I
3623 CLASS="EMPHASIS"
3624 >{+name{param}}</I
3625 >&nbsp;&nbsp;#&nbsp;enable&nbsp;action&nbsp;and&nbsp;set&nbsp;parameter&nbsp;to&nbsp;<SPAN
3626 CLASS="QUOTE"
3627 >"param"</SPAN
3628 ><br>
3629 &nbsp;&nbsp;<I
3630 CLASS="EMPHASIS"
3631 >{-name}</I
3632 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;action&nbsp;(<SPAN
3633 CLASS="QUOTE"
3634 >"parameter"</SPAN
3635 >)&nbsp;can&nbsp;be&nbsp;omitted<br>
3636 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3637
3638    </TT
3639 >
3640   </P
3641 ></LI
3642 ><LI
3643 ><P
3644 >  
3645   
3646    Multi-value, e.g. <SPAN
3647 CLASS="QUOTE"
3648 >"{+/-add-header{Name: value}}"</SPAN
3649 > or
3650    <SPAN
3651 CLASS="QUOTE"
3652 >"{+/-send-wafer{name=value}}"</SPAN
3653 >), where some value needs to be defined
3654    in addition to simply enabling the action. Examples:
3655   </P
3656 ><P
3657 >   <TT
3658 CLASS="LITERAL"
3659 >    <P
3660 CLASS="LITERALLAYOUT"
3661 >&nbsp;&nbsp;<I
3662 CLASS="EMPHASIS"
3663 >{+name{param=value}}</I
3664 >&nbsp;&nbsp;&nbsp;#&nbsp;enable&nbsp;action&nbsp;and&nbsp;set&nbsp;<SPAN
3665 CLASS="QUOTE"
3666 >"param"</SPAN
3667 >&nbsp;to&nbsp;<SPAN
3668 CLASS="QUOTE"
3669 >"value"</SPAN
3670 ><br>
3671 &nbsp;&nbsp;<I
3672 CLASS="EMPHASIS"
3673 >{-name{param=value}}</I
3674 >&nbsp;&nbsp;&nbsp;#&nbsp;remove&nbsp;the&nbsp;parameter&nbsp;<SPAN
3675 CLASS="QUOTE"
3676 >"param"</SPAN
3677 >&nbsp;completely<br>
3678 &nbsp;&nbsp;<I
3679 CLASS="EMPHASIS"
3680 >{-name}</I
3681 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;this&nbsp;action&nbsp;totally&nbsp;and&nbsp;remove&nbsp;<SPAN
3682 CLASS="APPLICATION"
3683 >param</SPAN
3684 >&nbsp;too<br>
3685 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3686
3687    </TT
3688 >
3689   </P
3690 ></LI
3691 ></UL
3692 ></P
3693 ><P
3694 > If nothing is specified in any actions file, no <SPAN
3695 CLASS="QUOTE"
3696 >"actions"</SPAN
3697 > are
3698  taken. So in this case <SPAN
3699 CLASS="APPLICATION"
3700 >Privoxy</SPAN
3701 > would just be a
3702  normal, non-blocking, non-anonymizing proxy. You must specifically enable the
3703  privacy and blocking features you need (although the provided default actions
3704  files will give a good starting point).</P
3705 ><P
3706 > Later defined actions always over-ride earlier ones.  So exceptions 
3707  to any rules you make, should come in the latter part of the file. For
3708  multi-valued actions, the actions are applied in the order they are
3709  specified. Actions files are processed in the order they are defined 
3710  in <TT
3711 CLASS="FILENAME"
3712 >config</TT
3713 > (the default installation has three 
3714  actions files). It also quite possible for any given URL pattern to 
3715  match more than one action!</P
3716 ><P
3717 > The list of valid <SPAN
3718 CLASS="APPLICATION"
3719 >Privoxy</SPAN
3720 > <SPAN
3721 CLASS="QUOTE"
3722 >"actions"</SPAN
3723 > are:</P
3724 ><DIV
3725 CLASS="SECT4"
3726 ><H4
3727 CLASS="SECT4"
3728 ><A
3729 NAME="ADD-HEADER"
3730 >7.4.5.1. <I
3731 CLASS="EMPHASIS"
3732 >+add-header{Name: value}</I
3733 ></A
3734 ></H4
3735 ><P
3736 ></P
3737 ><DIV
3738 CLASS="VARIABLELIST"
3739 ><DL
3740 ><DT
3741 >Type:</DT
3742 ><DD
3743 ><P
3744 >Multi-value.</P
3745 ></DD
3746 ><DT
3747 >Typical uses:</DT
3748 ><DD
3749 ><P
3750 >    Send a user defined HTTP header to the web server.
3751    </P
3752 ></DD
3753 ><DT
3754 >Possible values:</DT
3755 ><DD
3756 ><P
3757 >    Any value is possible. Validity of the defined HTTP headers is not checked.
3758    </P
3759 ></DD
3760 ><DT
3761 >Example usage:</DT
3762 ><DD
3763 ><P
3764 CLASS="LITERALLAYOUT"
3765 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3766 CLASS="EMPHASIS"
3767 >{+add-header{X-User-Tracking: sucks}}</I
3768 ><br>
3769 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3770 CLASS="EMPHASIS"
3771 >.example.com</I
3772 ><br>
3773 &nbsp;&nbsp;&nbsp;&nbsp;</P
3774 ></DD
3775 ><DT
3776 >Notes:</DT
3777 ><DD
3778 ><P
3779 >    This action may be specified multiple times, in order to define multiple 
3780     headers. This is rarely needed for the typical user. If you don't know what 
3781     <SPAN
3782 CLASS="QUOTE"
3783 >"HTTP headers"</SPAN
3784 > are, you definitely don't need to worry about this 
3785     one.
3786    </P
3787 ></DD
3788 ></DL
3789 ></DIV
3790 ></DIV
3791 ><DIV
3792 CLASS="SECT4"
3793 ><H4
3794 CLASS="SECT4"
3795 ><A
3796 NAME="BLOCK"
3797 >7.4.5.2. <I
3798 CLASS="EMPHASIS"
3799 >+block</I
3800 ></A
3801 ></H4
3802 ><P
3803 ></P
3804 ><DIV
3805 CLASS="VARIABLELIST"
3806 ><DL
3807 ><DT
3808 >Type:</DT
3809 ><DD
3810 ><P
3811 >Boolean.</P
3812 ></DD
3813 ><DT
3814 >Typical uses:</DT
3815 ><DD
3816 ><P
3817 >    Used to block a URL from reaching your browser. The URL may be 
3818     anything, but is typically used to block ads or other obnoxious 
3819     content.    
3820    </P
3821 ></DD
3822 ><DT
3823 >Possible values:</DT
3824 ><DD
3825 ><P
3826 >N/A</P
3827 ></DD
3828 ><DT
3829 >Example usage:</DT
3830 ><DD
3831 ><P
3832 CLASS="LITERALLAYOUT"
3833 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3834 CLASS="EMPHASIS"
3835 >{+block}</I
3836 ><br>
3837 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3838 CLASS="EMPHASIS"
3839 >.banners.example.com</I
3840 ><br>
3841 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3842 CLASS="EMPHASIS"
3843 >.ads.r.us</I
3844 ><br>
3845 &nbsp;&nbsp;&nbsp;&nbsp;</P
3846 ></DD
3847 ><DT
3848 >Notes:</DT
3849 ><DD
3850 ><P
3851 >    If a URL matches one of the blocked patterns, <SPAN
3852 CLASS="APPLICATION"
3853 >Privoxy</SPAN
3854 >
3855     will intercept the URL and display its special <SPAN
3856 CLASS="QUOTE"
3857 >"BLOCKED"</SPAN
3858 > page
3859     instead. If there is sufficient space, a large red banner will appear with
3860     a friendly message about why the page was blocked, and a way to go there
3861     anyway. If there is insufficient space a smaller blocked page will appear
3862     without the red banner. 
3863     <A
3864 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
3865 TARGET="_top"
3866 >Click here</A
3867 >
3868     to view the default blocked HTML page (<SPAN
3869 CLASS="APPLICATION"
3870 >Privoxy</SPAN
3871 > must be running 
3872     for this to work as intended!).
3873    </P
3874 ><P
3875
3876     A very important exception is if the URL <I
3877 CLASS="EMPHASIS"
3878 >matches both</I
3879 >
3880     <SPAN
3881 CLASS="QUOTE"
3882 >"+block"</SPAN
3883 > and <A
3884 HREF="configuration.html#HANDLE-AS-IMAGE"
3885 TARGET="_top"
3886 ><SPAN
3887 CLASS="QUOTE"
3888 >"+handle-as-image"</SPAN
3889 ></A
3890 >,
3891     then it will be handled by 
3892     <A
3893 HREF="configuration.html#SET-IMAGE-BLOCKER"
3894 TARGET="_top"
3895 ><SPAN
3896 CLASS="QUOTE"
3897 >"+set-image-blocker"</SPAN
3898 ></A
3899 >
3900     (see below). It is important to understand this process, in order 
3901     to understand how <SPAN
3902 CLASS="APPLICATION"
3903 >Privoxy</SPAN
3904 > is able to deal with 
3905     ads and other objectionable content.
3906    </P
3907 ><P
3908 >    The <A
3909 HREF="configuration.html#FILTER"
3910 TARGET="_top"
3911 ><SPAN
3912 CLASS="QUOTE"
3913 >"+filter"</SPAN
3914 ></A
3915 >
3916     action can also perform some of the 
3917     same functionality as <SPAN
3918 CLASS="QUOTE"
3919 >"+block"</SPAN
3920 >, but by virtue of very 
3921     different programming techniques, and is most often used for different 
3922     reasons.
3923    </P
3924 ></DD
3925 ></DL
3926 ></DIV
3927 ></DIV
3928 ><DIV
3929 CLASS="SECT4"
3930 ><H4
3931 CLASS="SECT4"
3932 ><A
3933 NAME="DEANIMATE-GIFS"
3934 >7.4.5.3. <I
3935 CLASS="EMPHASIS"
3936 >+deanimate-gifs</I
3937 ></A
3938 ></H4
3939 ><P
3940 ></P
3941 ><DIV
3942 CLASS="VARIABLELIST"
3943 ><DL
3944 ><DT
3945 >Type:</DT
3946 ><DD
3947 ><P
3948 >Parameterized.</P
3949 ></DD
3950 ><DT
3951 >Typical uses:</DT
3952 ><DD
3953 ><P
3954 >    To stop those annoying, distracting animated GIF images.
3955    </P
3956 ></DD
3957 ><DT
3958 >Possible values:</DT
3959 ><DD
3960 ><P
3961 >    <SPAN
3962 CLASS="QUOTE"
3963 >"last"</SPAN
3964 > or <SPAN
3965 CLASS="QUOTE"
3966 >"first"</SPAN
3967 >
3968    </P
3969 ></DD
3970 ><DT
3971 >Example usage:</DT
3972 ><DD
3973 ><P
3974 CLASS="LITERALLAYOUT"
3975 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3976 CLASS="EMPHASIS"
3977 >{+deanimate-gifs{last}}</I
3978 ><br>
3979 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
3980 CLASS="EMPHASIS"
3981 >.example.com</I
3982 ><br>
3983 &nbsp;&nbsp;&nbsp;&nbsp;</P
3984 ></DD
3985 ><DT
3986 >Notes:</DT
3987 ><DD
3988 ><P
3989 >    De-animate all animated GIF images, i.e. reduce them to their last frame.
3990     This will also shrink the images considerably (in bytes, not pixels!). If
3991     the option <SPAN
3992 CLASS="QUOTE"
3993 >"first"</SPAN
3994 > is given, the first frame of the animation
3995     is used as the replacement. If <SPAN
3996 CLASS="QUOTE"
3997 >"last"</SPAN
3998 > is given, the last
3999     frame of the animation is used instead, which probably makes more sense for
4000     most banner animations, but also has the risk of not showing the entire
4001     last frame (if it is only a delta to an earlier frame).
4002    </P
4003 ></DD
4004 ></DL
4005 ></DIV
4006 ></DIV
4007 ><DIV
4008 CLASS="SECT4"
4009 ><H4
4010 CLASS="SECT4"
4011 ><A
4012 NAME="DOWNGRADE-HTTP-VERSION"
4013 >7.4.5.4. <I
4014 CLASS="EMPHASIS"
4015 >+downgrade-http-version</I
4016 ></A
4017 ></H4
4018 ><P
4019 ></P
4020 ><DIV
4021 CLASS="VARIABLELIST"
4022 ><DL
4023 ><DT
4024 >Type:</DT
4025 ><DD
4026 ><P
4027 >Boolean.</P
4028 ></DD
4029 ><DT
4030 >Typical uses:</DT
4031 ><DD
4032 ><P
4033 >    <SPAN
4034 CLASS="QUOTE"
4035 >"+downgrade-http-version"</SPAN
4036 > will downgrade HTTP/1.1 client requests to
4037     HTTP/1.0 and downgrade the responses as well.
4038    </P
4039 ></DD
4040 ><DT
4041 >Possible values:</DT
4042 ><DD
4043 ><P
4044 >    N/A
4045    </P
4046 ></DD
4047 ><DT
4048 >Example usage:</DT
4049 ><DD
4050 ><P
4051 CLASS="LITERALLAYOUT"
4052 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4053 CLASS="EMPHASIS"
4054 >{+downgrade-http-version}</I
4055 ><br>
4056 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4057 CLASS="EMPHASIS"
4058 >.example.com</I
4059 ><br>
4060 &nbsp;&nbsp;&nbsp;&nbsp;</P
4061 ></DD
4062 ><DT
4063 >Notes:</DT
4064 ><DD
4065 ><P
4066 >    Use this action for servers that use HTTP/1.1 protocol features that
4067     <SPAN
4068 CLASS="APPLICATION"
4069 >Privoxy</SPAN
4070 > doesn't handle well yet. HTTP/1.1 is
4071     only partially implemented. Default is not to downgrade requests. This is
4072     an infrequently needed action, and is used to help with rare problem sites only.
4073    </P
4074 ></DD
4075 ></DL
4076 ></DIV
4077 ></DIV
4078 ><DIV
4079 CLASS="SECT4"
4080 ><H4
4081 CLASS="SECT4"
4082 ><A
4083 NAME="FAST-REDIRECTS"
4084 >7.4.5.5. <I
4085 CLASS="EMPHASIS"
4086 >+fast-redirects</I
4087 ></A
4088 ></H4
4089 ><P
4090 ></P
4091 ><DIV
4092 CLASS="VARIABLELIST"
4093 ><DL
4094 ><DT
4095 >Type:</DT
4096 ><DD
4097 ><P
4098 >Boolean.</P
4099 ></DD
4100 ><DT
4101 >Typical uses:</DT
4102 ><DD
4103 ><P
4104 >    The <SPAN
4105 CLASS="QUOTE"
4106 >"+fast-redirects"</SPAN
4107 > action enables interception of 
4108     <SPAN
4109 CLASS="QUOTE"
4110 >"redirect"</SPAN
4111 > requests from one server to another, which 
4112     are used to track users.<SPAN
4113 CLASS="APPLICATION"
4114 >Privoxy</SPAN
4115 > can cut off
4116     all but the last valid URL in a redirect request and send a local redirect
4117     back to your browser without contacting the intermediate site(s).
4118    </P
4119 ></DD
4120 ><DT
4121 >Possible values:</DT
4122 ><DD
4123 ><P
4124 >    N/A
4125    </P
4126 ></DD
4127 ><DT
4128 >Example usage:</DT
4129 ><DD
4130 ><P
4131 CLASS="LITERALLAYOUT"
4132 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4133 CLASS="EMPHASIS"
4134 >{+fast-redirects}</I
4135 ><br>
4136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4137 CLASS="EMPHASIS"
4138 >.example.com</I
4139 ><br>
4140 &nbsp;&nbsp;&nbsp;&nbsp;</P
4141 ></DD
4142 ><DT
4143 >Notes:</DT
4144 ><DD
4145 ><P
4146 >  
4147     Many sites, like yahoo.com, don't just link to other sites. Instead, they
4148     will link to some script on their own server, giving the destination as a
4149     parameter, which will then redirect you to the final target. URLs
4150     resulting from this scheme typically look like:
4151     <I
4152 CLASS="EMPHASIS"
4153 >http://some.place/some_script?http://some.where-else</I
4154 >.
4155   </P
4156 ><P
4157 >    Sometimes, there are even multiple consecutive redirects encoded in the
4158     URL. These redirections via scripts make your web browsing more traceable,
4159     since the server from which you follow such a link can see where you go
4160     to. Apart from that, valuable bandwidth and time is wasted, while your
4161     browser ask the server for one redirect after the other. Plus, it feeds
4162     the advertisers.
4163    </P
4164 ><P
4165 >    This is a normally <SPAN
4166 CLASS="QUOTE"
4167 >"on"</SPAN
4168 > feature, and often requires exceptions
4169     for sites that are sensitive to defeating this mechanism.
4170    </P
4171 ></DD
4172 ></DL
4173 ></DIV
4174 ></DIV
4175 ><DIV
4176 CLASS="SECT4"
4177 ><H4
4178 CLASS="SECT4"
4179 ><A
4180 NAME="FILTER"
4181 >7.4.5.6. <I
4182 CLASS="EMPHASIS"
4183 >+filter</I
4184 ></A
4185 ></H4
4186 ><P
4187 ></P
4188 ><DIV
4189 CLASS="VARIABLELIST"
4190 ><DL
4191 ><DT
4192 >Type:</DT
4193 ><DD
4194 ><P
4195 >Parameterized.</P
4196 ></DD
4197 ><DT
4198 >Typical uses:</DT
4199 ><DD
4200 ><P
4201 >    Apply page filtering as defined by named sections of the
4202     <TT
4203 CLASS="FILENAME"
4204 >default.filter</TT
4205 > file to the specified site(s). 
4206     <SPAN
4207 CLASS="QUOTE"
4208 >"Filtering"</SPAN
4209 > can be any modification of the raw 
4210     page content, including re-writing or deletion of content.
4211    </P
4212 ></DD
4213 ><DT
4214 >Possible values:</DT
4215 ><DD
4216 ><P
4217 >    <SPAN
4218 CLASS="QUOTE"
4219 >"+filter"</SPAN
4220 > must include the name of one of the section identifiers
4221     from <TT
4222 CLASS="FILENAME"
4223 >default.filter</TT
4224 > (or whatever
4225     <I
4226 CLASS="EMPHASIS"
4227 >filterfile</I
4228 > is specified in <TT
4229 CLASS="FILENAME"
4230 >config</TT
4231 >).
4232    </P
4233 ></DD
4234 ><DT
4235 >Example usage (from the current <TT
4236 CLASS="FILENAME"
4237 >default.filter</TT
4238 >):</DT
4239 ><DD
4240 ><P
4241 ></P
4242 ><TABLE
4243 BORDER="0"
4244 ><TBODY
4245 ><TR
4246 ><TD
4247 >    <I
4248 CLASS="EMPHASIS"
4249 >+filter{html-annoyances}</I
4250 >:  Get rid of particularly annoying HTML abuse.
4251    </TD
4252 ></TR
4253 ></TBODY
4254 ></TABLE
4255 ><P
4256 ></P
4257 ><P
4258 ></P
4259 ><TABLE
4260 BORDER="0"
4261 ><TBODY
4262 ><TR
4263 ><TD
4264 >    <I
4265 CLASS="EMPHASIS"
4266 >+filter{js-annoyances}</I
4267 >:    Get rid of particularly annoying JavaScript abuse
4268    </TD
4269 ></TR
4270 ></TBODY
4271 ></TABLE
4272 ><P
4273 ></P
4274 ><P
4275 ></P
4276 ><TABLE
4277 BORDER="0"
4278 ><TBODY
4279 ><TR
4280 ><TD
4281 >    <I
4282 CLASS="EMPHASIS"
4283 >+filter{content-cookies}</I
4284 >:   Kill cookies that come in the HTML or JS content 
4285    </TD
4286 ></TR
4287 ></TBODY
4288 ></TABLE
4289 ><P
4290 ></P
4291 ><P
4292 ></P
4293 ><TABLE
4294 BORDER="0"
4295 ><TBODY
4296 ><TR
4297 ><TD
4298 >    <I
4299 CLASS="EMPHASIS"
4300 >+filter{popups}</I
4301 >:         Kill all popups in JS and HTML
4302    </TD
4303 ></TR
4304 ></TBODY
4305 ></TABLE
4306 ><P
4307 ></P
4308 ><P
4309 ></P
4310 ><TABLE
4311 BORDER="0"
4312 ><TBODY
4313 ><TR
4314 ><TD
4315 >    <I
4316 CLASS="EMPHASIS"
4317 >+filter{frameset-borders}</I
4318 >: Give frames a border and make them resizable 
4319    </TD
4320 ></TR
4321 ></TBODY
4322 ></TABLE
4323 ><P
4324 ></P
4325 ><P
4326 ></P
4327 ><TABLE
4328 BORDER="0"
4329 ><TBODY
4330 ><TR
4331 ><TD
4332 >    <I
4333 CLASS="EMPHASIS"
4334 >+filter{webbugs}</I
4335 >:          Squish WebBugs (1x1 invisible GIFs used for user tracking)
4336    </TD
4337 ></TR
4338 ></TBODY
4339 ></TABLE
4340 ><P
4341 ></P
4342 ><P
4343 ></P
4344 ><TABLE
4345 BORDER="0"
4346 ><TBODY
4347 ><TR
4348 ><TD
4349 >    <I
4350 CLASS="EMPHASIS"
4351 >+filter{refresh-tags}</I
4352 >:     Kill automatic refresh tags (for dial-on-demand setups) 
4353    </TD
4354 ></TR
4355 ></TBODY
4356 ></TABLE
4357 ><P
4358 ></P
4359 ><P
4360 ></P
4361 ><TABLE
4362 BORDER="0"
4363 ><TBODY
4364 ><TR
4365 ><TD
4366 >    <I
4367 CLASS="EMPHASIS"
4368 >+filter{fun}</I
4369 >:              Text replacements  for subversive browsing fun!
4370    </TD
4371 ></TR
4372 ></TBODY
4373 ></TABLE
4374 ><P
4375 ></P
4376 ><P
4377 ></P
4378 ><TABLE
4379 BORDER="0"
4380 ><TBODY
4381 ><TR
4382 ><TD
4383 >    <I
4384 CLASS="EMPHASIS"
4385 >+filter{nimda}</I
4386 >:            Remove Nimda (virus) code.
4387    </TD
4388 ></TR
4389 ></TBODY
4390 ></TABLE
4391 ><P
4392 ></P
4393 ><P
4394 ></P
4395 ><TABLE
4396 BORDER="0"
4397 ><TBODY
4398 ><TR
4399 ><TD
4400 >    <I
4401 CLASS="EMPHASIS"
4402 >+filter{banners-by-size}</I
4403 >:  Kill banners by size (<I
4404 CLASS="EMPHASIS"
4405 >very</I
4406 > efficient!)
4407    </TD
4408 ></TR
4409 ></TBODY
4410 ></TABLE
4411 ><P
4412 ></P
4413 ><P
4414 ></P
4415 ><TABLE
4416 BORDER="0"
4417 ><TBODY
4418 ><TR
4419 ><TD
4420 >    <I
4421 CLASS="EMPHASIS"
4422 >+filter{shockwave-flash}</I
4423 >:   Kill embedded Shockwave Flash objects
4424    </TD
4425 ></TR
4426 ></TBODY
4427 ></TABLE
4428 ><P
4429 ></P
4430 ><P
4431 ></P
4432 ><TABLE
4433 BORDER="0"
4434 ><TBODY
4435 ><TR
4436 ><TD
4437 >    <I
4438 CLASS="EMPHASIS"
4439 >+filter{crude-parental}</I
4440 >:   Kill all web pages that contain the words "sex" or "warez"
4441    </TD
4442 ></TR
4443 ></TBODY
4444 ></TABLE
4445 ><P
4446 ></P
4447 ></DD
4448 ><DT
4449 >Notes:</DT
4450 ><DD
4451 ><P
4452 >    This is potentially a very powerful feature! And requires a knowledge 
4453     of regular expressions if you want to <SPAN
4454 CLASS="QUOTE"
4455 >"roll your own"</SPAN
4456 >.
4457     Filtering operates on a line by line basis throughout the entire page.
4458    </P
4459 ><P
4460 >    Filtering requires buffering the page content, which may appear to
4461     slow down page rendering since nothing is displayed until all content has
4462     passed the filters. (It does not really take longer, but seems that way
4463     since the page is not incrementally displayed.) This effect will be more
4464     noticeable on slower connections.
4465    </P
4466 ><P
4467 >    Filtering can achieve some of the effects as the 
4468     <A
4469 HREF="configuration.html#BLOCK"
4470 TARGET="_top"
4471 ><SPAN
4472 CLASS="QUOTE"
4473 >"+block"</SPAN
4474 ></A
4475 >
4476     action, i.e. it can be used to block ads and banners. In the overall 
4477     scheme of things, filtering is one of the first things <SPAN
4478 CLASS="QUOTE"
4479 >"Privoxy"</SPAN
4480
4481     does with a web page. So other most other actions are applied to the 
4482     already <SPAN
4483 CLASS="QUOTE"
4484 >"filtered"</SPAN
4485 > page.
4486    </P
4487 ></DD
4488 ></DL
4489 ></DIV
4490 ></DIV
4491 ><DIV
4492 CLASS="SECT4"
4493 ><H4
4494 CLASS="SECT4"
4495 ><A
4496 NAME="HIDE-FORWARDED-FOR-HEADERS"
4497 >7.4.5.7. <I
4498 CLASS="EMPHASIS"
4499 >+hide-forwarded-for-headers</I
4500 ></A
4501 ></H4
4502 ><P
4503 ></P
4504 ><DIV
4505 CLASS="VARIABLELIST"
4506 ><DL
4507 ><DT
4508 >Type:</DT
4509 ><DD
4510 ><P
4511 >Boolean.</P
4512 ></DD
4513 ><DT
4514 >Typical uses:</DT
4515 ><DD
4516 ><P
4517 >    Block any existing X-Forwarded-for HTTP header, and do not add a new one.
4518    </P
4519 ></DD
4520 ><DT
4521 >Possible values:</DT
4522 ><DD
4523 ><P
4524 >    N/A
4525    </P
4526 ></DD
4527 ><DT
4528 >Example usage:</DT
4529 ><DD
4530 ><P
4531 CLASS="LITERALLAYOUT"
4532 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4533 CLASS="EMPHASIS"
4534 >{+hide-forwarded-for-headers}</I
4535 ><br>
4536 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4537 CLASS="EMPHASIS"
4538 >.example.com</I
4539 ><br>
4540 &nbsp;&nbsp;&nbsp;&nbsp;</P
4541 ></DD
4542 ><DT
4543 >Notes:</DT
4544 ><DD
4545 ><P
4546 >    It is fairly safe to leave this on. It does not seem to break many sites.
4547    </P
4548 ></DD
4549 ></DL
4550 ></DIV
4551 ></DIV
4552 ><DIV
4553 CLASS="SECT4"
4554 ><H4
4555 CLASS="SECT4"
4556 ><A
4557 NAME="HIDE-FROM-HEADER"
4558 >7.4.5.8. <I
4559 CLASS="EMPHASIS"
4560 >+hide-from-header</I
4561 ></A
4562 ></H4
4563 ><P
4564 ></P
4565 ><DIV
4566 CLASS="VARIABLELIST"
4567 ><DL
4568 ><DT
4569 >Type:</DT
4570 ><DD
4571 ><P
4572 >Parameterized.</P
4573 ></DD
4574 ><DT
4575 >Typical uses:</DT
4576 ><DD
4577 ><P
4578 >    To block the browser from sending your email address in a <SPAN
4579 CLASS="QUOTE"
4580 >"From:"</SPAN
4581 >
4582     header.
4583    </P
4584 ></DD
4585 ><DT
4586 >Possible values:</DT
4587 ><DD
4588 ><P
4589 >    Keyword: <SPAN
4590 CLASS="QUOTE"
4591 >"block"</SPAN
4592 >, or any user defined value.
4593    </P
4594 ></DD
4595 ><DT
4596 >Example usage:</DT
4597 ><DD
4598 ><P
4599 CLASS="LITERALLAYOUT"
4600 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4601 CLASS="EMPHASIS"
4602 >{+hide-from-header{block}}</I
4603 ><br>
4604 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4605 CLASS="EMPHASIS"
4606 >.example.com</I
4607 ><br>
4608 &nbsp;&nbsp;&nbsp;&nbsp;</P
4609 ></DD
4610 ><DT
4611 >Notes:</DT
4612 ><DD
4613 ><P
4614 >    The keyword <SPAN
4615 CLASS="QUOTE"
4616 >"block"</SPAN
4617 > will completely remove the header 
4618     (not to be confused with the <A
4619 HREF="configuration.html#BLOCK"
4620 TARGET="_top"
4621 ><SPAN
4622 CLASS="QUOTE"
4623 >"+block"</SPAN
4624 ></A
4625 > action).
4626     Alternately, you can specify any value you prefer to send to the web
4627     server.
4628    </P
4629 ></DD
4630 ></DL
4631 ></DIV
4632 ></DIV
4633 ><DIV
4634 CLASS="SECT4"
4635 ><H4
4636 CLASS="SECT4"
4637 ><A
4638 NAME="HIDE-REFERER"
4639 >7.4.5.9. <I
4640 CLASS="EMPHASIS"
4641 ><A
4642 NAME="HIDE-REFERRER"
4643 ></A
4644 >+hide-referer</I
4645 ></A
4646 ></H4
4647 ><P
4648 ></P
4649 ><DIV
4650 CLASS="VARIABLELIST"
4651 ><DL
4652 ><DT
4653 >Type:</DT
4654 ><DD
4655 ><P
4656 >Parameterized.</P
4657 ></DD
4658 ><DT
4659 >Typical uses:</DT
4660 ><DD
4661 ><P
4662 >     Don't send the <SPAN
4663 CLASS="QUOTE"
4664 >"Referer:"</SPAN
4665 > (sic) HTTP header to the web site.
4666      Or, alternately send a forged header instead.
4667    </P
4668 ></DD
4669 ><DT
4670 >Possible values:</DT
4671 ><DD
4672 ><P
4673 >     Prevent the header from being sent with the keyword, <SPAN
4674 CLASS="QUOTE"
4675 >"block"</SPAN
4676 >.
4677      Or, <SPAN
4678 CLASS="QUOTE"
4679 >"forge"</SPAN
4680 > a URL to one from the same server as the request.
4681      Or, set to user defined value of your choice.
4682    </P
4683 ></DD
4684 ><DT
4685 >Example usage:</DT
4686 ><DD
4687 ><P
4688 CLASS="LITERALLAYOUT"
4689 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4690 CLASS="EMPHASIS"
4691 >{+hide-referer{forge}}</I
4692 ><br>
4693 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4694 CLASS="EMPHASIS"
4695 >.example.com</I
4696 ><br>
4697 &nbsp;&nbsp;&nbsp;&nbsp;</P
4698 ></DD
4699 ><DT
4700 >Notes:</DT
4701 ><DD
4702 ><P
4703 >    <SPAN
4704 CLASS="QUOTE"
4705 >"forge"</SPAN
4706 > is the preferred option here, since some servers will
4707     not send images back otherwise.
4708    </P
4709 ><P
4710 >  
4711    <SPAN
4712 CLASS="QUOTE"
4713 >"+hide-referrer"</SPAN
4714 > is an alternate spelling of
4715    <SPAN
4716 CLASS="QUOTE"
4717 >"+hide-referer"</SPAN
4718 >. It has the exact same parameters, and can be freely
4719    mixed with, <SPAN
4720 CLASS="QUOTE"
4721 >"+hide-referer"</SPAN
4722 >. (<SPAN
4723 CLASS="QUOTE"
4724 >"referrer"</SPAN
4725 > is the
4726    correct English spelling, however the HTTP specification has a bug - it
4727    requires it to be spelled as <SPAN
4728 CLASS="QUOTE"
4729 >"referer"</SPAN
4730 >.) 
4731   </P
4732 ></DD
4733 ></DL
4734 ></DIV
4735 ></DIV
4736 ><DIV
4737 CLASS="SECT4"
4738 ><H4
4739 CLASS="SECT4"
4740 ><A
4741 NAME="HIDE-USER-AGENT"
4742 >7.4.5.10. <I
4743 CLASS="EMPHASIS"
4744 >+hide-user-agent</I
4745 ></A
4746 ></H4
4747 ><P
4748 ></P
4749 ><DIV
4750 CLASS="VARIABLELIST"
4751 ><DL
4752 ><DT
4753 >Type:</DT
4754 ><DD
4755 ><P
4756 >Parameterized.</P
4757 ></DD
4758 ><DT
4759 >Typical uses:</DT
4760 ><DD
4761 ><P
4762 >    To change the <SPAN
4763 CLASS="QUOTE"
4764 >"User-Agent:"</SPAN
4765 > header so web servers can't tell
4766     your browser type. Who's business is it anyway?
4767    </P
4768 ></DD
4769 ><DT
4770 >Possible values:</DT
4771 ><DD
4772 ><P
4773 >    Any user defined string.
4774    </P
4775 ></DD
4776 ><DT
4777 >Example usage:</DT
4778 ><DD
4779 ><P
4780 CLASS="LITERALLAYOUT"
4781 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4782 CLASS="EMPHASIS"
4783 >{+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}}</I
4784 ><br>
4785 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4786 CLASS="EMPHASIS"
4787 >.msn.com</I
4788 ><br>
4789 &nbsp;&nbsp;&nbsp;&nbsp;</P
4790 ></DD
4791 ><DT
4792 >Notes:</DT
4793 ><DD
4794 ><P
4795 >     Warning! This breaks many web sites that depend on this in order 
4796      to determine how the target browser will respond to various 
4797      requests. Use with caution.
4798    </P
4799 ></DD
4800 ></DL
4801 ></DIV
4802 ></DIV
4803 ><DIV
4804 CLASS="SECT4"
4805 ><H4
4806 CLASS="SECT4"
4807 ><A
4808 NAME="HANDLE-AS-IMAGE"
4809 >7.4.5.11. <I
4810 CLASS="EMPHASIS"
4811 >+handle-as-image</I
4812 ></A
4813 ></H4
4814 ><P
4815 ></P
4816 ><DIV
4817 CLASS="VARIABLELIST"
4818 ><DL
4819 ><DT
4820 >Type:</DT
4821 ><DD
4822 ><P
4823 >Boolean.</P
4824 ></DD
4825 ><DT
4826 >Typical uses:</DT
4827 ><DD
4828 ><P
4829 >    To define what <SPAN
4830 CLASS="APPLICATION"
4831 >Privoxy</SPAN
4832 > should treat 
4833     automatically as an image, and is an important ingredient of how 
4834     ads are handled.
4835    </P
4836 ></DD
4837 ><DT
4838 >Possible values:</DT
4839 ><DD
4840 ><P
4841 >    N/A
4842    </P
4843 ></DD
4844 ><DT
4845 >Example usage:</DT
4846 ><DD
4847 ><P
4848 CLASS="LITERALLAYOUT"
4849 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4850 CLASS="EMPHASIS"
4851 >{+handle-as-image}</I
4852 ><br>
4853 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
4854 CLASS="EMPHASIS"
4855 >/.*\.(gif|jpg|jpeg|png|bmp|ico)</I
4856 ><br>
4857 &nbsp;&nbsp;&nbsp;&nbsp;</P
4858 ></DD
4859 ><DT
4860 >Notes:</DT
4861 ><DD
4862 ><P
4863 >    This only has meaning if the URL (or pattern) also is
4864     <SPAN
4865 CLASS="QUOTE"
4866 >"+block"</SPAN
4867 >ed, in which case a user definable image can
4868     be sent rather than a HTML page. This is integral to the whole concept of
4869     ad blocking: the URL must match <I
4870 CLASS="EMPHASIS"
4871 >both</I
4872 > a <A
4873 HREF="configuration.html#BLOCK"
4874 TARGET="_top"
4875 ><SPAN
4876 CLASS="QUOTE"
4877 >"+block"</SPAN
4878 ></A
4879 > rule,
4880     <I
4881 CLASS="EMPHASIS"
4882 >and</I
4883 > <SPAN
4884 CLASS="QUOTE"
4885 >"+handle-as-image"</SPAN
4886 >.
4887     (See <A
4888 HREF="configuration.html#SET-IMAGE-BLOCKER"
4889 TARGET="_top"
4890 ><SPAN
4891 CLASS="QUOTE"
4892 >"+set-image-blocker"</SPAN
4893 ></A
4894 >
4895     below for control over what will actually be displayed by the browser.)
4896    </P
4897 ><P
4898 >    There is little reason to change the default definition for this action.
4899    </P
4900 ></DD
4901 ></DL
4902 ></DIV
4903 ></DIV
4904 ><DIV
4905 CLASS="SECT4"
4906 ><H4
4907 CLASS="SECT4"
4908 ><A
4909 NAME="SET-IMAGE-BLOCKER"
4910 >7.4.5.12. <I
4911 CLASS="EMPHASIS"
4912 >+set-image-blocker</I
4913 ></A
4914 ></H4
4915 ><P
4916 ></P
4917 ><DIV
4918 CLASS="VARIABLELIST"
4919 ><DL
4920 ><DT
4921 >Type:</DT
4922 ><DD
4923 ><P
4924 >Parameterized.</P
4925 ></DD
4926 ><DT
4927 >Typical uses:</DT
4928 ><DD
4929 ><P
4930 >    Decide what to do with URLs that end up tagged with <I
4931 CLASS="EMPHASIS"
4932 >both</I
4933
4934     <A
4935 HREF="configuration.html#BLOCK"
4936 TARGET="_top"
4937 ><SPAN
4938 CLASS="QUOTE"
4939 >"+block"</SPAN
4940 ></A
4941 >
4942     and <A
4943 HREF="configuration.html#HANDLE-AS-IMAGE"
4944 TARGET="_top"
4945 ><SPAN
4946 CLASS="QUOTE"
4947 >"+handle-as-image"</SPAN
4948 ></A
4949 >,
4950     e.g an advertisement.
4951    </P
4952 ></DD
4953 ><DT
4954 >Possible values:</DT
4955 ><DD
4956 ><P
4957 >    There are four available options: <SPAN
4958 CLASS="QUOTE"
4959 >"-set-image-blocker"</SPAN
4960 > will send a HTML
4961     <SPAN
4962 CLASS="QUOTE"
4963 >"blocked"</SPAN
4964 > page, usually resulting in a <SPAN
4965 CLASS="QUOTE"
4966 >"broken
4967     image"</SPAN
4968 > icon.
4969     <SPAN
4970 CLASS="QUOTE"
4971 >"+set-image-blocker{<I
4972 CLASS="EMPHASIS"
4973 >blank</I
4974 >}"</SPAN
4975 > will send a
4976     1x1 transparent GIF image.
4977     <SPAN
4978 CLASS="QUOTE"
4979 >"+set-image-blocker{<I
4980 CLASS="EMPHASIS"
4981 >pattern</I
4982 >}"</SPAN
4983 > will send a
4984     checkerboard type pattern (the default). And finally,
4985     <SPAN
4986 CLASS="QUOTE"
4987 >"+set-image-blocker{<I
4988 CLASS="EMPHASIS"
4989 >http://xyz.com</I
4990 >}"</SPAN
4991 > will
4992     send a HTTP temporary redirect to the specified image. This has the
4993     advantage of the icon being being cached by the browser, which will speed
4994     up the display.
4995    </P
4996 ></DD
4997 ><DT
4998 >Example usage:</DT
4999 ><DD
5000 ><P
5001 CLASS="LITERALLAYOUT"
5002 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5003 CLASS="EMPHASIS"
5004 >{+set-image-blocker{blank}}</I
5005 ><br>
5006 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5007 CLASS="EMPHASIS"
5008 >.example.com</I
5009 ><br>
5010 &nbsp;&nbsp;&nbsp;&nbsp;</P
5011 ></DD
5012 ><DT
5013 >Notes:</DT
5014 ><DD
5015 ><P
5016 >    If you want <I
5017 CLASS="EMPHASIS"
5018 >invisible</I
5019 > ads, they need to meet 
5020     criteria as matching both <I
5021 CLASS="EMPHASIS"
5022 >images</I
5023 > and <I
5024 CLASS="EMPHASIS"
5025 >blocked</I
5026 >
5027     actions. And then, <SPAN
5028 CLASS="QUOTE"
5029 >"image-blocker"</SPAN
5030 > should be set to
5031     <SPAN
5032 CLASS="QUOTE"
5033 >"blank"</SPAN
5034 > for invisibility. Note you cannot treat HTML pages as
5035     images in most cases. For instance, frames require an HTML page to
5036     display. So a frame that is an ad, typically cannot be treated as an image.
5037     Forcing an <SPAN
5038 CLASS="QUOTE"
5039 >"image"</SPAN
5040 > in this situation just will not work
5041     reliably. 
5042    </P
5043 ></DD
5044 ></DL
5045 ></DIV
5046 ></DIV
5047 ><DIV
5048 CLASS="SECT4"
5049 ><H4
5050 CLASS="SECT4"
5051 ><A
5052 NAME="LIMIT-CONNECT"
5053 >7.4.5.13. <I
5054 CLASS="EMPHASIS"
5055 >+limit-connect</I
5056 ></A
5057 ></H4
5058 ><P
5059 ></P
5060 ><DIV
5061 CLASS="VARIABLELIST"
5062 ><DL
5063 ><DT
5064 >Type:</DT
5065 ><DD
5066 ><P
5067 >Parameterized.</P
5068 ></DD
5069 ><DT
5070 >Typical uses:</DT
5071 ><DD
5072 ><P
5073 >    By default, <SPAN
5074 CLASS="APPLICATION"
5075 >Privoxy</SPAN
5076 > only allows HTTP CONNECT
5077     requests to port 443 (the standard, secure HTTPS port). Use 
5078     <SPAN
5079 CLASS="QUOTE"
5080 >"+limit-connect"</SPAN
5081 > to disable this altogether, or to allow 
5082     more ports.
5083    </P
5084 ></DD
5085 ><DT
5086 >Possible values:</DT
5087 ><DD
5088 ><P
5089 >    Any valid port number, or port number range.
5090    </P
5091 ></DD
5092 ><DT
5093 >Example usages:</DT
5094 ><DD
5095 ><P
5096 CLASS="LITERALLAYOUT"
5097 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5098 CLASS="EMPHASIS"
5099 >+limit-connect{443}</I
5100 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;This&nbsp;is&nbsp;the&nbsp;default&nbsp;and&nbsp;need&nbsp;not&nbsp;be&nbsp;specified.<br>
5101 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5102 CLASS="EMPHASIS"
5103 >+limit-connect{80,443}</I
5104 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Ports&nbsp;80&nbsp;and&nbsp;443&nbsp;are&nbsp;OK.<br>
5105 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5106 CLASS="EMPHASIS"
5107 >+limit-connect{-3, 7, 20-100, 500-}</I
5108 >&nbsp;&nbsp;&nbsp;#&nbsp;Port&nbsp;less&nbsp;than&nbsp;3,&nbsp;7,&nbsp;20&nbsp;to&nbsp;100&nbsp;and&nbsp;above&nbsp;500&nbsp;are&nbsp;OK.<br>
5109 &nbsp;&nbsp;&nbsp;&nbsp;</P
5110 ></DD
5111 ><DT
5112 >Notes:</DT
5113 ><DD
5114 ><P
5115 >    The CONNECT methods exists in HTTP to allow access to secure websites
5116     (https:// URLs) through proxies. It works very simply: the proxy connects
5117     to the server on the specified port, and then short-circuits its
5118     connections to the client <I
5119 CLASS="EMPHASIS"
5120 >and</I
5121 > to the remote proxy.
5122     This can be a big security hole, since CONNECT-enabled proxies can be
5123     abused as TCP relays very easily.
5124   </P
5125 ><P
5126
5127    If you want to allow CONNECT for more ports than this, or want to forbid
5128    CONNECT altogether, you can specify a comma separated list of ports and
5129    port ranges (the latter using dashes, with the minimum defaulting to 0 and
5130    max to 65K).
5131   </P
5132 ><P
5133 >   If you don't know what any of this means, there probably is no reason to 
5134    change this one.
5135   </P
5136 ></DD
5137 ></DL
5138 ></DIV
5139 ></DIV
5140 ><DIV
5141 CLASS="SECT4"
5142 ><H4
5143 CLASS="SECT4"
5144 ><A
5145 NAME="PREVENT-COMPRESSION"
5146 >7.4.5.14. <I
5147 CLASS="EMPHASIS"
5148 >+prevent-compression</I
5149 ></A
5150 ></H4
5151 ><P
5152 ></P
5153 ><DIV
5154 CLASS="VARIABLELIST"
5155 ><DL
5156 ><DT
5157 >Type:</DT
5158 ><DD
5159 ><P
5160 >Boolean.</P
5161 ></DD
5162 ><DT
5163 >Typical uses:</DT
5164 ><DD
5165 ><P
5166 >    Prevent the specified websites from compressing HTTP data.
5167    </P
5168 ></DD
5169 ><DT
5170 >Possible values:</DT
5171 ><DD
5172 ><P
5173 >    N/A
5174    </P
5175 ></DD
5176 ><DT
5177 >Example usage:</DT
5178 ><DD
5179 ><P
5180 CLASS="LITERALLAYOUT"
5181 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5182 CLASS="EMPHASIS"
5183 >{+prevent-compression}</I
5184 ><br>
5185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5186 CLASS="EMPHASIS"
5187 >.example.com</I
5188 ><br>
5189 &nbsp;&nbsp;&nbsp;&nbsp;</P
5190 ></DD
5191 ><DT
5192 >Notes:</DT
5193 ><DD
5194 ><P
5195 >    Some websites do this, which can be a problem for
5196     <SPAN
5197 CLASS="APPLICATION"
5198 >Privoxy</SPAN
5199 >, since 
5200     <A
5201 HREF="configuration.html#FILTER"
5202 TARGET="_top"
5203 ><SPAN
5204 CLASS="QUOTE"
5205 >"+filter"</SPAN
5206 ></A
5207 >,
5208     <A
5209 HREF="configuration.html#KILL-POPUPS"
5210 TARGET="_top"
5211 ><SPAN
5212 CLASS="QUOTE"
5213 >"+kill-popups"</SPAN
5214 ></A
5215 >
5216     and <A
5217 HREF="configuration.html#GIF-DEANIMATE"
5218 TARGET="_top"
5219 ><SPAN
5220 CLASS="QUOTE"
5221 >"+gif-deanimate"</SPAN
5222 ></A
5223 >
5224     will not work on compressed data. This will slow down connections to those
5225     websites, though. Default typically is to turn
5226     <SPAN
5227 CLASS="QUOTE"
5228 >"prevent-compression"</SPAN
5229 > on.
5230    </P
5231 ></DD
5232 ></DL
5233 ></DIV
5234 ></DIV
5235 ><DIV
5236 CLASS="SECT4"
5237 ><H4
5238 CLASS="SECT4"
5239 ><A
5240 NAME="SESSION-COOKIES-ONLY"
5241 >7.4.5.15. <I
5242 CLASS="EMPHASIS"
5243 >+session-cookies-only</I
5244 ></A
5245 ></H4
5246 ><P
5247 ></P
5248 ><DIV
5249 CLASS="VARIABLELIST"
5250 ><DL
5251 ><DT
5252 >Type:</DT
5253 ><DD
5254 ><P
5255 >Boolean.</P
5256 ></DD
5257 ><DT
5258 >Typical uses:</DT
5259 ><DD
5260 ><P
5261 >    Allow cookies for the current browser session <I
5262 CLASS="EMPHASIS"
5263 >only</I
5264 >.
5265    </P
5266 ></DD
5267 ><DT
5268 >Possible values:</DT
5269 ><DD
5270 ><P
5271 >    N/A
5272    </P
5273 ></DD
5274 ><DT
5275 >Example usage (disabling):</DT
5276 ><DD
5277 ><P
5278 CLASS="LITERALLAYOUT"
5279 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5280 CLASS="EMPHASIS"
5281 >{-session-cookies-only}</I
5282 ><br>
5283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5284 CLASS="EMPHASIS"
5285 >.example.com</I
5286 ><br>
5287 &nbsp;&nbsp;&nbsp;&nbsp;</P
5288 ></DD
5289 ><DT
5290 >Notes:</DT
5291 ><DD
5292 ><P
5293 >    If websites set cookies, <SPAN
5294 CLASS="QUOTE"
5295 >"+session-cookies-only"</SPAN
5296 > will make sure
5297     they are erased when you exit and restart your web browser. This makes
5298     profiling cookies useless, but won't break sites which require cookies so
5299     that you can log in for transactions. This is generally turned on for all 
5300     sites, and is the recommended setting.
5301    </P
5302 ><P
5303 >    <SPAN
5304 CLASS="QUOTE"
5305 >"+prevent-*-cookies"</SPAN
5306 > actions should be turned off as well (see
5307     below), for <SPAN
5308 CLASS="QUOTE"
5309 >"+session-cookies-only"</SPAN
5310 > to work. Or, else no cookies 
5311     will get through at all. For, <SPAN
5312 CLASS="QUOTE"
5313 >"persistent"</SPAN
5314 > cookies that survive 
5315     across browser sessions, see below as well.
5316    </P
5317 ></DD
5318 ></DL
5319 ></DIV
5320 ></DIV
5321 ><DIV
5322 CLASS="SECT4"
5323 ><H4
5324 CLASS="SECT4"
5325 ><A
5326 NAME="PREVENT-READING-COOKIES"
5327 >7.4.5.16. <I
5328 CLASS="EMPHASIS"
5329 >+prevent-reading-cookies</I
5330 ></A
5331 ></H4
5332 ><P
5333 ></P
5334 ><DIV
5335 CLASS="VARIABLELIST"
5336 ><DL
5337 ><DT
5338 >Type:</DT
5339 ><DD
5340 ><P
5341 >Boolean.</P
5342 ></DD
5343 ><DT
5344 >Typical uses:</DT
5345 ><DD
5346 ><P
5347 >    Explicitly prevent the web server from reading any cookies on your 
5348     system.
5349    </P
5350 ></DD
5351 ><DT
5352 >Possible values:</DT
5353 ><DD
5354 ><P
5355 >    N/A
5356    </P
5357 ></DD
5358 ><DT
5359 >Example usage:</DT
5360 ><DD
5361 ><P
5362 CLASS="LITERALLAYOUT"
5363 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5364 CLASS="EMPHASIS"
5365 >{+prevent-reading-cookies}</I
5366 ><br>
5367 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5368 CLASS="EMPHASIS"
5369 >.example.com</I
5370 ><br>
5371 &nbsp;&nbsp;&nbsp;&nbsp;</P
5372 ></DD
5373 ><DT
5374 >Notes:</DT
5375 ><DD
5376 ><P
5377 >    Often used in conjunction with <SPAN
5378 CLASS="QUOTE"
5379 >"+prevent-setting-cookies"</SPAN
5380 > to 
5381     disable cookies completely. Note that 
5382     <A
5383 HREF="configuration.html#SESSION-COOKIES-ONLY"
5384 TARGET="_top"
5385 ><SPAN
5386 CLASS="QUOTE"
5387 >"+session-cookies-only"</SPAN
5388 ></A
5389 >
5390     requires these to both be disabled (or else it never gets any cookies to cache).
5391    </P
5392 ><P
5393 >    For <SPAN
5394 CLASS="QUOTE"
5395 >"persistent"</SPAN
5396 > cookies to work (i.e. they survive across browser 
5397     sessions and reboots), all three cookie settings should be <SPAN
5398 CLASS="QUOTE"
5399 >"off"</SPAN
5400
5401     for the specified sites.
5402    </P
5403 ></DD
5404 ></DL
5405 ></DIV
5406 ></DIV
5407 ><DIV
5408 CLASS="SECT4"
5409 ><H4
5410 CLASS="SECT4"
5411 ><A
5412 NAME="PREVENT-SETTING-COOKIES"
5413 >7.4.5.17. <I
5414 CLASS="EMPHASIS"
5415 >+prevent-setting-cookies</I
5416 ></A
5417 ></H4
5418 ><P
5419 ></P
5420 ><DIV
5421 CLASS="VARIABLELIST"
5422 ><DL
5423 ><DT
5424 >Type:</DT
5425 ><DD
5426 ><P
5427 >Boolean.</P
5428 ></DD
5429 ><DT
5430 >Typical uses:</DT
5431 ><DD
5432 ><P
5433 >    Explicitly block the web server from storing cookies on your 
5434     system.
5435    </P
5436 ></DD
5437 ><DT
5438 >Possible values:</DT
5439 ><DD
5440 ><P
5441 >    N/A
5442    </P
5443 ></DD
5444 ><DT
5445 >Example usage:</DT
5446 ><DD
5447 ><P
5448 CLASS="LITERALLAYOUT"
5449 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5450 CLASS="EMPHASIS"
5451 >{+prevent-setting-cookies}</I
5452 ><br>
5453 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5454 CLASS="EMPHASIS"
5455 >.example.com</I
5456 ><br>
5457 &nbsp;&nbsp;&nbsp;&nbsp;</P
5458 ></DD
5459 ><DT
5460 >Notes:</DT
5461 ><DD
5462 ><P
5463 >    Often used in conjunction with <SPAN
5464 CLASS="QUOTE"
5465 >"+prevent-reading-cookies"</SPAN
5466 > to 
5467     disable cookies completely (see above).
5468    </P
5469 ></DD
5470 ></DL
5471 ></DIV
5472 ></DIV
5473 ><DIV
5474 CLASS="SECT4"
5475 ><H4
5476 CLASS="SECT4"
5477 ><A
5478 NAME="KILL-POPUP"
5479 >7.4.5.18. <I
5480 CLASS="EMPHASIS"
5481 >+kill-popups<A
5482 NAME="KILL-POPUPS"
5483 ></A
5484 ></I
5485 ></A
5486 ></H4
5487 ><P
5488 ></P
5489 ><DIV
5490 CLASS="VARIABLELIST"
5491 ><DL
5492 ><DT
5493 >Type:</DT
5494 ><DD
5495 ><P
5496 >Boolean.</P
5497 ></DD
5498 ><DT
5499 >Typical uses:</DT
5500 ><DD
5501 ><P
5502 >    Stop those annoying JavaScript pop-up windows! 
5503    </P
5504 ></DD
5505 ><DT
5506 >Possible values:</DT
5507 ><DD
5508 ><P
5509 >    N/A
5510    </P
5511 ></DD
5512 ><DT
5513 >Example usage:</DT
5514 ><DD
5515 ><P
5516 CLASS="LITERALLAYOUT"
5517 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5518 CLASS="EMPHASIS"
5519 >{+kill-popups}</I
5520 ><br>
5521 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5522 CLASS="EMPHASIS"
5523 >.example.com</I
5524 ><br>
5525 &nbsp;&nbsp;&nbsp;&nbsp;</P
5526 ></DD
5527 ><DT
5528 >Notes:</DT
5529 ><DD
5530 ><P
5531 >    <SPAN
5532 CLASS="QUOTE"
5533 >"+kill-popups"</SPAN
5534 > uses a built in filter to disable pop-ups
5535     that use the <TT
5536 CLASS="LITERAL"
5537 >window.open()</TT
5538 > function, etc. This is 
5539     one of the first actions processed by <SPAN
5540 CLASS="APPLICATION"
5541 >Privoxy</SPAN
5542 >
5543     as it contacts the remote web server. This action is not always 100% reliable, 
5544     and is supplemented by <SPAN
5545 CLASS="QUOTE"
5546 >"+filter{<I
5547 CLASS="EMPHASIS"
5548 >popups</I
5549 >}"</SPAN
5550 >.
5551     </P
5552 ></DD
5553 ></DL
5554 ></DIV
5555 ></DIV
5556 ><DIV
5557 CLASS="SECT4"
5558 ><H4
5559 CLASS="SECT4"
5560 ><A
5561 NAME="SEND-VANILLA-WAFER"
5562 >7.4.5.19. <I
5563 CLASS="EMPHASIS"
5564 >+send-vanilla-wafer</I
5565 ></A
5566 ></H4
5567 ><P
5568 ></P
5569 ><DIV
5570 CLASS="VARIABLELIST"
5571 ><DL
5572 ><DT
5573 >Type:</DT
5574 ><DD
5575 ><P
5576 >Boolean.</P
5577 ></DD
5578 ><DT
5579 >Typical uses:</DT
5580 ><DD
5581 ><P
5582 >    Sends a cookie for every site stating that you do not accept any copyright
5583     on cookies sent to you, and asking them not to track you.
5584    </P
5585 ></DD
5586 ><DT
5587 >Possible values:</DT
5588 ><DD
5589 ><P
5590 >    N/A
5591    </P
5592 ></DD
5593 ><DT
5594 >Example usage:</DT
5595 ><DD
5596 ><P
5597 CLASS="LITERALLAYOUT"
5598 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5599 CLASS="EMPHASIS"
5600 >{+send-vanilla-wafer}</I
5601 ><br>
5602 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5603 CLASS="EMPHASIS"
5604 >.example.com</I
5605 ><br>
5606 &nbsp;&nbsp;&nbsp;&nbsp;</P
5607 ></DD
5608 ><DT
5609 >Notes:</DT
5610 ><DD
5611 ><P
5612 >    This action only applies if you are using a <TT
5613 CLASS="FILENAME"
5614 >jarfile</TT
5615 >
5616     for saving cookies. Of course, this is a (relatively) unique header and 
5617     could conceivably be used to track you.
5618    </P
5619 ></DD
5620 ></DL
5621 ></DIV
5622 ></DIV
5623 ><DIV
5624 CLASS="SECT4"
5625 ><H4
5626 CLASS="SECT4"
5627 ><A
5628 NAME="SEND-WAFER"
5629 >7.4.5.20. <I
5630 CLASS="EMPHASIS"
5631 >+send-wafer</I
5632 ></A
5633 ></H4
5634 ><P
5635 ></P
5636 ><DIV
5637 CLASS="VARIABLELIST"
5638 ><DL
5639 ><DT
5640 >Type:</DT
5641 ><DD
5642 ><P
5643 >Multi-value.</P
5644 ></DD
5645 ><DT
5646 >Typical uses:</DT
5647 ><DD
5648 ><P
5649 >    This allows you to send an arbitrary, user definable cookie.
5650    </P
5651 ></DD
5652 ><DT
5653 >Possible values:</DT
5654 ><DD
5655 ><P
5656 >    User specified cookie name and corresponding value.
5657    </P
5658 ></DD
5659 ><DT
5660 >Example usage:</DT
5661 ><DD
5662 ><P
5663 CLASS="LITERALLAYOUT"
5664 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5665 CLASS="EMPHASIS"
5666 >{+send-wafer{name=value}}</I
5667 ><br>
5668 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I
5669 CLASS="EMPHASIS"
5670 >.example.com</I
5671 ><br>
5672 &nbsp;&nbsp;&nbsp;&nbsp;</P
5673 ></DD
5674 ><DT
5675 >Notes:</DT
5676 ><DD
5677 ><P
5678 >    This can be specified multiple times in order to add as many cookies as you
5679     like.
5680    </P
5681 ></DD
5682 ></DL
5683 ></DIV
5684 ></DIV
5685 ><DIV
5686 CLASS="SECT4"
5687 ><H3
5688 CLASS="SECT4"
5689 ><A
5690 NAME="ACT-EXAMPLES"
5691 >7.4.5.21. Actions Examples</A
5692 ></H3
5693 ><P
5694 > Note that the meaning of any of the above examples is reversed by preceding
5695  the action with a <SPAN
5696 CLASS="QUOTE"
5697 >"-"</SPAN
5698 >, in place of the <SPAN
5699 CLASS="QUOTE"
5700 >"+"</SPAN
5701 >. Also, 
5702  that some actions are turned on in the default section of the actions file, 
5703  and require little to no additional configuration. These are just <SPAN
5704 CLASS="QUOTE"
5705 >"on"</SPAN
5706 >.
5707  But, other actions that are turned on the default section <I
5708 CLASS="EMPHASIS"
5709 >do
5710  typically require</I
5711 > exceptions to be listed in the lower sections of
5712  actions file. E.g. by default no URLs are <SPAN
5713 CLASS="QUOTE"
5714 >"blocked"</SPAN
5715 > (i.e. in 
5716  the default definitions of <TT
5717 CLASS="FILENAME"
5718 >default.action</TT
5719 >). We need 
5720  exceptions to this in order to enable ad blocking.</P
5721 ><P
5722 > Some examples:</P
5723 ><P
5724 > Turn off cookies by default, then allow a few through for specified sites 
5725  (showing an excerpt from the <SPAN
5726 CLASS="QUOTE"
5727 >"default"</SPAN
5728 > section of an actions
5729  file ONLY):</P
5730 ><P
5731 > <TT
5732 CLASS="LITERAL"
5733 >  <P
5734 CLASS="LITERALLAYOUT"
5735 >&nbsp;#&nbsp;Excerpt&nbsp;only:<br>
5736 &nbsp;#&nbsp;Allow&nbsp;cookies&nbsp;to&nbsp;and&nbsp;from&nbsp;the&nbsp;server,&nbsp;but<br>
5737 &nbsp;#&nbsp;for&nbsp;this&nbsp;browser&nbsp;session&nbsp;ONLY<br>
5738 &nbsp;{&nbsp;<br>
5739 &nbsp;&nbsp;&nbsp;#&nbsp;other&nbsp;actions&nbsp;normally&nbsp;listed&nbsp;here...<br>
5740 &nbsp;&nbsp;&nbsp;-prevent-setting-cookies&nbsp;\<br>
5741 &nbsp;&nbsp;&nbsp;-prevent-reading-cookies&nbsp;\<br>
5742 &nbsp;&nbsp;&nbsp;+session-cookies-only&nbsp;&nbsp;&nbsp;\&nbsp;&nbsp;<br>
5743 &nbsp;}<br>
5744 &nbsp;/&nbsp;#&nbsp;match&nbsp;all&nbsp;URLs<br>
5745 <br>
5746 &nbsp;#&nbsp;Exceptions&nbsp;to&nbsp;the&nbsp;above,&nbsp;sites&nbsp;that&nbsp;benefit&nbsp;from&nbsp;persistent&nbsp;cookies<br>
5747 &nbsp;#&nbsp;that&nbsp;are&nbsp;saved&nbsp;from&nbsp;one&nbsp;browser&nbsp;session&nbsp;to&nbsp;the&nbsp;next.<br>
5748 &nbsp;{&nbsp;-session-cookies-only&nbsp;}<br>
5749 &nbsp;&nbsp;.javasoft.com<br>
5750 &nbsp;&nbsp;.sun.com<br>
5751 &nbsp;&nbsp;.yahoo.com<br>
5752 &nbsp;&nbsp;.msdn.microsoft.com<br>
5753 &nbsp;&nbsp;.redhat.com<br>
5754 <br>
5755 &nbsp;&nbsp;&nbsp;</P
5756
5757  </TT
5758 ></P
5759 ><P
5760 > Now turn off <SPAN
5761 CLASS="QUOTE"
5762 >"fast redirects"</SPAN
5763 >, and then we allow two exceptions:</P
5764 ><P
5765 > <TT
5766 CLASS="LITERAL"
5767 >  <P
5768 CLASS="LITERALLAYOUT"
5769 >&nbsp;#&nbsp;Turn&nbsp;them&nbsp;off&nbsp;(excerpt&nbsp;only)!<br>
5770 &nbsp;{<br>
5771 &nbsp;&nbsp;#&nbsp;other&nbsp;actions&nbsp;normally&nbsp;listed&nbsp;here...<br>
5772 &nbsp;&nbsp;+fast-redirects<br>
5773 &nbsp;}<br>
5774 &nbsp;/&nbsp;#&nbsp;match&nbsp;all&nbsp;URLs<br>
5775 &nbsp;<br>
5776 &nbsp;#&nbsp;Reverse&nbsp;it&nbsp;for&nbsp;these&nbsp;two&nbsp;sites,&nbsp;which&nbsp;don't&nbsp;work&nbsp;right&nbsp;without&nbsp;it.<br>
5777 &nbsp;{-fast-redirects}<br>
5778 &nbsp;&nbsp;www.ukc.ac.uk/cgi-bin/wac\.cgi\?<br>
5779 &nbsp;&nbsp;login.yahoo.com<br>
5780 &nbsp;&nbsp;&nbsp;</P
5781
5782  </TT
5783 ></P
5784 ><P
5785 > Turn on page filtering according to rules in the defined sections 
5786  of <TT
5787 CLASS="FILENAME"
5788 >default.filter</TT
5789 >, and make one exception for 
5790  Sourceforge:
5791  </P
5792 ><P
5793 > <TT
5794 CLASS="LITERAL"
5795 >  <P
5796 CLASS="LITERALLAYOUT"
5797 >&nbsp;#&nbsp;Run&nbsp;everything&nbsp;through&nbsp;the&nbsp;filter&nbsp;file,&nbsp;using&nbsp;only&nbsp;certain<br>
5798 &nbsp;#&nbsp;specified&nbsp;sections:<br>
5799 &nbsp;{<br>
5800 &nbsp;&nbsp;#&nbsp;other&nbsp;actions&nbsp;normally&nbsp;listed&nbsp;here...<br>
5801 &nbsp;&nbsp;+filter{html-annoyances}&nbsp;+filter{js-annoyances}&nbsp;+filter{kill-popups}\<br>
5802 &nbsp;&nbsp;+filter{webbugs}&nbsp;+filter{nimda}&nbsp;+filter{banners-by-size}<br>
5803 &nbsp;}<br>
5804 &nbsp;/&nbsp;#match&nbsp;all&nbsp;URLs<br>
5805 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
5806 &nbsp;#&nbsp;Then&nbsp;disable&nbsp;filtering&nbsp;of&nbsp;code&nbsp;from&nbsp;all&nbsp;sourceforge&nbsp;domains!<br>
5807 &nbsp;{-filter}<br>
5808 &nbsp;&nbsp;.sourceforge.net<br>
5809 &nbsp;&nbsp;&nbsp;</P
5810
5811  </TT
5812 ></P
5813 ><P
5814 > Now some URLs that we want <SPAN
5815 CLASS="QUOTE"
5816 >"blocked"</SPAN
5817 > (normally generates 
5818  the <SPAN
5819 CLASS="QUOTE"
5820 >"blocked"</SPAN
5821 > banner). Typically, the <SPAN
5822 CLASS="QUOTE"
5823 >"block"</SPAN
5824 >
5825  action is off by default in the upper section of an actions file, then enabled
5826  against certain URLs and patterns in the lower part of the file. Many of these use <A
5827 HREF="appendix.html#REGEX"
5828 >regular expressions</A
5829 > that will expand to match multiple
5830  URLs: </P
5831 ><P
5832 > <TT
5833 CLASS="LITERAL"
5834 >  <P
5835 CLASS="LITERALLAYOUT"
5836 >&nbsp;&nbsp;#&nbsp;Blocklist:<br>
5837 &nbsp;&nbsp;{+block}<br>
5838 &nbsp;&nbsp;ad*.<br>
5839 &nbsp;&nbsp;.*ads.<br>
5840 &nbsp;&nbsp;banner?.<br>
5841 &nbsp;&nbsp;count*.<br>
5842 &nbsp;&nbsp;/.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)<br>
5843 &nbsp;&nbsp;/(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/<br>
5844 &nbsp;&nbsp;.hitbox.com&nbsp;<br>
5845 &nbsp;&nbsp;/.*/(ng)?adclient\.cgi<br>
5846 &nbsp;&nbsp;/.*/(plain|live|rotate)[-_.]?ads?/<br>
5847 &nbsp;&nbsp;/.*/abanners/<br>
5848 &nbsp;&nbsp;/autoads/<br>
5849 &nbsp;&nbsp;&nbsp;</P
5850
5851  </TT
5852 ></P
5853 ><P
5854 > Note that many of these actions have the potential to cause a page to
5855  misbehave, possibly even not to display at all. There are many ways 
5856  a site designer may choose to design his site, and what HTTP header 
5857  content, and other criteria, he may depend on. There is no way to have hard
5858  and fast rules for all sites. See the <A
5859 HREF="appendix.html#ACTIONSANAT"
5860 >Appendix</A
5861 > for a brief example on troubleshooting
5862  actions.</P
5863 ></DIV
5864 ></DIV
5865 ><DIV
5866 CLASS="SECT3"
5867 ><H3
5868 CLASS="SECT3"
5869 ><A
5870 NAME="ALIASES"
5871 >7.4.6. Aliases</A
5872 ></H3
5873 ><P
5874 > Custom <SPAN
5875 CLASS="QUOTE"
5876 >"actions"</SPAN
5877 >, known to <SPAN
5878 CLASS="APPLICATION"
5879 >Privoxy</SPAN
5880 >
5881  as <SPAN
5882 CLASS="QUOTE"
5883 >"aliases"</SPAN
5884 >, can be defined by combining other <SPAN
5885 CLASS="QUOTE"
5886 >"actions"</SPAN
5887 >.
5888  These can in turn be invoked just like the built-in <SPAN
5889 CLASS="QUOTE"
5890 >"actions"</SPAN
5891 >.
5892  Currently, an alias can contain any character except space, tab, <SPAN
5893 CLASS="QUOTE"
5894 >"="</SPAN
5895 >,
5896  <SPAN
5897 CLASS="QUOTE"
5898 >"{"</SPAN
5899 > or <SPAN
5900 CLASS="QUOTE"
5901 >"}"</SPAN
5902 >. But please use only <SPAN
5903 CLASS="QUOTE"
5904 >"a"</SPAN
5905 >-
5906  <SPAN
5907 CLASS="QUOTE"
5908 >"z"</SPAN
5909 >, <SPAN
5910 CLASS="QUOTE"
5911 >"0"</SPAN
5912 >-<SPAN
5913 CLASS="QUOTE"
5914 >"9"</SPAN
5915 >, <SPAN
5916 CLASS="QUOTE"
5917 >"+"</SPAN
5918 >, and
5919  <SPAN
5920 CLASS="QUOTE"
5921 >"-"</SPAN
5922 >. Alias names are not case sensitive, and 
5923  <I
5924 CLASS="EMPHASIS"
5925 >must be defined before other actions</I
5926 > in the
5927  actions file! And there can only be one set of <SPAN
5928 CLASS="QUOTE"
5929 >"aliases"</SPAN
5930 >
5931  defined per file. Each actions file may have its own aliases, but they are 
5932  only visible within that file.</P
5933 ><P
5934 > Now let's define a few aliases:</P
5935 ><P
5936 > <TT
5937 CLASS="LITERAL"
5938 >  <P
5939 CLASS="LITERALLAYOUT"
5940 >&nbsp;#&nbsp;Useful&nbsp;custom&nbsp;aliases&nbsp;we&nbsp;can&nbsp;use&nbsp;later.&nbsp;These&nbsp;must&nbsp;come&nbsp;first!<br>
5941 &nbsp;{{alias}}<br>
5942 &nbsp;+prevent-cookies&nbsp;=&nbsp;+prevent-setting-cookies&nbsp;+prevent-reading-cookies<br>
5943 &nbsp;-prevent-cookies&nbsp;=&nbsp;-prevent-setting-cookies&nbsp;-prevent-reading-cookies<br>
5944 &nbsp;fragile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;-block&nbsp;-prevent-cookies&nbsp;-filter&nbsp;-fast-redirects&nbsp;-hide-referer&nbsp;-kill-popups<br>
5945 &nbsp;shop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;-prevent-cookies&nbsp;-filter&nbsp;-fast-redirects<br>
5946 &nbsp;+imageblock&nbsp;=&nbsp;+block&nbsp;+handle-as-image<br>
5947 <br>
5948 &nbsp;#&nbsp;Aliases&nbsp;defined&nbsp;from&nbsp;other&nbsp;aliases,&nbsp;for&nbsp;people&nbsp;who&nbsp;don't&nbsp;like&nbsp;to&nbsp;type&nbsp;<br>
5949 &nbsp;#&nbsp;too&nbsp;much:&nbsp;&nbsp;;-)<br>
5950 &nbsp;c0&nbsp;=&nbsp;+prevent-cookies<br>
5951 &nbsp;c1&nbsp;=&nbsp;-prevent-cookies<br>
5952 &nbsp;#...&nbsp;etc.&nbsp;&nbsp;Customize&nbsp;to&nbsp;your&nbsp;heart's&nbsp;content.<br>
5953 &nbsp;&nbsp;&nbsp;</P
5954
5955  </TT
5956 ></P
5957 ><P
5958 > Some examples using our <SPAN
5959 CLASS="QUOTE"
5960 >"shop"</SPAN
5961 > and <SPAN
5962 CLASS="QUOTE"
5963 >"fragile"</SPAN
5964 >
5965  aliases from above. These would appear in the lower sections of an 
5966  actions file as exceptions to the default actions (as defined in the 
5967  upper section):</P
5968 ><P
5969 > <TT
5970 CLASS="LITERAL"
5971 >  <P
5972 CLASS="LITERALLAYOUT"
5973 >&nbsp;#&nbsp;These&nbsp;sites&nbsp;are&nbsp;very&nbsp;complex&nbsp;and&nbsp;require<br>
5974 &nbsp;#&nbsp;minimal&nbsp;interference.<br>
5975 &nbsp;{fragile}<br>
5976 &nbsp;&nbsp;.office.microsoft.com<br>
5977 &nbsp;&nbsp;.windowsupdate.microsoft.com<br>
5978 &nbsp;&nbsp;.nytimes.com<br>
5979 <br>
5980 &nbsp;#&nbsp;Shopping&nbsp;sites&nbsp;-&nbsp;but&nbsp;we&nbsp;still&nbsp;want&nbsp;to&nbsp;block&nbsp;ads.<br>
5981 &nbsp;{shop}<br>
5982 &nbsp;&nbsp;.quietpc.com<br>
5983 &nbsp;&nbsp;.worldpay.com&nbsp;&nbsp;&nbsp;#&nbsp;for&nbsp;quietpc.com<br>
5984 &nbsp;&nbsp;.scan.co.uk<br>
5985 <br>
5986 &nbsp;#&nbsp;These&nbsp;shops&nbsp;require&nbsp;pop-ups&nbsp;also&nbsp;<br>
5987 &nbsp;{shop&nbsp;-kill-popups}<br>
5988 &nbsp;&nbsp;.dabs.com<br>
5989 &nbsp;&nbsp;.overclockers.co.uk<br>
5990 &nbsp;&nbsp;&nbsp;</P
5991
5992  </TT
5993 ></P
5994 ><P
5995 > The <SPAN
5996 CLASS="QUOTE"
5997 >"shop"</SPAN
5998 > and <SPAN
5999 CLASS="QUOTE"
6000 >"fragile"</SPAN
6001 > aliases are often used for 
6002  <SPAN
6003 CLASS="QUOTE"
6004 >"problem"</SPAN
6005 > sites that require most actions to be disabled 
6006  in order to function properly.&#13;</P
6007 ></DIV
6008 ></DIV
6009 ><DIV
6010 CLASS="SECT2"
6011 ><H2
6012 CLASS="SECT2"
6013 ><A
6014 NAME="FILTER-FILE"
6015 >7.5. The Filter File</A
6016 ></H2
6017 ><P
6018 > Any web page can be dynamically modified with the filter file. This
6019  modification can be removal, or re-writing, of any web page content,
6020  including tags and non-visible content. The default filter file is
6021  <TT
6022 CLASS="FILENAME"
6023 >default.filter</TT
6024 >, located in the config directory. </P
6025 ><P
6026 > This is potentially a very powerful feature, and requires knowledge of both 
6027  <SPAN
6028 CLASS="QUOTE"
6029 >"regular expression"</SPAN
6030 > and HTML in order create custom 
6031  filters. But, there are a number of useful filters included with 
6032  <SPAN
6033 CLASS="APPLICATION"
6034 >Privoxy</SPAN
6035 > for many common situations.</P
6036 ><P
6037 > The included example file is divided into sections. Each section begins 
6038  with the <TT
6039 CLASS="LITERAL"
6040 >FILTER</TT
6041 > keyword, followed by the identifier 
6042  for that section, e.g. <SPAN
6043 CLASS="QUOTE"
6044 >"FILTER: webbugs"</SPAN
6045 >. Each section performs
6046  a similar type of filtering, such as <SPAN
6047 CLASS="QUOTE"
6048 >"html-annoyances"</SPAN
6049 >.</P
6050 ><P
6051 > This file uses regular expressions to alter or remove any string in the
6052  target page. The expressions can only operate on one line at a time. Some
6053  examples from the included default <TT
6054 CLASS="FILENAME"
6055 >default.filter</TT
6056 >:</P
6057 ><P
6058 > Stop web pages from displaying annoying messages in the status bar by
6059  deleting such references:</P
6060 ><P
6061 > <TT
6062 CLASS="LITERAL"
6063 >  <P
6064 CLASS="LITERALLAYOUT"
6065 >&nbsp;FILTER:&nbsp;html-annoyances<br>
6066 <br>
6067 &nbsp;#&nbsp;New&nbsp;browser&nbsp;windows&nbsp;should&nbsp;be&nbsp;resizeable&nbsp;and&nbsp;have&nbsp;a&nbsp;location&nbsp;and&nbsp;status<br>
6068 &nbsp;#&nbsp;bar.&nbsp;Make&nbsp;it&nbsp;so.<br>
6069 &nbsp;#<br>
6070 &nbsp;s/resizable="?(no|0)"?/resizable=1/ig&nbsp;s/noresize/yesresize/ig<br>
6071 &nbsp;s/location="?(no|0)"?/location=1/ig&nbsp;s/status="?(no|0)"?/status=1/ig<br>
6072 &nbsp;s/scrolling="?(no|0|Auto)"?/scrolling=1/ig<br>
6073 &nbsp;s/menubar="?(no|0)"?/menubar=1/ig&nbsp;<br>
6074 <br>
6075 &nbsp;#&nbsp;The&nbsp;&#60;BLINK&#62;&nbsp;tag&nbsp;was&nbsp;a&nbsp;crime!<br>
6076 &nbsp;#<br>
6077 &nbsp;s*&#60;blink&#62;|&#60;/blink&#62;**ig<br>
6078 <br>
6079 &nbsp;#&nbsp;Is&nbsp;this&nbsp;evil?&nbsp;<br>
6080 &nbsp;#<br>
6081 &nbsp;#s/framespacing="?(no|0)"?//ig<br>
6082 &nbsp;#s/margin(height|width)=[0-9]*//gi<br>
6083 &nbsp;&nbsp;&nbsp;</P
6084
6085  </TT
6086 ></P
6087 ><P
6088 > Just for kicks, replace any occurrence of <SPAN
6089 CLASS="QUOTE"
6090 >"Microsoft"</SPAN
6091 > with
6092  <SPAN
6093 CLASS="QUOTE"
6094 >"MicroSuck"</SPAN
6095 >, and have a little fun with topical buzzwords: </P
6096 ><P
6097 > <TT
6098 CLASS="LITERAL"
6099 >  <P
6100 CLASS="LITERALLAYOUT"
6101 >&nbsp;FILTER:&nbsp;fun<br>
6102 <br>
6103 &nbsp;s/microsoft(?!.com)/MicroSuck/ig<br>
6104 <br>
6105 &nbsp;#&nbsp;Buzzword&nbsp;Bingo:<br>
6106 &nbsp;#<br>
6107 &nbsp;s/industry-leading|cutting-edge|award-winning/&#60;font&nbsp;color=red&#62;&#60;b&#62;BINGO!&#60;/b&#62;&#60;/font&#62;/ig<br>
6108 &nbsp;&nbsp;&nbsp;</P
6109
6110  </TT
6111 ></P
6112 ><P
6113 > Kill those pesky little web-bugs:</P
6114 ><P
6115 > <TT
6116 CLASS="LITERAL"
6117 >  <P
6118 CLASS="LITERALLAYOUT"
6119 >&nbsp;#&nbsp;webbugs:&nbsp;Squish&nbsp;WebBugs&nbsp;(1x1&nbsp;invisible&nbsp;GIFs&nbsp;used&nbsp;for&nbsp;user&nbsp;tracking)<br>
6120 &nbsp;FILTER:&nbsp;webbugs<br>
6121 <br>
6122 &nbsp;s/&#60;img\s+[^&#62;]*?(width|height)\s*=\s*['"]?1\D[^&#62;]*?(width|height)\s*=\s*['"]?1(\D[^&#62;]*?)?&#62;/&#60;!--&nbsp;Squished&nbsp;WebBug&nbsp;--&#62;/sig<br>
6123 &nbsp;&nbsp;&nbsp;</P
6124
6125  </TT
6126 ></P
6127 ></DIV
6128 ><DIV
6129 CLASS="SECT2"
6130 ><H2
6131 CLASS="SECT2"
6132 ><A
6133 NAME="AEN2273"
6134 >7.6. Templates</A
6135 ></H2
6136 ><P
6137 > When <SPAN
6138 CLASS="APPLICATION"
6139 >Privoxy</SPAN
6140 > displays one of its internal 
6141  pages, such as a 404 Not Found error page, it uses the appropriate template.
6142  On Linux, BSD, and Unix, these are located in
6143  <TT
6144 CLASS="FILENAME"
6145 >/etc/privoxy/templates</TT
6146 > by default. These may be
6147  customized, if desired. <TT
6148 CLASS="FILENAME"
6149 >cgi-style.css</TT
6150 > is 
6151  used to control the HTML attributes (fonts, etc).</P
6152 ><P
6153 > The default <SPAN
6154 CLASS="QUOTE"
6155 >"Blocked"</SPAN
6156 > banner page with the bright red top 
6157  banner, is called just <SPAN
6158 CLASS="QUOTE"
6159 >"<TT
6160 CLASS="FILENAME"
6161 >blocked</TT
6162 >"</SPAN
6163 >. This 
6164  may be customized or replaced with something else if desired.&#13;</P
6165 ></DIV
6166 ></DIV
6167 ><DIV
6168 CLASS="NAVFOOTER"
6169 ><HR
6170 ALIGN="LEFT"
6171 WIDTH="100%"><TABLE
6172 WIDTH="100%"
6173 BORDER="0"
6174 CELLPADDING="0"
6175 CELLSPACING="0"
6176 ><TR
6177 ><TD
6178 WIDTH="33%"
6179 ALIGN="left"
6180 VALIGN="top"
6181 ><A
6182 HREF="startup.html"
6183 >Prev</A
6184 ></TD
6185 ><TD
6186 WIDTH="34%"
6187 ALIGN="center"
6188 VALIGN="top"
6189 ><A
6190 HREF="index.html"
6191 >Home</A
6192 ></TD
6193 ><TD
6194 WIDTH="33%"
6195 ALIGN="right"
6196 VALIGN="top"
6197 ><A
6198 HREF="contact.html"
6199 >Next</A
6200 ></TD
6201 ></TR
6202 ><TR
6203 ><TD
6204 WIDTH="33%"
6205 ALIGN="left"
6206 VALIGN="top"
6207 >Starting <SPAN
6208 CLASS="APPLICATION"
6209 >Privoxy</SPAN
6210 ></TD
6211 ><TD
6212 WIDTH="34%"
6213 ALIGN="center"
6214 VALIGN="top"
6215 >&nbsp;</TD
6216 ><TD
6217 WIDTH="33%"
6218 ALIGN="right"
6219 VALIGN="top"
6220 >Contacting the Developers, Bug Reporting and Feature
6221 Requests</TD
6222 ></TR
6223 ></TABLE
6224 ></DIV
6225 ></BODY
6226 ></HTML
6227 >