f2d4c3bce9c4986c24db342f0651ab267fdace03
[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.60"><LINK
8 REL="HOME"
9 TITLE="Privoxy User Manual"
10 HREF="index.html"><LINK
11 REL="PREVIOUS"
12 TITLE="Quickstart to Using Privoxy"
13 HREF="quickstart.html"><LINK
14 REL="NEXT"
15 TITLE="Contacting the Developers, Bug Reporting and Feature
16 Requests"
17 HREF="contact.html"><LINK
18 REL="STYLESHEET"
19 TYPE="text/css"
20 HREF="../p_doc.css"></HEAD
21 ><BODY
22 CLASS="SECT1"
23 BGCOLOR="#EEEEEE"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >Privoxy User Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="quickstart.html"
48 >Prev</A
49 ></TD
50 ><TD
51 WIDTH="80%"
52 ALIGN="center"
53 VALIGN="bottom"
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="right"
58 VALIGN="bottom"
59 ><A
60 HREF="contact.html"
61 >Next</A
62 ></TD
63 ></TR
64 ></TABLE
65 ><HR
66 ALIGN="LEFT"
67 WIDTH="100%"></DIV
68 ><DIV
69 CLASS="SECT1"
70 ><H1
71 CLASS="SECT1"
72 ><A
73 NAME="CONFIGURATION"
74 >5. <SPAN
75 CLASS="APPLICATION"
76 >Privoxy</SPAN
77 > Configuration</A
78 ></H1
79 ><P
80 >  All <SPAN
81 CLASS="APPLICATION"
82 >Privoxy</SPAN
83 > configuration is stored  
84   in text files. These files can be edited with a text editor.
85   Many important aspects of <SPAN
86 CLASS="APPLICATION"
87 >Privoxy</SPAN
88 > can 
89   also be controlled easily with a web browser.
90
91  </P
92 ><DIV
93 CLASS="SECT2"
94 ><H2
95 CLASS="SECT2"
96 ><A
97 NAME="AEN275"
98 >5.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 > can be reached by the special 
108  URL <A
109 HREF="http://p.p/"
110 TARGET="_top"
111 >http://p.p/</A
112 > (or alternately
113  <A
114 HREF="http://config.privoxy.org/"
115 TARGET="_top"
116 >http://config.privoxy.org/</A
117 >), 
118  which is an internal page. You will see the following section:&#13;</P
119 ><P
120 > <TABLE
121 BORDER="0"
122 BGCOLOR="#E0E0E0"
123 WIDTH="100%"
124 ><TR
125 ><TD
126 ><PRE
127 CLASS="SCREEN"
128 >&#13;Please choose from the following options:
129
130     * Show information about the current configuration
131     * Show the source code version numbers
132     * Show the client's request headers.
133     * Show which actions apply to a URL and why
134     * Toggle Privoxy on or off
135     * Edit the actions list
136
137  </PRE
138 ></TD
139 ></TR
140 ></TABLE
141 ></P
142 ><P
143 > This should be self-explanatory. Note the last item is an editor for the
144  <SPAN
145 CLASS="QUOTE"
146 >"actions list"</SPAN
147 >, which is where much of the ad, banner, cookie,
148  and URL blocking magic is configured as well as other advanced features of
149  <SPAN
150 CLASS="APPLICATION"
151 >Privoxy</SPAN
152 >. This is an easy way to adjust various
153  aspects of <SPAN
154 CLASS="APPLICATION"
155 >Privoxy</SPAN
156 > configuration. The actions
157  file, and other configuration files, are explained in detail below. 
158  <SPAN
159 CLASS="APPLICATION"
160 >Privoxy</SPAN
161 > will automatically detect any changes 
162  to these files.</P
163 ><P
164 > <SPAN
165 CLASS="QUOTE"
166 >"Toggle Privoxy On or Off"</SPAN
167 > is handy for sites that might 
168  have problems with your current actions and filters, or just to test if 
169  a site misbehaves, whether it is <SPAN
170 CLASS="APPLICATION"
171 >Privoxy</SPAN
172
173  causing the problem or not. <SPAN
174 CLASS="APPLICATION"
175 >Privoxy</SPAN
176 > continues 
177  to run as a proxy in this case, but all filtering is disabled.&#13;</P
178 ></DIV
179 ><DIV
180 CLASS="SECT2"
181 ><H2
182 CLASS="SECT2"
183 ><A
184 NAME="AEN293"
185 >5.2. Configuration Files Overview</A
186 ></H2
187 ><P
188 > For Unix, *BSD and Linux, all configuration files are located in
189  <TT
190 CLASS="FILENAME"
191 >/etc/privoxy/</TT
192 > by default. For MS Windows, OS/2, and
193  AmigaOS these are all in the same directory as the 
194  <SPAN
195 CLASS="APPLICATION"
196 >Privoxy</SPAN
197 > executable.  The name
198  and number of configuration files has changed from previous versions, and is
199  subject to change as development progresses.</P
200 ><P
201 > The installed defaults provide a reasonable starting point, though possibly
202  aggressive by some standards. For the time being, there are only three
203  default configuration files (this may change in time):</P
204 ><P
205 > <P
206 ></P
207 ><UL
208 ><LI
209 ><P
210 >     The main configuration file is named <TT
211 CLASS="FILENAME"
212 >config</TT
213 >
214      on Linux, Unix, BSD, OS/2, and AmigaOS and <TT
215 CLASS="FILENAME"
216 >config.txt</TT
217 >
218      on Windows.
219    </P
220 ></LI
221 ><LI
222 ><P
223 >    The <TT
224 CLASS="FILENAME"
225 >default.action</TT
226 > file is used  to define various 
227     <SPAN
228 CLASS="QUOTE"
229 >"actions"</SPAN
230 > relating to images, banners, pop-ups, access
231     restrictions, banners and cookies. There is a CGI based editor for this
232     file that can be accessed via <A
233 HREF="http://p.p"
234 TARGET="_top"
235 >http://p.p</A
236 >. (Other actions 
237     files are included as well with differing levels of filtering 
238     and blocking, e.g. <TT
239 CLASS="FILENAME"
240 >basic.action</TT
241 >.)
242    </P
243 ></LI
244 ><LI
245 ><P
246 >    The <TT
247 CLASS="FILENAME"
248 >default.filter</TT
249 > file can be used to re-write the raw
250     page content, including viewable text as well as embedded HTML and JavaScript,
251     and whatever else lurks on any given web page.
252    </P
253 ></LI
254 ></UL
255 ></P
256 ><P
257 > <TT
258 CLASS="FILENAME"
259 >default.action</TT
260 > and <TT
261 CLASS="FILENAME"
262 >default.filter</TT
263
264  can use Perl style regular expressions for maximum flexibility. All files use
265  the <SPAN
266 CLASS="QUOTE"
267 >"<TT
268 CLASS="LITERAL"
269 >#</TT
270 >"</SPAN
271 > character to denote a comment. Such
272  lines are not processed by <SPAN
273 CLASS="APPLICATION"
274 >Privoxy</SPAN
275 >. After
276  making any changes, there is no need to restart
277  <SPAN
278 CLASS="APPLICATION"
279 >Privoxy</SPAN
280 > in order for the changes to take
281  effect. <SPAN
282 CLASS="APPLICATION"
283 >Privoxy</SPAN
284 > should detect such changes 
285  automatically.</P
286 ><P
287 > While under development, the configuration content is subject to change. 
288  The below documentation may not be accurate by the time you read this. 
289  Also, what constitutes a <SPAN
290 CLASS="QUOTE"
291 >"default"</SPAN
292 > setting, may change, so 
293  please check all your configuration files on important issues.</P
294 ></DIV
295 ><DIV
296 CLASS="SECT2"
297 ><H2
298 CLASS="SECT2"
299 ><A
300 NAME="AEN324"
301 >5.3. The Main Configuration File</A
302 ></H2
303 ><P
304 > Again, the main configuration file is named <TT
305 CLASS="FILENAME"
306 >config</TT
307 > on
308  Linux/Unix/BSD and OS/2, and <TT
309 CLASS="FILENAME"
310 >config.txt</TT
311 > on Windows.
312  Configuration lines consist of an initial keyword followed by a list of
313  values, all separated by whitespace (any number of spaces or tabs). For
314  example:</P
315 ><P
316 > <TT
317 CLASS="LITERAL"
318 >  <P
319 CLASS="LITERALLAYOUT"
320 >&nbsp;&nbsp;<I
321 CLASS="EMPHASIS"
322 >blockfile blocklist.ini</I
323 ><br>
324 &nbsp;&nbsp;&nbsp;</P
325
326  </TT
327 ></P
328 ><P
329 > Indicates that the blockfile is named <SPAN
330 CLASS="QUOTE"
331 >"blocklist.ini"</SPAN
332 >. (A 
333  default installation does not use this.)</P
334 ><P
335 > A <SPAN
336 CLASS="QUOTE"
337 >"<TT
338 CLASS="LITERAL"
339 >#</TT
340 >"</SPAN
341 > indicates a comment.  Any part of a
342  line following a <SPAN
343 CLASS="QUOTE"
344 >"<TT
345 CLASS="LITERAL"
346 >#</TT
347 >"</SPAN
348 > is ignored, except if
349  the <SPAN
350 CLASS="QUOTE"
351 >"<TT
352 CLASS="LITERAL"
353 >#</TT
354 >"</SPAN
355 > is preceded by a
356  <SPAN
357 CLASS="QUOTE"
358 >"<TT
359 CLASS="LITERAL"
360 >\</TT
361 >"</SPAN
362 >.</P
363 ><P
364 > Thus, by placing a <SPAN
365 CLASS="QUOTE"
366 >"<TT
367 CLASS="LITERAL"
368 >#</TT
369 >"</SPAN
370 > at the start of an
371  existing configuration line, you can make it a comment and it will be treated
372  as if it weren't there. This is called <SPAN
373 CLASS="QUOTE"
374 >"commenting out"</SPAN
375 > an
376  option and can be useful to turn off features: If you comment out the
377  <SPAN
378 CLASS="QUOTE"
379 >"logfile"</SPAN
380 > line, <SPAN
381 CLASS="APPLICATION"
382 >Privoxy</SPAN
383 > will not
384  log to a file at all. Watch for the <SPAN
385 CLASS="QUOTE"
386 >"default:"</SPAN
387 > section in each
388  explanation to see what happens if the option is left unset (or commented
389  out). </P
390 ><P
391 > Long lines can be continued on the next line by using a
392  <SPAN
393 CLASS="QUOTE"
394 >"<TT
395 CLASS="LITERAL"
396 >\</TT
397 >"</SPAN
398 > as the very last character.</P
399 ><P
400 > There are various aspects of <SPAN
401 CLASS="APPLICATION"
402 >Privoxy</SPAN
403 > behavior 
404  that can be tuned.</P
405 ><DIV
406 CLASS="SECT3"
407 ><H3
408 CLASS="SECT3"
409 ><A
410 NAME="AEN357"
411 >5.3.1. Defining Other Configuration Files</A
412 ></H3
413 ><P
414 > <SPAN
415 CLASS="APPLICATION"
416 >Privoxy</SPAN
417 > can use a number of other files to tell it
418  what ads to block, what cookies to accept, and perform other functions.  This
419  section of the configuration file tells <SPAN
420 CLASS="APPLICATION"
421 >Privoxy</SPAN
422 >
423  where to find all those other files. </P
424 ><P
425 > On <SPAN
426 CLASS="APPLICATION"
427 >Windows</SPAN
428 > and <SPAN
429 CLASS="APPLICATION"
430 >AmigaOS</SPAN
431 >,
432  <SPAN
433 CLASS="APPLICATION"
434 >Privoxy</SPAN
435 > looks for these files in the same
436  directory as the executable.  On Unix and  OS/2,
437  <SPAN
438 CLASS="APPLICATION"
439 >Privoxy</SPAN
440 > looks for these files in the current
441  working directory. In either case, an absolute path name can be used to
442  avoid problems.</P
443 ><P
444 > When development goes modular and multi-user, the blocker, filter, and
445  per-user config will be stored in subdirectories of <SPAN
446 CLASS="QUOTE"
447 >"confdir"</SPAN
448 >.
449  For now, only <TT
450 CLASS="FILENAME"
451 >confdir/templates</TT
452 > is used for storing HTML
453  templates for CGI results. </P
454 ><P
455 > The location of the configuration files:</P
456 ><P
457 > <TT
458 CLASS="LITERAL"
459 >  <P
460 CLASS="LITERALLAYOUT"
461 >&nbsp;&nbsp;<I
462 CLASS="EMPHASIS"
463 >confdir  /etc/privoxy</I
464 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;No&nbsp;trailing&nbsp;/,&nbsp;please.<br>
465 &nbsp;&nbsp;&nbsp;</P
466
467  </TT
468 ></P
469 ><P
470 > The directory where all logging (i.e. <TT
471 CLASS="FILENAME"
472 >logfile</TT
473 > and 
474  <TT
475 CLASS="FILENAME"
476 >jarfile</TT
477 >) takes place. No trailing
478  <SPAN
479 CLASS="QUOTE"
480 >"<TT
481 CLASS="LITERAL"
482 >/</TT
483 >"</SPAN
484 >, please: </P
485 ><P
486 > <TT
487 CLASS="LITERAL"
488 >  <P
489 CLASS="LITERALLAYOUT"
490 >&nbsp;&nbsp;<I
491 CLASS="EMPHASIS"
492 >logdir  /var/log/privoxy</I
493 ><br>
494 &nbsp;&nbsp;&nbsp;</P
495
496  </TT
497 ></P
498 ><P
499 > Note that all file specifications below are relative to 
500  the above two directories!</P
501 ><P
502 > The <SPAN
503 CLASS="QUOTE"
504 >"default.action"</SPAN
505 > file contains patterns to specify the
506  actions to apply to requests for each site. Default: Cookies to and from all
507  destinations are kept only during the current browser session (i.e. they are
508  not saved to disk). Pop-ups are disabled for all sites. All sites are
509  filtered through selected sections of <SPAN
510 CLASS="QUOTE"
511 >"default.filter"</SPAN
512 >. No sites
513  are blocked. <SPAN
514 CLASS="APPLICATION"
515 >Privoxy</SPAN
516 > displays a checkboard type
517  pattern for filtered ads and other images. The syntax of this file is
518  explained in detail <A
519 HREF="configuration.html#ACTIONSFILE"
520 >below</A
521 >. Other
522  <SPAN
523 CLASS="QUOTE"
524 >"actions"</SPAN
525 > files are included, and you are free to use any of
526  them. They have varying degrees of aggressiveness.</P
527 ><P
528 > <TT
529 CLASS="LITERAL"
530 >  <P
531 CLASS="LITERALLAYOUT"
532 >&nbsp;&nbsp;<I
533 CLASS="EMPHASIS"
534 >actionsfile  default.action</I
535 ><br>
536 &nbsp;&nbsp;&nbsp;</P
537
538  </TT
539 ></P
540 ><P
541 > The <SPAN
542 CLASS="QUOTE"
543 >"default.filter"</SPAN
544 > file contains content modification rules 
545  that use <SPAN
546 CLASS="QUOTE"
547 >"regular expressions"</SPAN
548 >. These rules permit powerful
549  changes on the content of Web pages, e.g., you could disable your favorite
550  JavaScript annoyances, re-write the actual displayed text, or just have some
551  fun replacing <SPAN
552 CLASS="QUOTE"
553 >"Microsoft"</SPAN
554 > with <SPAN
555 CLASS="QUOTE"
556 >"MicroSuck"</SPAN
557 > wherever
558  it appears on a Web page. Default: whatever the developers are playing with
559  :-/</P
560 ><P
561 > Filtering requires buffering the page content, which may appear to slow down
562  page rendering since nothing is displayed until all content has passed 
563  the filters. (It does not really take longer, but seems that way since 
564  the page is not incrementally displayed.) This effect will be more noticeable
565  on slower connections.&#13;</P
566 ><P
567 > <TT
568 CLASS="LITERAL"
569 >  <P
570 CLASS="LITERALLAYOUT"
571 >&nbsp;&nbsp;<I
572 CLASS="EMPHASIS"
573 >filterfile  default.filter</I
574 ><br>
575 &nbsp;&nbsp;&nbsp;</P
576
577  </TT
578 ></P
579 ><P
580 > The logfile is where all logging and error messages are written. The logfile
581  can be useful for tracking down a problem with
582  <SPAN
583 CLASS="APPLICATION"
584 >Privoxy</SPAN
585 > (e.g., it's not blocking an ad you
586  think it should block) but in most cases you probably will never look at it.</P
587 ><P
588 > Your logfile will grow indefinitely, and you will probably want to
589  periodically remove it.  On Unix systems, you can do this with a cron job
590  (see <SPAN
591 CLASS="QUOTE"
592 >"man cron"</SPAN
593 >). For Redhat, a <B
594 CLASS="COMMAND"
595 >logrotate</B
596
597  script has been included.</P
598 ><P
599 > On SuSE Linux systems, you can place a line like <SPAN
600 CLASS="QUOTE"
601 >"/var/log/privoxy.*
602  +1024k 644 nobody.nogroup"</SPAN
603 > in <TT
604 CLASS="FILENAME"
605 >/etc/logfiles</TT
606 >, with
607  the effect that cron.daily will automatically archive, gzip, and empty the
608  log, when it exceeds 1M size.</P
609 ><P
610 > Default: Log to the a file named <TT
611 CLASS="FILENAME"
612 >logfile</TT
613 >. 
614  Comment out to disable logging.</P
615 ><P
616 > <TT
617 CLASS="LITERAL"
618 >  <P
619 CLASS="LITERALLAYOUT"
620 >&nbsp;&nbsp;<I
621 CLASS="EMPHASIS"
622 >logfile  logfile</I
623 ><br>
624 &nbsp;&nbsp;&nbsp;</P
625
626  </TT
627 ></P
628 ><P
629 > The <SPAN
630 CLASS="QUOTE"
631 >"jarfile"</SPAN
632 > defines where
633  <SPAN
634 CLASS="APPLICATION"
635 >Privoxy</SPAN
636 > stores the cookies it intercepts.  Note
637  that if you use a <SPAN
638 CLASS="QUOTE"
639 >"jarfile"</SPAN
640 >, it may grow quite large. Default:
641  Don't store intercepted cookies.</P
642 ><P
643 > <TT
644 CLASS="LITERAL"
645 >  <P
646 CLASS="LITERALLAYOUT"
647 >&nbsp;&nbsp;<I
648 CLASS="EMPHASIS"
649 >#jarfile  jarfile</I
650 ><br>
651 &nbsp;&nbsp;&nbsp;</P
652
653  </TT
654 ></P
655 ><P
656 > If you specify a <SPAN
657 CLASS="QUOTE"
658 >"trustfile"</SPAN
659 >,
660  <SPAN
661 CLASS="APPLICATION"
662 >Privoxy</SPAN
663 > will only allow access to sites that
664  are named in the trustfile. You can also mark sites as trusted referrers,
665  with the effect that access to untrusted sites will be granted, if a link
666  from a trusted referrer was used. The link target will then be added to the
667  <SPAN
668 CLASS="QUOTE"
669 >"trustfile"</SPAN
670 >. This is a very restrictive feature that typical
671  users most probably want to leave disabled. Default: Disabled, don't use the
672  trust mechanism.</P
673 ><P
674 > <TT
675 CLASS="LITERAL"
676 >  <P
677 CLASS="LITERALLAYOUT"
678 >&nbsp;&nbsp;<I
679 CLASS="EMPHASIS"
680 >#trustfile  trust</I
681 ><br>
682 &nbsp;&nbsp;&nbsp;</P
683
684  </TT
685 ></P
686 ><P
687 > If you use the trust mechanism, it is a good idea to write up some on-line
688  documentation about your blocking policy and to specify the URL(s) here. They
689  will appear on the page that your users receive when they try to access
690  untrusted content. Use multiple times for multiple URLs. Default: Don't
691  display links on the <SPAN
692 CLASS="QUOTE"
693 >"untrusted"</SPAN
694 > info page.</P
695 ><P
696 > <TT
697 CLASS="LITERAL"
698 >  <P
699 CLASS="LITERALLAYOUT"
700 >&nbsp;&nbsp;<I
701 CLASS="EMPHASIS"
702 >trust-info-url http://www.example.com/why_we_block.html</I
703 ><br>
704 &nbsp;&nbsp;<I
705 CLASS="EMPHASIS"
706 >trust-info-url http://www.example.com/what_we_allow.html</I
707 ><br>
708 &nbsp;&nbsp;&nbsp;</P
709
710  </TT
711 ></P
712 ></DIV
713 ><DIV
714 CLASS="SECT3"
715 ><H3
716 CLASS="SECT3"
717 ><A
718 NAME="AEN450"
719 >5.3.2. Other Configuration Options</A
720 ></H3
721 ><P
722 > This part of the configuration file contains options that control how
723  <SPAN
724 CLASS="APPLICATION"
725 >Privoxy</SPAN
726 > operates.</P
727 ><P
728 > <SPAN
729 CLASS="QUOTE"
730 >"Admin-address"</SPAN
731 > should be set to the email address of the proxy
732  administrator. It is used in many of the proxy-generated pages. Default:
733  fill@me.in.please.</P
734 ><P
735 > <TT
736 CLASS="LITERAL"
737 >  <P
738 CLASS="LITERALLAYOUT"
739 >&nbsp;&nbsp;<I
740 CLASS="EMPHASIS"
741 >#admin-address  fill@me.in.please</I
742 ><br>
743 &nbsp;&nbsp;&nbsp;</P
744
745  </TT
746 ></P
747 ><P
748 > <SPAN
749 CLASS="QUOTE"
750 >"Proxy-info-url"</SPAN
751 > can be set to a URL that contains more info
752  about this <SPAN
753 CLASS="APPLICATION"
754 >Privoxy</SPAN
755 > installation, it's
756  configuration and policies. It is used in many of the proxy-generated pages
757  and its use is highly recommended in multi-user installations, since your
758  users will want to know why certain content is blocked or modified. Default:
759  Don't show a link to on-line documentation.</P
760 ><P
761 > <TT
762 CLASS="LITERAL"
763 >  <P
764 CLASS="LITERALLAYOUT"
765 >&nbsp;&nbsp;<I
766 CLASS="EMPHASIS"
767 >proxy-info-url  http://www.example.com/proxy.html</I
768 ><br>
769 &nbsp;&nbsp;&nbsp;</P
770
771  </TT
772 ></P
773 ><P
774 > <SPAN
775 CLASS="QUOTE"
776 >"Listen-address"</SPAN
777 > specifies the address and port where
778  <SPAN
779 CLASS="APPLICATION"
780 >Privoxy</SPAN
781 > will listen for connections from your
782  Web browser.  The default is to listen on the localhost port 8118, and
783  this is suitable for most users.  (In your web browser, under proxy
784  configuration, list the proxy server as <SPAN
785 CLASS="QUOTE"
786 >"localhost"</SPAN
787 > and the
788  port as <SPAN
789 CLASS="QUOTE"
790 >"8118"</SPAN
791 >).</P
792 ><P
793 > If you already have another service running on port 8118, or if you want to
794  serve requests from other machines (e.g. on your local network) as well, you
795  will need to override the default. The syntax is 
796  <SPAN
797 CLASS="QUOTE"
798 >"listen-address [&#60;ip-address&#62;]:&#60;port&#62;"</SPAN
799 >. If you leave
800  out the IP address, <SPAN
801 CLASS="APPLICATION"
802 >Privoxy</SPAN
803 > will bind to all
804  interfaces (addresses) on your machine and may become reachable from the
805  Internet. In that case, consider using access control lists (acl's) (see
806  <SPAN
807 CLASS="QUOTE"
808 >"aclfile"</SPAN
809 > above), or a firewall.</P
810 ><P
811 > For example, suppose you are running <SPAN
812 CLASS="APPLICATION"
813 >Privoxy</SPAN
814 > on
815  a machine which has the address 192.168.0.1 on your local private network
816  (192.168.0.0) and has another outside connection with a different address.
817  You want it to serve requests from inside only:</P
818 ><P
819 > <TT
820 CLASS="LITERAL"
821 >  <P
822 CLASS="LITERALLAYOUT"
823 >&nbsp;&nbsp;<I
824 CLASS="EMPHASIS"
825 >listen-address  192.168.0.1:8118</I
826 ><br>
827 &nbsp;&nbsp;&nbsp;</P
828
829  </TT
830 ></P
831 ><P
832 > If you want it to listen on all addresses (including the outside
833  connection):</P
834 ><P
835 > <TT
836 CLASS="LITERAL"
837 >  <P
838 CLASS="LITERALLAYOUT"
839 >&nbsp;&nbsp;<I
840 CLASS="EMPHASIS"
841 >listen-address  :8118</I
842 ><br>
843 &nbsp;&nbsp;&nbsp;</P
844
845  </TT
846 ></P
847 ><P
848 > If you do this, consider using ACLs (see <SPAN
849 CLASS="QUOTE"
850 >"aclfile"</SPAN
851 > above). Note:
852  you will need to point your browser(s) to the address and port that you have
853  configured here. Default: localhost:8118 (127.0.0.1:8118).</P
854 ><P
855 > The debug option sets the level of debugging information to log in the
856  logfile (and to the console in the Windows version).  A debug level of 1 is
857  informative because it will show you each request as it happens.  Higher
858  levels of debug are probably only of interest to developers.</P
859 ><P
860 > <TT
861 CLASS="LITERAL"
862 >  <P
863 CLASS="LITERALLAYOUT"
864 >&nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;#&nbsp;GPC&nbsp;&nbsp;&nbsp;=&nbsp;show&nbsp;each&nbsp;GET/POST/CONNECT&nbsp;request<br>
865 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;#&nbsp;CONN&nbsp;&nbsp;=&nbsp;show&nbsp;each&nbsp;connection&nbsp;status<br>
866 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;#&nbsp;IO&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;show&nbsp;I/O&nbsp;status<br>
867 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8&nbsp;#&nbsp;HDR&nbsp;&nbsp;&nbsp;=&nbsp;show&nbsp;header&nbsp;parsing<br>
868 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;16&nbsp;#&nbsp;LOG&nbsp;&nbsp;&nbsp;=&nbsp;log&nbsp;all&nbsp;data&nbsp;into&nbsp;the&nbsp;logfile<br>
869 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;32&nbsp;#&nbsp;FRC&nbsp;&nbsp;&nbsp;=&nbsp;debug&nbsp;force&nbsp;feature<br>
870 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;64&nbsp;#&nbsp;REF&nbsp;&nbsp;&nbsp;=&nbsp;debug&nbsp;regular&nbsp;expression&nbsp;filter&nbsp;<br>
871 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;128&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;debug&nbsp;fast&nbsp;redirects<br>
872 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;256&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;debug&nbsp;GIF&nbsp;de-animation<br>
873 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;512&nbsp;#&nbsp;CLF&nbsp;&nbsp;&nbsp;=&nbsp;Common&nbsp;Log&nbsp;Format<br>
874 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1024&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;debug&nbsp;kill&nbsp;pop-ups<br>
875 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4096&nbsp;#&nbsp;INFO&nbsp;&nbsp;=&nbsp;Startup&nbsp;banner&nbsp;and&nbsp;warnings.<br>
876 &nbsp;&nbsp;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8192&nbsp;#&nbsp;ERROR&nbsp;=&nbsp;Non-fatal&nbsp;errors<br>
877 &nbsp;&nbsp;&nbsp;&nbsp;</P
878 >
879  </TT
880 ></P
881 ><P
882 > It is <I
883 CLASS="EMPHASIS"
884 >highly recommended</I
885 > that you enable ERROR
886  reporting (debug 8192), at least until v3.0 is released.</P
887 ><P
888 > The reporting of FATAL errors (i.e. ones which crash 
889  <SPAN
890 CLASS="APPLICATION"
891 >Privoxy</SPAN
892 >) is always on and cannot be disabled.</P
893 ><P
894 > If you want to use CLF (Common Log Format), you should set <SPAN
895 CLASS="QUOTE"
896 >"debug
897  512"</SPAN
898 > ONLY, do not enable anything else.</P
899 ><P
900 > Multiple <SPAN
901 CLASS="QUOTE"
902 >"debug"</SPAN
903 > directives, are OK - they're logical-OR'd
904  together. </P
905 ><P
906 > <TT
907 CLASS="LITERAL"
908 >  <P
909 CLASS="LITERALLAYOUT"
910 >&nbsp;&nbsp;<I
911 CLASS="EMPHASIS"
912 >debug    15     # same as setting the first 4 listed above</I
913 ><br>
914 &nbsp;&nbsp;&nbsp;</P
915
916  </TT
917 ></P
918 ><P
919 > Default:</P
920 ><P
921 > <TT
922 CLASS="LITERAL"
923 >  <P
924 CLASS="LITERALLAYOUT"
925 >&nbsp;&nbsp;<I
926 CLASS="EMPHASIS"
927 >debug   1     # URLs</I
928 ><br>
929 &nbsp;&nbsp;<I
930 CLASS="EMPHASIS"
931 >debug   4096  # Info</I
932 ><br>
933 &nbsp;&nbsp;<I
934 CLASS="EMPHASIS"
935 >debug   8192  # Errors - *we highly recommended enabling this*</I
936 ><br>
937 &nbsp;&nbsp;&nbsp;</P
938
939  </TT
940 ></P
941 ><P
942 > <SPAN
943 CLASS="APPLICATION"
944 >Privoxy</SPAN
945 > normally uses
946  <SPAN
947 CLASS="QUOTE"
948 >"multi-threading"</SPAN
949 >, a software technique that permits it to
950  handle many different requests simultaneously. In some cases you may wish to
951  disable this -- particularly if you're trying to debug a problem.  The
952  <SPAN
953 CLASS="QUOTE"
954 >"single-threaded"</SPAN
955 > option forces
956  <SPAN
957 CLASS="APPLICATION"
958 >Privoxy</SPAN
959 > to handle requests sequentially.
960  Default: Multi-threaded mode.</P
961 ><P
962 > <TT
963 CLASS="LITERAL"
964 >  <P
965 CLASS="LITERALLAYOUT"
966 >&nbsp;&nbsp;<I
967 CLASS="EMPHASIS"
968 >#single-threaded</I
969 ><br>
970 &nbsp;&nbsp;&nbsp;</P
971
972  </TT
973 ></P
974 ><P
975 > <SPAN
976 CLASS="QUOTE"
977 >"toggle"</SPAN
978 > allows you to temporarily disable all
979  <SPAN
980 CLASS="APPLICATION"
981 >Privoxy's</SPAN
982 >  filtering. Just set <SPAN
983 CLASS="QUOTE"
984 >"toggle
985  0"</SPAN
986 >.</P
987 ><P
988 > The Windows version of <SPAN
989 CLASS="APPLICATION"
990 >Privoxy</SPAN
991 > puts an icon in
992  the system tray, which also allows you to change this option.  If you
993  right-click on that icon (or select the <SPAN
994 CLASS="QUOTE"
995 >"Options"</SPAN
996 > menu), one
997  choice is <SPAN
998 CLASS="QUOTE"
999 >"Enable"</SPAN
1000 >. Clicking on enable toggles
1001  <SPAN
1002 CLASS="APPLICATION"
1003 >Privoxy</SPAN
1004 > on and off. This is useful if you want
1005  to temporarily disable <SPAN
1006 CLASS="APPLICATION"
1007 >Privoxy</SPAN
1008 >, e.g., to access
1009  a site that requires cookies which you would otherwise have blocked. This can also
1010  be toggled via a web browser at the <SPAN
1011 CLASS="APPLICATION"
1012 >Privoxy</SPAN
1013 >
1014  internal address of <A
1015 HREF="http://p.p"
1016 TARGET="_top"
1017 >http://p.p</A
1018 > on 
1019  any platform.</P
1020 ><P
1021 > <SPAN
1022 CLASS="QUOTE"
1023 >"toggle 1"</SPAN
1024 > means <SPAN
1025 CLASS="APPLICATION"
1026 >Privoxy</SPAN
1027 > runs
1028  normally, <SPAN
1029 CLASS="QUOTE"
1030 >"toggle 0"</SPAN
1031 > means that
1032  <SPAN
1033 CLASS="APPLICATION"
1034 >Privoxy</SPAN
1035 > becomes a non-anonymizing non-blocking
1036  proxy. Default: 1 (on). </P
1037 ><P
1038 > <TT
1039 CLASS="LITERAL"
1040 >  <P
1041 CLASS="LITERALLAYOUT"
1042 >&nbsp;&nbsp;<I
1043 CLASS="EMPHASIS"
1044 >toggle    1</I
1045 ><br>
1046 &nbsp;&nbsp;&nbsp;</P
1047
1048  </TT
1049 ></P
1050 ><P
1051 > For content filtering, i.e. the <SPAN
1052 CLASS="QUOTE"
1053 >"+filter"</SPAN
1054 > and
1055  <SPAN
1056 CLASS="QUOTE"
1057 >"+deanimate-gif"</SPAN
1058 > actions, it is necessary that 
1059  <SPAN
1060 CLASS="APPLICATION"
1061 >Privoxy</SPAN
1062 > buffers the entire document body.
1063  This can be potentially dangerous, since a server could just keep sending
1064  data indefinitely and wait for your RAM to exhaust. With nasty consequences.</P
1065 ><P
1066 > The <SPAN
1067 CLASS="APPLICATION"
1068 >buffer-limit</SPAN
1069 > option lets you set the maximum
1070  size in Kbytes that each buffer may use. When the documents buffer exceeds
1071  this size, it is flushed to the client unfiltered and no further attempt to
1072  filter the rest of it is made. Remember that there may multiple threads
1073  running, which might require increasing the <SPAN
1074 CLASS="QUOTE"
1075 >"buffer-limit"</SPAN
1076 >
1077  Kbytes <I
1078 CLASS="EMPHASIS"
1079 >each</I
1080 >, unless you have enabled 
1081  <SPAN
1082 CLASS="QUOTE"
1083 >"single-threaded"</SPAN
1084 > above.</P
1085 ><P
1086 > <TT
1087 CLASS="LITERAL"
1088 >  <P
1089 CLASS="LITERALLAYOUT"
1090 >&nbsp;&nbsp;<I
1091 CLASS="EMPHASIS"
1092 >buffer-limit    4069</I
1093 ><br>
1094 &nbsp;&nbsp;&nbsp;</P
1095
1096  </TT
1097 ></P
1098 ><P
1099 > To enable the web-based <TT
1100 CLASS="FILENAME"
1101 >default.action</TT
1102 > file editor set
1103  <SPAN
1104 CLASS="APPLICATION"
1105 >enable-edit-actions</SPAN
1106 > to 1, or 0 to disable.  Note
1107  that you must have compiled <SPAN
1108 CLASS="APPLICATION"
1109 >Privoxy</SPAN
1110 > with
1111  support for this feature, otherwise this option has no effect. This 
1112  internal page can be reached at <A
1113 HREF="http://p.p"
1114 TARGET="_top"
1115 >http://p.p</A
1116 >.
1117  </P
1118 ><P
1119 > Security note: If this is enabled, anyone who can use the proxy
1120  can edit the actions file, and their changes will affect all users.
1121  For shared proxies, you probably want to disable this. Default: enabled.</P
1122 ><P
1123 > <TT
1124 CLASS="LITERAL"
1125 >  <P
1126 CLASS="LITERALLAYOUT"
1127 >&nbsp;&nbsp;<I
1128 CLASS="EMPHASIS"
1129 >enable-edit-actions    1</I
1130 ><br>
1131 &nbsp;&nbsp;&nbsp;</P
1132
1133  </TT
1134 ></P
1135 ><P
1136 > Allow <SPAN
1137 CLASS="APPLICATION"
1138 >Privoxy</SPAN
1139 > to be toggled on and off
1140  remotely, using your web browser.  Set <SPAN
1141 CLASS="QUOTE"
1142 >"enable-remote-toggle"</SPAN
1143 >to
1144  1 to enable, and 0 to disable.  Note that you must have compiled 
1145  <SPAN
1146 CLASS="APPLICATION"
1147 >Privoxy</SPAN
1148 > with support for this feature,
1149  otherwise this option has no effect.</P
1150 ><P
1151 > Security note:  If this is enabled, anyone who can use the proxy can toggle
1152  it on or off (see <A
1153 HREF="http://p.p"
1154 TARGET="_top"
1155 >http://p.p</A
1156 >), and
1157  their changes will affect all users. For shared proxies, you probably want to
1158  disable this. Default: enabled.</P
1159 ><P
1160 > <TT
1161 CLASS="LITERAL"
1162 >  <P
1163 CLASS="LITERALLAYOUT"
1164 >&nbsp;&nbsp;<I
1165 CLASS="EMPHASIS"
1166 >enable-remote-toggle    1</I
1167 ><br>
1168 &nbsp;&nbsp;&nbsp;</P
1169
1170  </TT
1171 ></P
1172 ></DIV
1173 ><DIV
1174 CLASS="SECT3"
1175 ><H3
1176 CLASS="SECT3"
1177 ><A
1178 NAME="AEN587"
1179 >5.3.3. Access Control List (ACL)</A
1180 ></H3
1181 ><P
1182 > Access controls are included at the request of some ISPs and systems
1183  administrators, and are not usually needed by individual users. Please note
1184  the warnings in the FAQ that this proxy is not intended to be a substitute
1185  for a firewall or to encourage anyone to defer addressing basic security
1186  weaknesses.</P
1187 ><P
1188 > If no access settings are specified, the proxy talks to anyone that
1189  connects. If any access settings file are specified, then the proxy
1190  talks only to IP addresses permitted somewhere in this file and not
1191  denied later in this file.</P
1192 ><P
1193 > Summary -- if using an ACL:</P
1194 ><P
1195 ></P
1196 ><TABLE
1197 BORDER="0"
1198 ><TBODY
1199 ><TR
1200 ><TD
1201 >   Client must have permission to receive service.
1202   </TD
1203 ></TR
1204 ></TBODY
1205 ></TABLE
1206 ><P
1207 ></P
1208 ><P
1209 ></P
1210 ><TABLE
1211 BORDER="0"
1212 ><TBODY
1213 ><TR
1214 ><TD
1215 >   LAST match in ACL wins.
1216   </TD
1217 ></TR
1218 ></TBODY
1219 ></TABLE
1220 ><P
1221 ></P
1222 ><P
1223 ></P
1224 ><TABLE
1225 BORDER="0"
1226 ><TBODY
1227 ><TR
1228 ><TD
1229 >   Default behavior is to deny service.
1230   </TD
1231 ></TR
1232 ></TBODY
1233 ></TABLE
1234 ><P
1235 ></P
1236 ><P
1237 > The syntax for an entry in the Access Control List is:</P
1238 ><P
1239 > <TT
1240 CLASS="LITERAL"
1241 >  <P
1242 CLASS="LITERALLAYOUT"
1243 >&nbsp;&nbsp;ACTION&nbsp;&nbsp;&nbsp;&nbsp;SRC_ADDR[/SRC_MASKLEN]&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;DST_ADDR[/DST_MASKLEN]&nbsp;]<br>
1244 &nbsp;&nbsp;&nbsp;</P
1245
1246  </TT
1247 ></P
1248 ><P
1249 > Where the individual fields are:</P
1250 ><P
1251 > <TT
1252 CLASS="LITERAL"
1253 >  <P
1254 CLASS="LITERALLAYOUT"
1255 >&nbsp;<I
1256 CLASS="EMPHASIS"
1257 >ACTION</I
1258 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<SPAN
1259 CLASS="QUOTE"
1260 >"permit-access"</SPAN
1261 >&nbsp;or&nbsp;<SPAN
1262 CLASS="QUOTE"
1263 >"deny-access"</SPAN
1264 ><br>
1265 <br>
1266 &nbsp;<I
1267 CLASS="EMPHASIS"
1268 >SRC_ADDR</I
1269 >&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;client&nbsp;hostname&nbsp;or&nbsp;dotted&nbsp;IP&nbsp;address<br>
1270 &nbsp;<I
1271 CLASS="EMPHASIS"
1272 >SRC_MASKLEN</I
1273 >&nbsp;=&nbsp;number&nbsp;of&nbsp;bits&nbsp;in&nbsp;the&nbsp;subnet&nbsp;mask&nbsp;for&nbsp;the&nbsp;source<br>
1274 <br>
1275 &nbsp;<I
1276 CLASS="EMPHASIS"
1277 >DST_ADDR</I
1278 >&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;server&nbsp;or&nbsp;forwarder&nbsp;hostname&nbsp;or&nbsp;dotted&nbsp;IP&nbsp;address<br>
1279 &nbsp;<I
1280 CLASS="EMPHASIS"
1281 >DST_MASKLEN</I
1282 >&nbsp;=&nbsp;number&nbsp;of&nbsp;bits&nbsp;in&nbsp;the&nbsp;subnet&nbsp;mask&nbsp;for&nbsp;the&nbsp;target<br>
1283 &nbsp;&nbsp;&nbsp;</P
1284
1285  </TT
1286 ></P
1287 ><P
1288
1289  The field separator (FS) is whitespace (space or tab).</P
1290 ><P
1291 > IMPORTANT NOTE: If <SPAN
1292 CLASS="APPLICATION"
1293 >Privoxy</SPAN
1294 > is using a
1295  forwarder (see below) or a gateway for a particular destination URL, the
1296  <TT
1297 CLASS="LITERAL"
1298 >DST_ADDR</TT
1299 > that is examined is the address of the forwarder
1300  or the gateway and <I
1301 CLASS="EMPHASIS"
1302 >NOT</I
1303 > the address of the ultimate
1304  target. This is necessary because it may be impossible for the local
1305  <SPAN
1306 CLASS="APPLICATION"
1307 >Privoxy</SPAN
1308 > to determine the address of the
1309  ultimate target (that's often what gateways are used for).</P
1310 ><P
1311 > Here are a few examples to show how the ACL features work:</P
1312 ><P
1313 > <SPAN
1314 CLASS="QUOTE"
1315 >"localhost"</SPAN
1316 > is OK -- no DST_ADDR implies that
1317  <I
1318 CLASS="EMPHASIS"
1319 >ALL</I
1320 > destination addresses are OK:</P
1321 ><P
1322 > <TT
1323 CLASS="LITERAL"
1324 >  <P
1325 CLASS="LITERALLAYOUT"
1326 >&nbsp;&nbsp;<I
1327 CLASS="EMPHASIS"
1328 >permit-access  localhost</I
1329 ><br>
1330 &nbsp;&nbsp;&nbsp;</P
1331
1332  </TT
1333 ></P
1334 ><P
1335 > A silly example to illustrate permitting any host on the class-C subnet with
1336  <SPAN
1337 CLASS="APPLICATION"
1338 >Privoxy</SPAN
1339 > to go anywhere:</P
1340 ><P
1341 > <TT
1342 CLASS="LITERAL"
1343 >  <P
1344 CLASS="LITERALLAYOUT"
1345 >&nbsp;&nbsp;<I
1346 CLASS="EMPHASIS"
1347 >permit-access    www.privoxy.com/24</I
1348 ><br>
1349 &nbsp;&nbsp;&nbsp;</P
1350
1351  </TT
1352 ></P
1353 ><P
1354 > Except deny one particular IP address from using it at all:</P
1355 ><P
1356 > <TT
1357 CLASS="LITERAL"
1358 >  <P
1359 CLASS="LITERALLAYOUT"
1360 >&nbsp;&nbsp;<I
1361 CLASS="EMPHASIS"
1362 >deny-access      ident.privoxy.com</I
1363 ><br>
1364 &nbsp;&nbsp;&nbsp;</P
1365
1366  </TT
1367 ></P
1368 ><P
1369 > You can also specify an explicit network address and subnet mask.
1370  Explicit addresses do not have to be resolved to be used.</P
1371 ><P
1372 > <TT
1373 CLASS="LITERAL"
1374 >  <P
1375 CLASS="LITERALLAYOUT"
1376 >&nbsp;&nbsp;<I
1377 CLASS="EMPHASIS"
1378 >permit-access    207.153.200.0/24</I
1379 ><br>
1380 &nbsp;&nbsp;&nbsp;</P
1381
1382  </TT
1383 ></P
1384 ><P
1385 > A subnet mask of 0 matches anything, so the next line permits everyone.</P
1386 ><P
1387 > <TT
1388 CLASS="LITERAL"
1389 >  <P
1390 CLASS="LITERALLAYOUT"
1391 >&nbsp;&nbsp;<I
1392 CLASS="EMPHASIS"
1393 >permit-access    0.0.0.0/0</I
1394 ><br>
1395 &nbsp;&nbsp;&nbsp;</P
1396
1397  </TT
1398 ></P
1399 ><P
1400 > Note, you <I
1401 CLASS="EMPHASIS"
1402 >cannot</I
1403 > say:</P
1404 ><P
1405 > <TT
1406 CLASS="LITERAL"
1407 >  <P
1408 CLASS="LITERALLAYOUT"
1409 >&nbsp;&nbsp;<I
1410 CLASS="EMPHASIS"
1411 >permit-access    .org</I
1412 ><br>
1413 &nbsp;&nbsp;&nbsp;</P
1414
1415  </TT
1416 ></P
1417 ><P
1418 > to allow all *.org domains. Every IP address listed must resolve fully.</P
1419 ><P
1420 > An ISP may want to provide a <SPAN
1421 CLASS="APPLICATION"
1422 >Privoxy</SPAN
1423 > that is
1424  accessible by <SPAN
1425 CLASS="QUOTE"
1426 >"the world"</SPAN
1427 > and yet restrict use of some of their
1428  private content to hosts on its internal network (i.e. its own subscribers).
1429  Say, for instance the ISP owns the Class-B IP address block 123.124.0.0 (a 16
1430  bit netmask). This is how they could do it:</P
1431 ><P
1432 > <TT
1433 CLASS="LITERAL"
1434 >  <P
1435 CLASS="LITERALLAYOUT"
1436 >&nbsp;<I
1437 CLASS="EMPHASIS"
1438 >permit-access 0.0.0.0/0   0.0.0.0/0</I
1439 >&nbsp;&nbsp;&nbsp;#&nbsp;other&nbsp;clients&nbsp;can&nbsp;go&nbsp;anywhere&nbsp;<br>
1440 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;with&nbsp;the&nbsp;following&nbsp;exceptions:<br>
1441 &nbsp;<br>
1442 &nbsp;<I
1443 CLASS="EMPHASIS"
1444 >deny-access</I
1445 >&nbsp;&nbsp;&nbsp;0.0.0.0/0&nbsp;&nbsp;&nbsp;123.124.0.0/16&nbsp;#&nbsp;block&nbsp;all&nbsp;external&nbsp;requests&nbsp;for<br>
1446 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;sites&nbsp;on&nbsp;the&nbsp;ISP's&nbsp;network<br>
1447 <br>
1448 &nbsp;<I
1449 CLASS="EMPHASIS"
1450 >permit 0.0.0.0/0   www.my_isp.com</I
1451 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;except&nbsp;for&nbsp;the&nbsp;ISP's&nbsp;main&nbsp;<br>
1452 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;web&nbsp;site<br>
1453 <br>
1454 &nbsp;<I
1455 CLASS="EMPHASIS"
1456 >permit 123.124.0.0/16 0.0.0.0/0</I
1457 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;the&nbsp;ISP's&nbsp;clients&nbsp;can&nbsp;go&nbsp;<br>
1458 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;anywhere<br>
1459 &nbsp;&nbsp;&nbsp;</P
1460
1461  </TT
1462 ></P
1463 ><P
1464 > Note that if some hostnames are listed with multiple IP addresses, 
1465  the primary value returned by DNS (via gethostbyname()) is used. Default:
1466  Anyone can access the proxy.</P
1467 ></DIV
1468 ><DIV
1469 CLASS="SECT3"
1470 ><H3
1471 CLASS="SECT3"
1472 ><A
1473 NAME="FORWARDING"
1474 >5.3.4. Forwarding</A
1475 ></H3
1476 ><P
1477 > This feature allows chaining of HTTP requests via multiple proxies.
1478  It can be used to better protect privacy and confidentiality when
1479  accessing specific domains by routing requests to those domains
1480  to a special purpose filtering proxy such as lpwa.com. Or to use 
1481  a caching proxy to speed up browsing.</P
1482 ><P
1483 > It can also be used in an environment with multiple networks to route
1484  requests via multiple gateways allowing transparent access to multiple
1485  networks without having to modify browser configurations.</P
1486 ><P
1487 > Also specified here are SOCKS proxies. <SPAN
1488 CLASS="APPLICATION"
1489 >Privoxy</SPAN
1490 >
1491  SOCKS 4 and SOCKS 4A. The difference is that SOCKS 4A will resolve the target
1492  hostname using DNS on the SOCKS server, not our local DNS client.</P
1493 ><P
1494 > The syntax of each line is:</P
1495 ><P
1496 > <TT
1497 CLASS="LITERAL"
1498 >  <P
1499 CLASS="LITERALLAYOUT"
1500 >&nbsp;<I
1501 CLASS="EMPHASIS"
1502 >forward target_domain[:port] http_proxy_host[:port]</I
1503 ><br>
1504 &nbsp;<I
1505 CLASS="EMPHASIS"
1506 >forward-socks4  target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</I
1507 ><br>
1508 &nbsp;<I
1509 CLASS="EMPHASIS"
1510 >forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</I
1511 ><br>
1512 &nbsp;&nbsp;&nbsp;</P
1513
1514  </TT
1515 ></P
1516 ><P
1517 > If http_proxy_host is <SPAN
1518 CLASS="QUOTE"
1519 >"."</SPAN
1520 >, then requests are not forwarded to a
1521  HTTP proxy but are made directly to the web servers.</P
1522 ><P
1523 > Lines are checked in sequence, and the last match wins.</P
1524 ><P
1525 > There is an implicit line equivalent to the following, which specifies that
1526  anything not finding a match on the list is to go out without forwarding
1527  or gateway protocol, like so:</P
1528 ><P
1529 > <TT
1530 CLASS="LITERAL"
1531 >  <P
1532 CLASS="LITERALLAYOUT"
1533 >&nbsp;&nbsp;<I
1534 CLASS="EMPHASIS"
1535 >forward   .*   .       </I
1536 >#&nbsp;implicit<br>
1537 &nbsp;&nbsp;&nbsp;</P
1538
1539  </TT
1540 ></P
1541 ><P
1542 > In the following common configuration, everything goes to Lucent's LPWA,
1543  except SSL on port 443 (which it doesn't handle):</P
1544 ><P
1545 > <TT
1546 CLASS="LITERAL"
1547 >  <P
1548 CLASS="LITERALLAYOUT"
1549 >&nbsp;<I
1550 CLASS="EMPHASIS"
1551 >forward   .*     lpwa.com:8000</I
1552 ><br>
1553 &nbsp;<I
1554 CLASS="EMPHASIS"
1555 >forward   :443   .</I
1556 ><br>
1557 &nbsp;&nbsp;&nbsp;</P
1558
1559  </TT
1560 ></P
1561 ><P
1562
1563  Some users have reported difficulties related to LPWA's use of
1564  <SPAN
1565 CLASS="QUOTE"
1566 >"."</SPAN
1567 > as the last element of the domain, and have said that this
1568  can be fixed with this:</P
1569 ><P
1570 > <TT
1571 CLASS="LITERAL"
1572 >  <P
1573 CLASS="LITERALLAYOUT"
1574 >&nbsp;&nbsp;<I
1575 CLASS="EMPHASIS"
1576 >forward   lpwa.  lpwa.com:8000</I
1577 ><br>
1578 &nbsp;&nbsp;&nbsp;</P
1579
1580  </TT
1581 ></P
1582 ><P
1583 > (NOTE: the syntax for specifying target_domain has changed since the
1584  previous paragraph was written -- it will not work now.  More information
1585  is welcome.)</P
1586 ><P
1587 > In this fictitious example, everything goes via an ISP's caching proxy,
1588  except requests to that ISP:</P
1589 ><P
1590 > <TT
1591 CLASS="LITERAL"
1592 >  <P
1593 CLASS="LITERALLAYOUT"
1594 >&nbsp;<I
1595 CLASS="EMPHASIS"
1596 >forward    .*         caching.myisp.net:8000</I
1597 ><br>
1598 &nbsp;<I
1599 CLASS="EMPHASIS"
1600 >forward    myisp.net  .</I
1601 ><br>
1602 &nbsp;&nbsp;&nbsp;</P
1603
1604  </TT
1605 ></P
1606 ><P
1607 > For the @home network, we're told the forwarding configuration is this:</P
1608 ><P
1609 > <TT
1610 CLASS="LITERAL"
1611 >  <P
1612 CLASS="LITERALLAYOUT"
1613 >&nbsp;&nbsp;<I
1614 CLASS="EMPHASIS"
1615 >forward    .*    proxy:8080</I
1616 ><br>
1617 &nbsp;&nbsp;&nbsp;</P
1618
1619  </TT
1620 ></P
1621 ><P
1622 > Also, we're told they insist on getting cookies and JavaScript, so you should 
1623  allow cookies from home.com. We consider JavaScript a potential security risk.
1624  Java need not be enabled.</P
1625 ><P
1626 > In this example direct connections are made to all <SPAN
1627 CLASS="QUOTE"
1628 >"internal"</SPAN
1629 >
1630  domains, but everything else goes through Lucent's LPWA by way of the
1631  company's SOCKS gateway to the Internet.</P
1632 ><P
1633 > <TT
1634 CLASS="LITERAL"
1635 >  <P
1636 CLASS="LITERALLAYOUT"
1637 >&nbsp;<I
1638 CLASS="EMPHASIS"
1639 >forward-socks4  .*  lpwa.com:8000  firewall.my_company.com:1080</I
1640 ><br>
1641 &nbsp;<I
1642 CLASS="EMPHASIS"
1643 >forward    my_company.com  .</I
1644 ><br>
1645 &nbsp;&nbsp;&nbsp;</P
1646
1647  </TT
1648 ></P
1649 ><P
1650 > This is how you could set up a site that always uses SOCKS but no forwarders:</P
1651 ><P
1652 > <TT
1653 CLASS="LITERAL"
1654 >  <P
1655 CLASS="LITERALLAYOUT"
1656 >&nbsp;&nbsp;<I
1657 CLASS="EMPHASIS"
1658 >forward-socks4a   .*  .  firewall.my_company.com:1080</I
1659 ><br>
1660 &nbsp;&nbsp;&nbsp;</P
1661
1662  </TT
1663 ></P
1664 ><P
1665 > An advanced example for network administrators:</P
1666 ><P
1667 > If you have links to multiple ISPs that provide various special content to
1668  their subscribers, you can configure forwarding to pass requests to the
1669  specific host that's connected to that ISP so that everybody can see all
1670  of the content on all of the ISPs.</P
1671 ><P
1672 > This is a bit tricky, but here's an example:</P
1673 ><P
1674 > host-a has a PPP connection to isp-a.com. And host-b has a PPP connection to
1675  isp-b.com. host-a can run a <SPAN
1676 CLASS="APPLICATION"
1677 >Privoxy</SPAN
1678 > proxy with
1679  forwarding like this: </P
1680 ><P
1681 > <TT
1682 CLASS="LITERAL"
1683 >  <P
1684 CLASS="LITERALLAYOUT"
1685 >&nbsp;<I
1686 CLASS="EMPHASIS"
1687 >forward    .*         .</I
1688 ><br>
1689 &nbsp;<I
1690 CLASS="EMPHASIS"
1691 >forward    isp-b.com  host-b:8118</I
1692 ><br>
1693 &nbsp;&nbsp;&nbsp;</P
1694
1695  </TT
1696 ></P
1697 ><P
1698 > host-b can run a <SPAN
1699 CLASS="APPLICATION"
1700 >Privoxy</SPAN
1701 > proxy with forwarding
1702  like this: </P
1703 ><P
1704 > <TT
1705 CLASS="LITERAL"
1706 >  <P
1707 CLASS="LITERALLAYOUT"
1708 >&nbsp;<I
1709 CLASS="EMPHASIS"
1710 >forward    .*          .</I
1711 ><br>
1712 &nbsp;<I
1713 CLASS="EMPHASIS"
1714 >forward    isp-a.com   host-a:8118</I
1715 ><br>
1716 &nbsp;&nbsp;&nbsp;</P
1717
1718  </TT
1719 ></P
1720 ><P
1721 > Now, <I
1722 CLASS="EMPHASIS"
1723 >anyone</I
1724 > on the Internet (including users on host-a
1725  and host-b) can set their browser's proxy to <I
1726 CLASS="EMPHASIS"
1727 >either</I
1728 >
1729  host-a or host-b and be able to browse the content on isp-a or isp-b.</P
1730 ><P
1731 > Here's another practical example, for University of Kent at
1732  Canterbury students with a network connection in their room, who
1733  need to use the University's Squid web cache.</P
1734 ><P
1735 > <TT
1736 CLASS="LITERAL"
1737 >  <P
1738 CLASS="LITERALLAYOUT"
1739 >&nbsp;<I
1740 CLASS="EMPHASIS"
1741 >forward  *. ssbcache.ukc.ac.uk:3128</I
1742 >&nbsp;&nbsp;#&nbsp;Use&nbsp;the&nbsp;proxy,&nbsp;except&nbsp;for:<br>
1743 &nbsp;<I
1744 CLASS="EMPHASIS"
1745 >forward  .ukc.ac.uk            .    </I
1746 >&nbsp;#&nbsp;Anything&nbsp;on&nbsp;the&nbsp;same&nbsp;domain&nbsp;as&nbsp;us<br>
1747 &nbsp;<I
1748 CLASS="EMPHASIS"
1749 >forward  *                     .    </I
1750 >&nbsp;#&nbsp;Host&nbsp;with&nbsp;no&nbsp;domain&nbsp;specified<br>
1751 &nbsp;<I
1752 CLASS="EMPHASIS"
1753 >forward  129.12.*.*            .    </I
1754 >&nbsp;#&nbsp;A&nbsp;dotted&nbsp;IP&nbsp;on&nbsp;our&nbsp;/16&nbsp;network.<br>
1755 &nbsp;<I
1756 CLASS="EMPHASIS"
1757 >forward  127.*.*.*             .    </I
1758 >&nbsp;#&nbsp;Loopback&nbsp;address<br>
1759 &nbsp;<I
1760 CLASS="EMPHASIS"
1761 >forward  localhost.localdomain .    </I
1762 >&nbsp;#&nbsp;Loopback&nbsp;address<br>
1763 &nbsp;<I
1764 CLASS="EMPHASIS"
1765 >forward  www.ukc.mirror.ac.uk  .    </I
1766 >&nbsp;#&nbsp;Specific&nbsp;host<br>
1767 &nbsp;&nbsp;&nbsp;</P
1768
1769  </TT
1770 ></P
1771 ><P
1772 > If you intend to chain <SPAN
1773 CLASS="APPLICATION"
1774 >Privoxy</SPAN
1775 > and 
1776  <SPAN
1777 CLASS="APPLICATION"
1778 >squid</SPAN
1779 > locally, then chain as 
1780  <TT
1781 CLASS="LITERAL"
1782 >browser -&#62; squid -&#62; privoxy</TT
1783 > is the recommended way. </P
1784 ><P
1785 >Your squid configuration could then look like this (assuming that the IP
1786 address of the box is <TT
1787 CLASS="LITERAL"
1788 >192.168.0.1</TT
1789 > ):</P
1790 ><P
1791 > <TT
1792 CLASS="LITERAL"
1793 >  <P
1794 CLASS="LITERALLAYOUT"
1795 >&nbsp;&nbsp;#&nbsp;Define&nbsp;Privoxy&nbsp;as&nbsp;parent&nbsp;cache&nbsp;<br>
1796 &nbsp;&nbsp;<br>
1797 &nbsp;&nbsp;cache_peer&nbsp;192.168.0.1&nbsp;parent&nbsp;8118&nbsp;0&nbsp;no-query<br>
1798 <br>
1799 &nbsp;&nbsp;#&nbsp;don't&nbsp;listen&nbsp;to&nbsp;the&nbsp;whole&nbsp;world<br>
1800 &nbsp;&nbsp;http_port&nbsp;192.168.0.1:3128<br>
1801 <br>
1802 &nbsp;&nbsp;#&nbsp;define&nbsp;the&nbsp;local&nbsp;lan<br>
1803 &nbsp;&nbsp;acl&nbsp;mylocallan&nbsp;src&nbsp;192.168.0.1-192.168.0.5/255.255.255.255<br>
1804 <br>
1805 &nbsp;&nbsp;#&nbsp;grant&nbsp;access&nbsp;for&nbsp;http&nbsp;to&nbsp;local&nbsp;lan<br>
1806 &nbsp;&nbsp;http_access&nbsp;allow&nbsp;mylocallan<br>
1807 &nbsp;&nbsp;<br>
1808 &nbsp;&nbsp;#&nbsp;Define&nbsp;ACL&nbsp;for&nbsp;protocol&nbsp;FTP&nbsp;<br>
1809 &nbsp;&nbsp;acl&nbsp;FTP&nbsp;proto&nbsp;FTP&nbsp;<br>
1810 <br>
1811 &nbsp;&nbsp;#&nbsp;Do&nbsp;not&nbsp;forward&nbsp;ACL&nbsp;FTP&nbsp;to&nbsp;privoxy<br>
1812 &nbsp;&nbsp;always_direct&nbsp;allow&nbsp;FTP&nbsp;<br>
1813 <br>
1814 &nbsp;&nbsp;#&nbsp;Do&nbsp;not&nbsp;forward&nbsp;ACL&nbsp;CONNECT&nbsp;(https)&nbsp;to&nbsp;privoxy<br>
1815 &nbsp;&nbsp;always_direct&nbsp;allow&nbsp;CONNECT&nbsp;<br>
1816 <br>
1817 &nbsp;&nbsp;#&nbsp;Forward&nbsp;the&nbsp;rest&nbsp;to&nbsp;privoxy<br>
1818 &nbsp;&nbsp;never_direct&nbsp;allow&nbsp;all&nbsp;<br>
1819 &nbsp;&nbsp;&nbsp;</P
1820
1821  </TT
1822 ></P
1823 ></DIV
1824 ><DIV
1825 CLASS="SECT3"
1826 ><H3
1827 CLASS="SECT3"
1828 ><A
1829 NAME="AEN785"
1830 >5.3.5. Windows GUI Options</A
1831 ></H3
1832 ><P
1833 > <SPAN
1834 CLASS="APPLICATION"
1835 >Privoxy</SPAN
1836 > has a number of options specific to the
1837  Windows GUI interface:</P
1838 ><P
1839 > If <SPAN
1840 CLASS="QUOTE"
1841 >"activity-animation"</SPAN
1842 > is set to 1, the
1843  <SPAN
1844 CLASS="APPLICATION"
1845 >Privoxy</SPAN
1846 > icon will animate when
1847  <SPAN
1848 CLASS="QUOTE"
1849 >"Privoxy"</SPAN
1850 > is active. To turn off, set to 0.</P
1851 ><P
1852 > <TT
1853 CLASS="LITERAL"
1854 >  <P
1855 CLASS="LITERALLAYOUT"
1856 >&nbsp;&nbsp;<I
1857 CLASS="EMPHASIS"
1858 >activity-animation   1</I
1859 ><br>
1860 &nbsp;&nbsp;&nbsp;</P
1861
1862  </TT
1863 ></P
1864 ><P
1865 > If <SPAN
1866 CLASS="QUOTE"
1867 >"log-messages"</SPAN
1868 > is set to 1,
1869  <SPAN
1870 CLASS="APPLICATION"
1871 >Privoxy</SPAN
1872 > will log messages to the console
1873  window:</P
1874 ><P
1875 > <TT
1876 CLASS="LITERAL"
1877 >  <P
1878 CLASS="LITERALLAYOUT"
1879 >&nbsp;&nbsp;<I
1880 CLASS="EMPHASIS"
1881 >log-messages       1</I
1882 ><br>
1883 &nbsp;&nbsp;&nbsp;</P
1884
1885  </TT
1886 ></P
1887 ><P
1888
1889  If <SPAN
1890 CLASS="QUOTE"
1891 >"log-buffer-size"</SPAN
1892 > is set to 1, the size of the log buffer,
1893  i.e. the amount of memory used for the log messages displayed in the
1894  console window, will be limited to <SPAN
1895 CLASS="QUOTE"
1896 >"log-max-lines"</SPAN
1897 > (see below).</P
1898 ><P
1899 > Warning: Setting this to 0 will result in the buffer to grow infinitely and
1900  eat up all your memory!</P
1901 ><P
1902 > <TT
1903 CLASS="LITERAL"
1904 >  <P
1905 CLASS="LITERALLAYOUT"
1906 >&nbsp;&nbsp;<I
1907 CLASS="EMPHASIS"
1908 >log-buffer-size      1</I
1909 ><br>
1910 &nbsp;&nbsp;&nbsp;</P
1911
1912  </TT
1913 ></P
1914 ><P
1915 > <SPAN
1916 CLASS="APPLICATION"
1917 >log-max-lines</SPAN
1918 > is the maximum number of lines held
1919  in the log buffer. See above.</P
1920 ><P
1921 > <TT
1922 CLASS="LITERAL"
1923 >  <P
1924 CLASS="LITERALLAYOUT"
1925 >&nbsp;&nbsp;<I
1926 CLASS="EMPHASIS"
1927 >log-max-lines      200</I
1928 ><br>
1929 &nbsp;&nbsp;&nbsp;</P
1930
1931  </TT
1932 ></P
1933 ><P
1934 > If <SPAN
1935 CLASS="QUOTE"
1936 >"log-highlight-messages"</SPAN
1937 > is set to 1,
1938  <SPAN
1939 CLASS="APPLICATION"
1940 >Privoxy</SPAN
1941 > will highlight portions of the log
1942  messages with a bold-faced font:</P
1943 ><P
1944 > <TT
1945 CLASS="LITERAL"
1946 >  <P
1947 CLASS="LITERALLAYOUT"
1948 >&nbsp;&nbsp;<I
1949 CLASS="EMPHASIS"
1950 >log-highlight-messages   1</I
1951 ><br>
1952 &nbsp;&nbsp;&nbsp;</P
1953
1954  </TT
1955 ></P
1956 ><P
1957 > The font used in the console window:</P
1958 ><P
1959 > <TT
1960 CLASS="LITERAL"
1961 >  <P
1962 CLASS="LITERALLAYOUT"
1963 >&nbsp;&nbsp;<I
1964 CLASS="EMPHASIS"
1965 >log-font-name        Comic Sans MS</I
1966 ><br>
1967 &nbsp;&nbsp;&nbsp;</P
1968
1969  </TT
1970 ></P
1971 ><P
1972 > Font size used in the console window:</P
1973 ><P
1974 > <TT
1975 CLASS="LITERAL"
1976 >  <P
1977 CLASS="LITERALLAYOUT"
1978 >&nbsp;&nbsp;<I
1979 CLASS="EMPHASIS"
1980 >log-font-size        8</I
1981 ><br>
1982 &nbsp;&nbsp;&nbsp;</P
1983
1984  </TT
1985 ></P
1986 ><P
1987 >  
1988  <SPAN
1989 CLASS="QUOTE"
1990 >"show-on-task-bar"</SPAN
1991 > controls whether or not
1992  <SPAN
1993 CLASS="APPLICATION"
1994 >Privoxy</SPAN
1995 > will appear as a button on the Task bar
1996  when minimized:</P
1997 ><P
1998 > <TT
1999 CLASS="LITERAL"
2000 >  <P
2001 CLASS="LITERALLAYOUT"
2002 >&nbsp;&nbsp;<I
2003 CLASS="EMPHASIS"
2004 >show-on-task-bar     0</I
2005 ><br>
2006 &nbsp;&nbsp;&nbsp;</P
2007
2008  </TT
2009 ></P
2010 ><P
2011 > If <SPAN
2012 CLASS="QUOTE"
2013 >"close-button-minimizes"</SPAN
2014 > is set to 1, the Windows close
2015  button will minimize <SPAN
2016 CLASS="APPLICATION"
2017 >Privoxy</SPAN
2018 > instead of closing
2019  the program (close with the exit option on the File menu).</P
2020 ><P
2021 > <TT
2022 CLASS="LITERAL"
2023 >  <P
2024 CLASS="LITERALLAYOUT"
2025 >&nbsp;&nbsp;<I
2026 CLASS="EMPHASIS"
2027 >close-button-minimizes  1</I
2028 ><br>
2029 &nbsp;&nbsp;&nbsp;</P
2030
2031  </TT
2032 ></P
2033 ><P
2034 > The <SPAN
2035 CLASS="QUOTE"
2036 >"hide-console"</SPAN
2037 > option is specific to the MS-Win console
2038  version of <SPAN
2039 CLASS="APPLICATION"
2040 >Privoxy</SPAN
2041 >. If this option is used,
2042  <SPAN
2043 CLASS="APPLICATION"
2044 >Privoxy</SPAN
2045 > will disconnect from and hide  the
2046  command console.</P
2047 ><P
2048 > <TT
2049 CLASS="LITERAL"
2050 >  <P
2051 CLASS="LITERALLAYOUT"
2052 >&nbsp;&nbsp;#hide-console<br>
2053 &nbsp;&nbsp;&nbsp;</P
2054
2055  </TT
2056 ></P
2057 ></DIV
2058 ></DIV
2059 ><DIV
2060 CLASS="SECT2"
2061 ><H2
2062 CLASS="SECT2"
2063 ><A
2064 NAME="ACTIONSFILE"
2065 >5.4. The Actions File</A
2066 ></H2
2067 ><P
2068 > The <SPAN
2069 CLASS="QUOTE"
2070 >"default.action"</SPAN
2071 > file (formerly
2072  <TT
2073 CLASS="FILENAME"
2074 >actionsfile</TT
2075 > or <TT
2076 CLASS="FILENAME"
2077 >ijb.action</TT
2078 >) is used
2079  to define what actions <SPAN
2080 CLASS="APPLICATION"
2081 >Privoxy</SPAN
2082 > takes, and thus
2083  determines how ad images, cookies and various other aspects of HTTP content
2084  and transactions are handled. These can be accepted or rejected for all
2085  sites, or just those sites you choose. See below for a complete list of 
2086  actions. </P
2087 ><P
2088
2089  Anything you want can blocked, including ads, banners, or just some obnoxious
2090  URL that you would rather not see. Cookies can be accepted or rejected, or
2091  accepted only during the current browser session (i.e. not written to disk).
2092  Changes to <TT
2093 CLASS="FILENAME"
2094 >default.action</TT
2095 > should be immediately visible
2096  to <SPAN
2097 CLASS="APPLICATION"
2098 >Privoxy</SPAN
2099 > without the need to restart.</P
2100 ><P
2101 > Note that some sites may misbehave, or possibly not work at all with some 
2102  actions. This may require some tinkering with the rules to get the most 
2103  mileage of <SPAN
2104 CLASS="APPLICATION"
2105 >Privoxy's</SPAN
2106 > features, and still be 
2107  able to see and enjoy just what you want to. There is no general rule of
2108  thumb on these things. There just are too many variables, and sites are 
2109  always changing.&#13;</P
2110 ><P
2111 > The easiest way to edit the <SPAN
2112 CLASS="QUOTE"
2113 >"actions"</SPAN
2114 > file is with a browser by
2115  loading <A
2116 HREF="http://p.p/"
2117 TARGET="_top"
2118 >http://p.p/</A
2119 >, and then select
2120  <SPAN
2121 CLASS="QUOTE"
2122 >"Edit Actions List"</SPAN
2123 >. A text editor can also be used.</P
2124 ><P
2125 > To determine which actions apply to a request, the URL of the request is
2126  compared to all patterns in this file. Every time it matches, the list of
2127  applicable actions for the URL is incrementally updated. You can trace
2128  this process by visiting <A
2129 HREF="http://p.p/show-url-info"
2130 TARGET="_top"
2131 >http://p.p/show-url-info</A
2132 >. </P
2133 ><P
2134 > There are four types of lines in this file: comments (begin with a 
2135  <SPAN
2136 CLASS="QUOTE"
2137 >"#"</SPAN
2138 > character), actions, aliases and patterns, all of which are
2139  explained below, as well as the configuration file syntax that 
2140  <SPAN
2141 CLASS="APPLICATION"
2142 >Privoxy</SPAN
2143 > understands.&#13;</P
2144 ><DIV
2145 CLASS="SECT3"
2146 ><H3
2147 CLASS="SECT3"
2148 ><A
2149 NAME="AEN887"
2150 >5.4.1. URL Domain and Path Syntax</A
2151 ></H3
2152 ><P
2153 > Generally, a pattern has the form &#60;domain&#62;/&#60;path&#62;, where both the
2154  &#60;domain&#62; and &#60;path&#62; part are optional. If you only specify a
2155  domain part, the <SPAN
2156 CLASS="QUOTE"
2157 >"/"</SPAN
2158 > can be left out:</P
2159 ><P
2160 > <I
2161 CLASS="EMPHASIS"
2162 >www.example.com</I
2163 > - is a domain only pattern and will match any request to
2164  <SPAN
2165 CLASS="QUOTE"
2166 >"www.example.com"</SPAN
2167 >.</P
2168 ><P
2169 > <I
2170 CLASS="EMPHASIS"
2171 >www.example.com/</I
2172 > - means exactly the same.</P
2173 ><P
2174 > <I
2175 CLASS="EMPHASIS"
2176 >www.example.com/index.html</I
2177 > - matches only the single
2178  document <SPAN
2179 CLASS="QUOTE"
2180 >"/index.html"</SPAN
2181 > on <SPAN
2182 CLASS="QUOTE"
2183 >"www.example.com"</SPAN
2184 >.</P
2185 ><P
2186 > <I
2187 CLASS="EMPHASIS"
2188 >/index.html</I
2189 > - matches the document <SPAN
2190 CLASS="QUOTE"
2191 >"/index.html"</SPAN
2192 >, 
2193  regardless of the domain. So would match any page named <SPAN
2194 CLASS="QUOTE"
2195 >"index.html"</SPAN
2196 >
2197  on any site.</P
2198 ><P
2199 > <I
2200 CLASS="EMPHASIS"
2201 >index.html</I
2202 > - matches nothing, since it would be
2203  interpreted as a domain name and there is no top-level domain called
2204  <SPAN
2205 CLASS="QUOTE"
2206 >".html"</SPAN
2207 >.</P
2208 ><P
2209 > The matching of the domain part offers some flexible options: if the
2210  domain starts or ends with a dot, it becomes unanchored at that end. 
2211  For example:</P
2212 ><P
2213 > <I
2214 CLASS="EMPHASIS"
2215 >.example.com</I
2216 > - matches any domain or sub-domain that
2217  <I
2218 CLASS="EMPHASIS"
2219 >ENDS</I
2220 > in <SPAN
2221 CLASS="QUOTE"
2222 >".example.com"</SPAN
2223 >.</P
2224 ><P
2225 > <I
2226 CLASS="EMPHASIS"
2227 >www.</I
2228 > - matches any domain that <I
2229 CLASS="EMPHASIS"
2230 >STARTS</I
2231 > with
2232  <SPAN
2233 CLASS="QUOTE"
2234 >"www"</SPAN
2235 >.</P
2236 ><P
2237 > Additionally, there are wild-cards that you can use in the domain names
2238  themselves. They work pretty similar to shell wild-cards: <SPAN
2239 CLASS="QUOTE"
2240 >"*"</SPAN
2241 >
2242  stands for zero or more arbitrary characters, <SPAN
2243 CLASS="QUOTE"
2244 >"?"</SPAN
2245 > stands for
2246  any single character. And you can define character classes in square
2247  brackets and they can be freely mixed:</P
2248 ><P
2249 > <I
2250 CLASS="EMPHASIS"
2251 >ad*.example.com</I
2252 > - matches <SPAN
2253 CLASS="QUOTE"
2254 >"adserver.example.com"</SPAN
2255 >, 
2256  <SPAN
2257 CLASS="QUOTE"
2258 >"ads.example.com"</SPAN
2259 >, etc but not <SPAN
2260 CLASS="QUOTE"
2261 >"sfads.example.com"</SPAN
2262 >.</P
2263 ><P
2264 > <I
2265 CLASS="EMPHASIS"
2266 >*ad*.example.com</I
2267 > - matches all of the above, and then some.</P
2268 ><P
2269 > <I
2270 CLASS="EMPHASIS"
2271 >.?pix.com</I
2272 > - matches <SPAN
2273 CLASS="QUOTE"
2274 >"www.ipix.com"</SPAN
2275 >,
2276  <SPAN
2277 CLASS="QUOTE"
2278 >"pictures.epix.com"</SPAN
2279 >, <SPAN
2280 CLASS="QUOTE"
2281 >"a.b.c.d.e.upix.com"</SPAN
2282 >, etc. </P
2283 ><P
2284 > <I
2285 CLASS="EMPHASIS"
2286 >www[1-9a-ez].example.com</I
2287 > - matches <SPAN
2288 CLASS="QUOTE"
2289 >"www1.example.com"</SPAN
2290 >, 
2291  <SPAN
2292 CLASS="QUOTE"
2293 >"www4.example.com"</SPAN
2294 >, <SPAN
2295 CLASS="QUOTE"
2296 >"wwwd.example.com"</SPAN
2297 >, 
2298  <SPAN
2299 CLASS="QUOTE"
2300 >"wwwz.example.com"</SPAN
2301 >, etc., but <I
2302 CLASS="EMPHASIS"
2303 >not</I
2304
2305  <SPAN
2306 CLASS="QUOTE"
2307 >"wwww.example.com"</SPAN
2308 >.</P
2309 ><P
2310 > If <SPAN
2311 CLASS="APPLICATION"
2312 >Privoxy</SPAN
2313 > was compiled with
2314  <SPAN
2315 CLASS="QUOTE"
2316 >"pcre"</SPAN
2317 > support (the default), Perl compatible regular expressions
2318  can be used. These are more flexible and powerful than other types 
2319  of <SPAN
2320 CLASS="QUOTE"
2321 >"regular expressions"</SPAN
2322 >. See the <TT
2323 CLASS="FILENAME"
2324 >pcre/docs/</TT
2325 > directory or <SPAN
2326 CLASS="QUOTE"
2327 >"man
2328  perlre"</SPAN
2329 > (also available on  <A
2330 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
2331 TARGET="_top"
2332 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
2333 >)
2334  for details. A brief discussion of regular expressions is in the 
2335  <A
2336 HREF="appendix.html#REGEX"
2337 >Appendix</A
2338 >. For instance:</P
2339 ><P
2340 > <I
2341 CLASS="EMPHASIS"
2342 >/.*/advert[0-9]+\.jpe?g</I
2343 >  - would match a URL from any
2344  domain, with any path that includes <SPAN
2345 CLASS="QUOTE"
2346 >"advert"</SPAN
2347 > followed
2348  immediately by one or more digits, then a <SPAN
2349 CLASS="QUOTE"
2350 >"."</SPAN
2351 > and ending in
2352  either <SPAN
2353 CLASS="QUOTE"
2354 >"jpeg"</SPAN
2355 > or <SPAN
2356 CLASS="QUOTE"
2357 >"jpg"</SPAN
2358 >. So we match
2359  <SPAN
2360 CLASS="QUOTE"
2361 >"example.com/ads/advert2.jpg"</SPAN
2362 >, and
2363  <SPAN
2364 CLASS="QUOTE"
2365 >"www.example.com/ads/banners/advert39.jpeg"</SPAN
2366 >, but not
2367  <SPAN
2368 CLASS="QUOTE"
2369 >"www.example.com/ads/banners/advert39.gif"</SPAN
2370 > (no gifs in the
2371  example pattern).</P
2372 ><P
2373 > Please note that matching in the path is case
2374  <I
2375 CLASS="EMPHASIS"
2376 >INSENSITIVE</I
2377 > by default, but you can switch to case
2378  sensitive at any point in the pattern by using the 
2379  <SPAN
2380 CLASS="QUOTE"
2381 >"(?-i)"</SPAN
2382 > switch:</P
2383 ><P
2384 > <I
2385 CLASS="EMPHASIS"
2386 >www.example.com/(?-i)PaTtErN.*</I
2387 > - will match only
2388  documents whose path starts with <SPAN
2389 CLASS="QUOTE"
2390 >"PaTtErN"</SPAN
2391 > in
2392  <I
2393 CLASS="EMPHASIS"
2394 >exactly</I
2395 > this capitalization.</P
2396 ></DIV
2397 ><DIV
2398 CLASS="SECT3"
2399 ><H3
2400 CLASS="SECT3"
2401 ><A
2402 NAME="AEN963"
2403 >5.4.2. Actions</A
2404 ></H3
2405 ><P
2406 > Actions are enabled if preceded with a <SPAN
2407 CLASS="QUOTE"
2408 >"+"</SPAN
2409 >, and disabled if 
2410  preceded with a <SPAN
2411 CLASS="QUOTE"
2412 >"-"</SPAN
2413 >. Actions are invoked by enclosing the 
2414  action name in curly braces (e.g. {+some_action}), followed by a list of 
2415  URLs to which the action applies. There are three classes of actions:</P
2416 ><P
2417 > <P
2418 ></P
2419 ><UL
2420 ><LI
2421 ><P
2422 >  
2423    Boolean (e.g. <SPAN
2424 CLASS="QUOTE"
2425 >"+/-block"</SPAN
2426 >):
2427   </P
2428 ><P
2429 >   <TT
2430 CLASS="LITERAL"
2431 >    <P
2432 CLASS="LITERALLAYOUT"
2433 >&nbsp;&nbsp;<I
2434 CLASS="EMPHASIS"
2435 >{+name}</I
2436 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;enable&nbsp;this&nbsp;action<br>
2437 &nbsp;&nbsp;<I
2438 CLASS="EMPHASIS"
2439 >{-name}</I
2440 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;this&nbsp;action<br>
2441 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2442
2443    </TT
2444 >
2445   </P
2446 ></LI
2447 ><LI
2448 ><P
2449 >  
2450    parameterized (e.g. <SPAN
2451 CLASS="QUOTE"
2452 >"+/-hide-user-agent"</SPAN
2453 >):
2454   </P
2455 ><P
2456 >   <TT
2457 CLASS="LITERAL"
2458 >    <P
2459 CLASS="LITERALLAYOUT"
2460 >&nbsp;&nbsp;<I
2461 CLASS="EMPHASIS"
2462 >{+name{param}}</I
2463 >&nbsp;&nbsp;#&nbsp;enable&nbsp;action&nbsp;and&nbsp;set&nbsp;parameter&nbsp;to&nbsp;<SPAN
2464 CLASS="QUOTE"
2465 >"param"</SPAN
2466 ><br>
2467 &nbsp;&nbsp;<I
2468 CLASS="EMPHASIS"
2469 >{-name}</I
2470 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;action<br>
2471 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2472
2473    </TT
2474 >
2475   </P
2476 ></LI
2477 ><LI
2478 ><P
2479 >  
2480    Multi-value (e.g. <SPAN
2481 CLASS="QUOTE"
2482 >"{+/-add-header{Name: value}}"</SPAN
2483 >, <SPAN
2484 CLASS="QUOTE"
2485 >"{+/-wafer{name=value}}"</SPAN
2486 >):
2487   </P
2488 ><P
2489 >   <TT
2490 CLASS="LITERAL"
2491 >    <P
2492 CLASS="LITERALLAYOUT"
2493 >&nbsp;&nbsp;<I
2494 CLASS="EMPHASIS"
2495 >{+name{param}}</I
2496 >&nbsp;&nbsp;&nbsp;#&nbsp;enable&nbsp;action&nbsp;and&nbsp;add&nbsp;parameter&nbsp;<SPAN
2497 CLASS="QUOTE"
2498 >"param"</SPAN
2499 ><br>
2500 &nbsp;&nbsp;<I
2501 CLASS="EMPHASIS"
2502 >{-name{param}}</I
2503 >&nbsp;&nbsp;&nbsp;#&nbsp;remove&nbsp;the&nbsp;parameter&nbsp;<SPAN
2504 CLASS="QUOTE"
2505 >"param"</SPAN
2506 ><br>
2507 &nbsp;&nbsp;<I
2508 CLASS="EMPHASIS"
2509 >{-name}</I
2510 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;disable&nbsp;this&nbsp;action&nbsp;totally<br>
2511 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2512
2513    </TT
2514 >
2515   </P
2516 ></LI
2517 ></UL
2518 ></P
2519 ><P
2520 > If nothing is specified in this file, no <SPAN
2521 CLASS="QUOTE"
2522 >"actions"</SPAN
2523 > are taken.
2524  So in this case <SPAN
2525 CLASS="APPLICATION"
2526 >Privoxy</SPAN
2527 > would just be a
2528  normal, non-blocking, non-anonymizing proxy. You must specifically
2529  enable the privacy and blocking features you need (although the 
2530  provided default <TT
2531 CLASS="FILENAME"
2532 >default.action</TT
2533 > file will 
2534  give a good starting point).</P
2535 ><P
2536 > Later defined actions always over-ride earlier ones.  So exceptions 
2537  to any rules you make, should come in the latter part of the file. For
2538  multi-valued actions, the actions are applied in the order they are
2539  specified.</P
2540 ><P
2541 > The list of valid <SPAN
2542 CLASS="APPLICATION"
2543 >Privoxy</SPAN
2544 > <SPAN
2545 CLASS="QUOTE"
2546 >"actions"</SPAN
2547 > are:</P
2548 ><P
2549 > <P
2550 ></P
2551 ><UL
2552 ><LI
2553 ><P
2554 >  
2555    Add the specified HTTP header, which is not checked for validity.
2556    You may specify this many times to specify many different headers:
2557   </P
2558 ><P
2559 >   <TT
2560 CLASS="LITERAL"
2561 >    <P
2562 CLASS="LITERALLAYOUT"
2563 >&nbsp;&nbsp;<I
2564 CLASS="EMPHASIS"
2565 >+add-header{Name: value}</I
2566 ><br>
2567 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2568
2569    </TT
2570 >
2571   </P
2572 ></LI
2573 ><LI
2574 ><P
2575 >  
2576    Block this URL totally. In a default installation, a <SPAN
2577 CLASS="QUOTE"
2578 >"blocked"</SPAN
2579 >
2580    URL will result in bright red banner that says <SPAN
2581 CLASS="QUOTE"
2582 >"BLOCKED"</SPAN
2583 >, 
2584    with a reason why it is being blocked, and an option to see it anyway.
2585    The page displayed for this is the <SPAN
2586 CLASS="QUOTE"
2587 >"blocked"</SPAN
2588 > template 
2589    file.
2590   </P
2591 ><P
2592 >   <TT
2593 CLASS="LITERAL"
2594 >    <P
2595 CLASS="LITERALLAYOUT"
2596 >&nbsp;&nbsp;<I
2597 CLASS="EMPHASIS"
2598 >+block</I
2599 ><br>
2600 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2601
2602    </TT
2603 >
2604   </P
2605 ></LI
2606 ><LI
2607 ><P
2608 >  
2609    De-animate all animated GIF images, i.e. reduce them to their last frame.
2610    This will also shrink the images considerably (in bytes, not pixels!). If
2611    the option <SPAN
2612 CLASS="QUOTE"
2613 >"first"</SPAN
2614 > is given, the first frame of the animation
2615    is used as the replacement. If <SPAN
2616 CLASS="QUOTE"
2617 >"last"</SPAN
2618 > is given, the last frame
2619    of the animation is used instead, which probably makes more sense for most
2620    banner animations, but also has the risk of not showing the entire last
2621    frame (if it is only a delta to an earlier frame).
2622   </P
2623 ><P
2624 >   <TT
2625 CLASS="LITERAL"
2626 >    <P
2627 CLASS="LITERALLAYOUT"
2628 >&nbsp;&nbsp;<I
2629 CLASS="EMPHASIS"
2630 >+deanimate-gifs{last}</I
2631 ><br>
2632 &nbsp;&nbsp;<I
2633 CLASS="EMPHASIS"
2634 >+deanimate-gifs{first}</I
2635 ><br>
2636 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2637
2638    </TT
2639 >
2640   </P
2641 ></LI
2642 ><LI
2643 ><P
2644 >   <SPAN
2645 CLASS="QUOTE"
2646 >"+downgrade"</SPAN
2647 > will downgrade HTTP/1.1 client requests to
2648    HTTP/1.0 and downgrade the responses as well. Use this action for servers
2649    that use HTTP/1.1 protocol features that
2650    <SPAN
2651 CLASS="APPLICATION"
2652 >Privoxy</SPAN
2653 > doesn't handle well yet. HTTP/1.1 
2654    is only partially implemented. Default is not to downgrade requests.
2655   </P
2656 ><P
2657 >   <TT
2658 CLASS="LITERAL"
2659 >    <P
2660 CLASS="LITERALLAYOUT"
2661 >&nbsp;&nbsp;<I
2662 CLASS="EMPHASIS"
2663 >+downgrade</I
2664 ><br>
2665 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2666
2667    </TT
2668 >
2669   </P
2670 ></LI
2671 ><LI
2672 ><P
2673 >  
2674    Many sites, like yahoo.com, don't just link to other sites. Instead, they
2675    will link to some script on their own server, giving the destination as a
2676    parameter, which will then redirect you to the final target. URLs resulting
2677    from this scheme typically look like:
2678    <I
2679 CLASS="EMPHASIS"
2680 >http://some.place/some_script?http://some.where-else</I
2681 >.
2682   </P
2683 ><P
2684 >   Sometimes, there are even multiple consecutive redirects encoded in the
2685    URL. These redirections via scripts make your web browsing more traceable,
2686    since the server from which you follow such a link can see where you go to.
2687    Apart from that, valuable bandwidth and time is wasted, while your browser
2688    ask the server for one redirect after the other. Plus, it feeds the
2689    advertisers.
2690   </P
2691 ><P
2692 >   The <SPAN
2693 CLASS="QUOTE"
2694 >"+fast-redirects"</SPAN
2695 > option enables interception of these
2696    types of requests by <SPAN
2697 CLASS="APPLICATION"
2698 >Privoxy</SPAN
2699 >, who will cut off
2700    all but the last valid URL in the request and send a local redirect back to
2701    your browser without contacting the intermediate site(s).
2702   </P
2703 ><P
2704 >   <TT
2705 CLASS="LITERAL"
2706 >    <P
2707 CLASS="LITERALLAYOUT"
2708 >&nbsp;&nbsp;<I
2709 CLASS="EMPHASIS"
2710 >+fast-redirects</I
2711 ><br>
2712 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2713
2714    </TT
2715 >
2716   </P
2717 ></LI
2718 ><LI
2719 ><P
2720 >  
2721    Apply the filters in the <TT
2722 CLASS="LITERAL"
2723 >section_header</TT
2724
2725    section of the <TT
2726 CLASS="FILENAME"
2727 >default.filter</TT
2728 > file to the site(s).
2729    <TT
2730 CLASS="FILENAME"
2731 >default.filter</TT
2732 > sections are grouped according to like
2733    functionality. <SPAN
2734 CLASS="APPLICATION"
2735 >Filters</SPAN
2736 > can be used to 
2737    re-write any of the raw page content. This is a potentially a 
2738    very powerful feature!
2739   </P
2740 ><P
2741 >   <TT
2742 CLASS="LITERAL"
2743 >    <P
2744 CLASS="LITERALLAYOUT"
2745 >&nbsp;<I
2746 CLASS="EMPHASIS"
2747 >+filter{section_header}</I
2748 ><br>
2749 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2750
2751    </TT
2752 >
2753   </P
2754 ><P
2755 >   
2756    Filter sections that are pre-defined in the supplied
2757    <TT
2758 CLASS="FILENAME"
2759 >default.filter</TT
2760 > include:
2761   </P
2762 ><A
2763 NAME="AEN1073"
2764 ></A
2765 ><BLOCKQUOTE
2766 CLASS="BLOCKQUOTE"
2767 ><P
2768 ></P
2769 ><TABLE
2770 BORDER="0"
2771 ><TBODY
2772 ><TR
2773 ><TD
2774 >     <I
2775 CLASS="EMPHASIS"
2776 >html-annoyances</I
2777 >:  Get rid of particularly annoying HTML abuse.
2778    </TD
2779 ></TR
2780 ></TBODY
2781 ></TABLE
2782 ><P
2783 ></P
2784 ><P
2785 ></P
2786 ><TABLE
2787 BORDER="0"
2788 ><TBODY
2789 ><TR
2790 ><TD
2791 >    <I
2792 CLASS="EMPHASIS"
2793 >js-annoyances</I
2794 >:    Get rid of particularly annoying JavaScript abuse
2795    </TD
2796 ></TR
2797 ></TBODY
2798 ></TABLE
2799 ><P
2800 ></P
2801 ><P
2802 ></P
2803 ><TABLE
2804 BORDER="0"
2805 ><TBODY
2806 ><TR
2807 ><TD
2808 >    <I
2809 CLASS="EMPHASIS"
2810 >no-poups</I
2811 >:         Kill all popups in JS and HTML
2812    </TD
2813 ></TR
2814 ></TBODY
2815 ></TABLE
2816 ><P
2817 ></P
2818 ><P
2819 ></P
2820 ><TABLE
2821 BORDER="0"
2822 ><TBODY
2823 ><TR
2824 ><TD
2825 >    <I
2826 CLASS="EMPHASIS"
2827 >frameset-borders</I
2828 >: Give frames a border
2829    </TD
2830 ></TR
2831 ></TBODY
2832 ></TABLE
2833 ><P
2834 ></P
2835 ><P
2836 ></P
2837 ><TABLE
2838 BORDER="0"
2839 ><TBODY
2840 ><TR
2841 ><TD
2842 >    <I
2843 CLASS="EMPHASIS"
2844 >webbugs</I
2845 >:          Squish WebBugs (1x1 invisible GIFs used for user tracking)
2846    </TD
2847 ></TR
2848 ></TBODY
2849 ></TABLE
2850 ><P
2851 ></P
2852 ><P
2853 ></P
2854 ><TABLE
2855 BORDER="0"
2856 ><TBODY
2857 ><TR
2858 ><TD
2859 >    <I
2860 CLASS="EMPHASIS"
2861 >no-refresh</I
2862 >:       Automatic refresh sucks on auto-dialup lines
2863    </TD
2864 ></TR
2865 ></TBODY
2866 ></TABLE
2867 ><P
2868 ></P
2869 ><P
2870 ></P
2871 ><TABLE
2872 BORDER="0"
2873 ><TBODY
2874 ><TR
2875 ><TD
2876 >    <I
2877 CLASS="EMPHASIS"
2878 >fun</I
2879 >:              Text replacements  for subversive browsing fun!
2880    </TD
2881 ></TR
2882 ></TBODY
2883 ></TABLE
2884 ><P
2885 ></P
2886 ><P
2887 ></P
2888 ><TABLE
2889 BORDER="0"
2890 ><TBODY
2891 ><TR
2892 ><TD
2893 >    <I
2894 CLASS="EMPHASIS"
2895 >nimda</I
2896 >:            Remove (virus) Nimda code.
2897    </TD
2898 ></TR
2899 ></TBODY
2900 ></TABLE
2901 ><P
2902 ></P
2903 ><P
2904 ></P
2905 ><TABLE
2906 BORDER="0"
2907 ><TBODY
2908 ><TR
2909 ><TD
2910 >     <I
2911 CLASS="EMPHASIS"
2912 >banners-by-size</I
2913 >:  Kill banners by size
2914    </TD
2915 ></TR
2916 ></TBODY
2917 ></TABLE
2918 ><P
2919 ></P
2920 ><P
2921 ></P
2922 ><TABLE
2923 BORDER="0"
2924 ><TBODY
2925 ><TR
2926 ><TD
2927 >    <I
2928 CLASS="EMPHASIS"
2929 >crude-parental</I
2930 >:   Kill all web pages that contain the words "sex" or "warez"
2931    </TD
2932 ></TR
2933 ></TBODY
2934 ></TABLE
2935 ><P
2936 ></P
2937 ></BLOCKQUOTE
2938 ></LI
2939 ><LI
2940 ><P
2941 >  
2942    Block any existing X-Forwarded-for header, and do not add a new one:
2943   </P
2944 ><P
2945 >   <TT
2946 CLASS="LITERAL"
2947 >    <P
2948 CLASS="LITERALLAYOUT"
2949 >&nbsp;&nbsp;<I
2950 CLASS="EMPHASIS"
2951 >+hide-forwarded</I
2952 ><br>
2953 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2954
2955    </TT
2956 >
2957   </P
2958 ></LI
2959 ><LI
2960 ><P
2961 >  
2962    If the browser sends a <SPAN
2963 CLASS="QUOTE"
2964 >"From:"</SPAN
2965 > header containing your e-mail
2966    address, this either completely removes the header (<SPAN
2967 CLASS="QUOTE"
2968 >"block"</SPAN
2969 >), or
2970    changes it to the specified e-mail address.
2971   </P
2972 ><P
2973 >   <TT
2974 CLASS="LITERAL"
2975 >    <P
2976 CLASS="LITERALLAYOUT"
2977 >&nbsp;&nbsp;<I
2978 CLASS="EMPHASIS"
2979 >+hide-from{block}</I
2980 ><br>
2981 &nbsp;&nbsp;<I
2982 CLASS="EMPHASIS"
2983 >+hide-from{spam@sittingduck.xqq}</I
2984 ><br>
2985 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
2986
2987    </TT
2988 >
2989   </P
2990 ></LI
2991 ><LI
2992 ><P
2993 >  
2994    Don't send the <SPAN
2995 CLASS="QUOTE"
2996 >"Referer:"</SPAN
2997 > (sic) header to the web site.  You
2998    can block it, forge a URL to the same server as the request (which is
2999    preferred because some sites will not send images otherwise) or set it to a
3000    constant, user defined string of your choice.
3001   </P
3002 ><P
3003 >   <TT
3004 CLASS="LITERAL"
3005 >    <P
3006 CLASS="LITERALLAYOUT"
3007 >&nbsp;&nbsp;<I
3008 CLASS="EMPHASIS"
3009 >+hide-referer{block}</I
3010 ><br>
3011 &nbsp;&nbsp;<I
3012 CLASS="EMPHASIS"
3013 >+hide-referer{forge}</I
3014 ><br>
3015 &nbsp;&nbsp;<I
3016 CLASS="EMPHASIS"
3017 >+hide-referer{http://nowhere.com}</I
3018 ><br>
3019 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3020
3021    </TT
3022 >
3023   </P
3024 ></LI
3025 ><LI
3026 ><P
3027 >  
3028    Alternative spelling of <SPAN
3029 CLASS="QUOTE"
3030 >"+hide-referer"</SPAN
3031 >.  It has the same
3032    parameters, and can be freely mixed with, <SPAN
3033 CLASS="QUOTE"
3034 >"+hide-referer"</SPAN
3035 >.
3036    (<SPAN
3037 CLASS="QUOTE"
3038 >"referrer"</SPAN
3039 > is the correct English spelling, however the HTTP
3040    specification has a bug - it requires it to be spelled <SPAN
3041 CLASS="QUOTE"
3042 >"referer"</SPAN
3043 >.) 
3044   </P
3045 ><P
3046 >   <TT
3047 CLASS="LITERAL"
3048 >    <P
3049 CLASS="LITERALLAYOUT"
3050 >&nbsp;&nbsp;<I
3051 CLASS="EMPHASIS"
3052 >+hide-referrer{...}</I
3053 ><br>
3054 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3055
3056    </TT
3057 >
3058   </P
3059 ></LI
3060 ><LI
3061 ><P
3062 >  
3063    Change the <SPAN
3064 CLASS="QUOTE"
3065 >"User-Agent:"</SPAN
3066 > header so web servers can't tell your
3067    browser type.  Warning! This breaks many web sites.  Specify the
3068    user-agent value you want. Example, pretend to be using Netscape on
3069    Linux:
3070   </P
3071 ><P
3072 >   <TT
3073 CLASS="LITERAL"
3074 >    <P
3075 CLASS="LITERALLAYOUT"
3076 >&nbsp;&nbsp;<I
3077 CLASS="EMPHASIS"
3078 >+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</I
3079 ><br>
3080 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3081
3082    </TT
3083 >
3084   </P
3085 ></LI
3086 ><LI
3087 ><P
3088 >  
3089    Treat this URL as an image.  This only matters if it's also <SPAN
3090 CLASS="QUOTE"
3091 >"+block"</SPAN
3092 >ed,
3093    in which case a <SPAN
3094 CLASS="QUOTE"
3095 >"blocked"</SPAN
3096 > image can be sent rather than a HTML page.
3097    See <SPAN
3098 CLASS="QUOTE"
3099 >"+image-blocker{}"</SPAN
3100 > below for the control over what is actually sent.
3101    If you want <I
3102 CLASS="EMPHASIS"
3103 >invisible</I
3104 > ads, they should be defined as 
3105    <I
3106 CLASS="EMPHASIS"
3107 >images</I
3108 > and <I
3109 CLASS="EMPHASIS"
3110 >blocked</I
3111 >. And also, 
3112    <SPAN
3113 CLASS="QUOTE"
3114 >"image-blocker"</SPAN
3115 >  should be set to <SPAN
3116 CLASS="QUOTE"
3117 >"blank"</SPAN
3118 >. Note you 
3119    cannot treat HTML pages as images in most cases. For instance, frames 
3120    require an HTML page to display. So a frame that is an ad, cannot be 
3121    treated as an image. Forcing an <SPAN
3122 CLASS="QUOTE"
3123 >"image"</SPAN
3124 > in this 
3125    situation just will not work.
3126   </P
3127 ><P
3128 >   <TT
3129 CLASS="LITERAL"
3130 >    <P
3131 CLASS="LITERALLAYOUT"
3132 >&nbsp;&nbsp;<I
3133 CLASS="EMPHASIS"
3134 >+image</I
3135 ><br>
3136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3137
3138    </TT
3139 >
3140   </P
3141 ></LI
3142 ><LI
3143 ><P
3144 > Decides what to do with URLs that end up tagged with <SPAN
3145 CLASS="QUOTE"
3146 >"{+block
3147   +image}"</SPAN
3148 >, e.g an advertizement. There are five options.
3149   <SPAN
3150 CLASS="QUOTE"
3151 >"-image-blocker"</SPAN
3152 > will send a HTML <SPAN
3153 CLASS="QUOTE"
3154 >"blocked"</SPAN
3155 > page,
3156   usually resulting in a <SPAN
3157 CLASS="QUOTE"
3158 >"broken image"</SPAN
3159 > icon.
3160 <SPAN
3161 CLASS="QUOTE"
3162 >"+image-blocker{blank}"</SPAN
3163 > will send a 1x1 transparent GIF
3164 image. And finally, <SPAN
3165 CLASS="QUOTE"
3166 >"+image-blocker{http://xyz.com}"</SPAN
3167 > will send a
3168 HTTP temporary redirect to the specified image. This has the advantage of the
3169 icon being being cached by the browser, which will speed up the display.
3170 <SPAN
3171 CLASS="QUOTE"
3172 >"+image-blocker{pattern}"</SPAN
3173 > will send a checkboard type pattern
3174   </P
3175 ><P
3176 >   <TT
3177 CLASS="LITERAL"
3178 >    <P
3179 CLASS="LITERALLAYOUT"
3180 >&nbsp;&nbsp;<I
3181 CLASS="EMPHASIS"
3182 >+image-blocker{blank}</I
3183 ><br>
3184 &nbsp;&nbsp;<I
3185 CLASS="EMPHASIS"
3186 >+image-blocker{pattern}</I
3187 ><br>
3188 &nbsp;&nbsp;<I
3189 CLASS="EMPHASIS"
3190 >+image-blocker{http://p.p/send-banner}</I
3191 ><br>
3192 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3193
3194    </TT
3195 >
3196   </P
3197 ></LI
3198 ><LI
3199 ><P
3200
3201    By default (i.e. in the absence of a <SPAN
3202 CLASS="QUOTE"
3203 >"+limit-connect"</SPAN
3204 >
3205    action), <SPAN
3206 CLASS="APPLICATION"
3207 >Privoxy</SPAN
3208 > will only allow CONNECT
3209    requests to port 443, which is the standard port for https as a 
3210    precaution.
3211   </P
3212 ><P
3213 >   The CONNECT methods exists in HTTP to allow access to secure websites
3214    (https:// URLs) through proxies. It works very simply: the proxy
3215    connects to the server on the specified port, and then short-circuits
3216    its connections to the client <I
3217 CLASS="EMPHASIS"
3218 >and</I
3219 > to the remote proxy.
3220    This can be a big security hole, since CONNECT-enabled proxies can
3221    be abused as TCP relays very easily.
3222   </P
3223 ><P
3224
3225    If you want to allow CONNECT for more ports than this, or want to forbid
3226    CONNECT altogether, you can specify a comma separated list of ports and
3227    port ranges (the latter using dashes, with the minimum defaulting to 0 and
3228    max to 65K):
3229   </P
3230 ><P
3231 >   <TT
3232 CLASS="LITERAL"
3233 >    <P
3234 CLASS="LITERALLAYOUT"
3235 >&nbsp;&nbsp;<I
3236 CLASS="EMPHASIS"
3237 >+limit-connect{443}                 # This is the default and need no be specified.</I
3238 ><br>
3239 &nbsp;&nbsp;<I
3240 CLASS="EMPHASIS"
3241 >+limit-connect{80,443}              # Ports 80 and 443 are OK.</I
3242 ><br>
3243 &nbsp;&nbsp;<I
3244 CLASS="EMPHASIS"
3245 >+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</I
3246 ><br>
3247 &nbsp;&nbsp;<I
3248 CLASS="EMPHASIS"
3249 >                                    #and above 500 are OK.</I
3250 ><br>
3251 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3252
3253    </TT
3254 >
3255   </P
3256 ></LI
3257 ><LI
3258 ><P
3259 >   <SPAN
3260 CLASS="QUOTE"
3261 >"+no-compression"</SPAN
3262 > prevents the website from compressing the
3263    data. Some websites do this, which can be a problem for
3264    <SPAN
3265 CLASS="APPLICATION"
3266 >Privoxy</SPAN
3267 >, since <SPAN
3268 CLASS="QUOTE"
3269 >"+filter"</SPAN
3270 >,
3271    <SPAN
3272 CLASS="QUOTE"
3273 >"+no-popup"</SPAN
3274 > and <SPAN
3275 CLASS="QUOTE"
3276 >"+gif-deanimate"</SPAN
3277 > will not work on
3278    compressed data. This will slow down connections to those websites,
3279    though. Default is <SPAN
3280 CLASS="QUOTE"
3281 >"no-compression"</SPAN
3282 > is turned on.
3283   </P
3284 ><P
3285 >   <TT
3286 CLASS="LITERAL"
3287 >    <P
3288 CLASS="LITERALLAYOUT"
3289 >&nbsp;&nbsp;<I
3290 CLASS="EMPHASIS"
3291 >+nocompression</I
3292 ><br>
3293 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3294
3295    </TT
3296 >
3297   </P
3298 ></LI
3299 ><LI
3300 ><P
3301 >  
3302    If the website sets cookies, <SPAN
3303 CLASS="QUOTE"
3304 >"no-cookies-keep"</SPAN
3305 > will make sure
3306    they are erased when you exit and restart your web browser. This makes
3307    profiling cookies useless, but won't break sites which require cookies so
3308    that you can log in for transactions. Default: on.
3309   </P
3310 ><P
3311 >   <TT
3312 CLASS="LITERAL"
3313 >    <P
3314 CLASS="LITERALLAYOUT"
3315 >&nbsp;&nbsp;<I
3316 CLASS="EMPHASIS"
3317 >+no-cookies-keep</I
3318 ><br>
3319 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3320
3321    </TT
3322 >
3323   </P
3324 ></LI
3325 ><LI
3326 ><P
3327 >  
3328    Prevent the website from reading cookies:
3329   </P
3330 ><P
3331 >   <TT
3332 CLASS="LITERAL"
3333 >    <P
3334 CLASS="LITERALLAYOUT"
3335 >&nbsp;&nbsp;<I
3336 CLASS="EMPHASIS"
3337 >+no-cookies-read</I
3338 ><br>
3339 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3340
3341    </TT
3342 >
3343   </P
3344 ></LI
3345 ><LI
3346 ><P
3347 >  
3348    Prevent the website from setting cookies:
3349   </P
3350 ><P
3351 >   <TT
3352 CLASS="LITERAL"
3353 >    <P
3354 CLASS="LITERALLAYOUT"
3355 >&nbsp;&nbsp;<I
3356 CLASS="EMPHASIS"
3357 >+no-cookies-set</I
3358 ><br>
3359 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3360
3361    </TT
3362 >
3363   </P
3364 ></LI
3365 ><LI
3366 ><P
3367 >  
3368    Filter the website through a built-in filter to disable those obnoxious 
3369    JavaScript pop-up windows via window.open(), etc. The two alternative
3370    spellings are equivalent.
3371   </P
3372 ><P
3373 >   <TT
3374 CLASS="LITERAL"
3375 >    <P
3376 CLASS="LITERALLAYOUT"
3377 >&nbsp;&nbsp;<I
3378 CLASS="EMPHASIS"
3379 >+no-popup</I
3380 ><br>
3381 &nbsp;&nbsp;<I
3382 CLASS="EMPHASIS"
3383 >+no-popups</I
3384 ><br>
3385 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3386
3387    </TT
3388 >
3389   </P
3390 ></LI
3391 ><LI
3392 ><P
3393 >  
3394    This action only applies if you are using a <TT
3395 CLASS="FILENAME"
3396 >jarfile</TT
3397 >
3398    for saving cookies. It sends a cookie to every site stating that you do not
3399    accept any copyright on cookies sent to you, and asking them not to track
3400    you.  Of course, this is a (relatively) unique header they could use to
3401    track you.
3402   </P
3403 ><P
3404 >   <TT
3405 CLASS="LITERAL"
3406 >    <P
3407 CLASS="LITERALLAYOUT"
3408 >&nbsp;&nbsp;<I
3409 CLASS="EMPHASIS"
3410 >+vanilla-wafer</I
3411 ><br>
3412 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3413
3414    </TT
3415 >
3416   </P
3417 ></LI
3418 ><LI
3419 ><P
3420 >  
3421    This allows you to add an arbitrary cookie. It can be specified multiple
3422    times in order to add as many cookies as you like.
3423   </P
3424 ><P
3425 >   <TT
3426 CLASS="LITERAL"
3427 >    <P
3428 CLASS="LITERALLAYOUT"
3429 >&nbsp;&nbsp;<I
3430 CLASS="EMPHASIS"
3431 >+wafer{name=value}</I
3432 ><br>
3433 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
3434
3435    </TT
3436 >
3437   </P
3438 ></LI
3439 ></UL
3440 ></P
3441 ><P
3442 > The meaning of any of the above is reversed by preceding the action with a 
3443  <SPAN
3444 CLASS="QUOTE"
3445 >"-"</SPAN
3446 >, in place of the <SPAN
3447 CLASS="QUOTE"
3448 >"+"</SPAN
3449 >.</P
3450 ><P
3451 > Some examples:</P
3452 ><P
3453 > Turn off cookies by default, then allow a few through for specified sites:</P
3454 ><P
3455 > <TT
3456 CLASS="LITERAL"
3457 >  <P
3458 CLASS="LITERALLAYOUT"
3459 >&nbsp;#&nbsp;Turn&nbsp;off&nbsp;all&nbsp;persistent&nbsp;cookies<br>
3460 &nbsp;{&nbsp;+no-cookies-read&nbsp;}<br>
3461 &nbsp;{&nbsp;+no-cookies-set&nbsp;}<br>
3462 &nbsp;#&nbsp;Allow&nbsp;cookies&nbsp;for&nbsp;this&nbsp;browser&nbsp;session&nbsp;ONLY<br>
3463 &nbsp;{&nbsp;+no-cookies-keep&nbsp;}<br>
3464 <br>
3465 &nbsp;#&nbsp;Exceptions&nbsp;to&nbsp;the&nbsp;above,&nbsp;sites&nbsp;that&nbsp;benefit&nbsp;from&nbsp;persistent&nbsp;cookies<br>
3466 &nbsp;{&nbsp;-no-cookies-read&nbsp;}<br>
3467 &nbsp;{&nbsp;-no-cookies-set&nbsp;}<br>
3468 &nbsp;{&nbsp;-no-cookies-keep&nbsp;}<br>
3469 &nbsp;.javasoft.com<br>
3470 &nbsp;.sun.com<br>
3471 &nbsp;.yahoo.com<br>
3472 &nbsp;.msdn.microsoft.com<br>
3473 &nbsp;.redhat.com<br>
3474 <br>
3475 &nbsp;#&nbsp;Alternative&nbsp;way&nbsp;of&nbsp;saying&nbsp;the&nbsp;same&nbsp;thing<br>
3476 &nbsp;{-no-cookies-set&nbsp;-no-cookies-read&nbsp;-no-cookies-keep}<br>
3477 &nbsp;.sourceforge.net<br>
3478 &nbsp;.sf.net<br>
3479 &nbsp;&nbsp;&nbsp;</P
3480
3481  </TT
3482 ></P
3483 ><P
3484 > Now turn off <SPAN
3485 CLASS="QUOTE"
3486 >"fast redirects"</SPAN
3487 >, and then we allow two exceptions:</P
3488 ><P
3489 > <TT
3490 CLASS="LITERAL"
3491 >  <P
3492 CLASS="LITERALLAYOUT"
3493 >&nbsp;#&nbsp;Turn&nbsp;them&nbsp;off!<br>
3494 &nbsp;{+fast-redirects}<br>
3495 &nbsp;<br>
3496 &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>
3497 &nbsp;{-fast-redirects}<br>
3498 &nbsp;www.ukc.ac.uk/cgi-bin/wac\.cgi\?<br>
3499 &nbsp;login.yahoo.com<br>
3500 &nbsp;&nbsp;&nbsp;</P
3501
3502  </TT
3503 ></P
3504 ><P
3505 > Turn on page filtering according to rules in the defined sections 
3506  of <TT
3507 CLASS="FILENAME"
3508 >refilterfile</TT
3509 >, and make one exception for 
3510  sourceforge:
3511  </P
3512 ><P
3513 > <TT
3514 CLASS="LITERAL"
3515 >  <P
3516 CLASS="LITERALLAYOUT"
3517 >&nbsp;#&nbsp;Run&nbsp;everything&nbsp;through&nbsp;the&nbsp;filter&nbsp;file,&nbsp;using&nbsp;only&nbsp;the<br>
3518 &nbsp;#&nbsp;specified&nbsp;sections:<br>
3519 &nbsp;+filter{html-annoyances}&nbsp;+filter{js-annoyances}&nbsp;+filter{no-popups}\<br>
3520 &nbsp;+filter{webbugs}&nbsp;+filter{nimda}&nbsp;+filter{banners-by-size}<br>
3521 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
3522 &nbsp;#&nbsp;Then&nbsp;disable&nbsp;filtering&nbsp;of&nbsp;code&nbsp;from&nbsp;sourceforge!<br>
3523 &nbsp;{-filter}<br>
3524 &nbsp;.cvs.sourceforge.net<br>
3525 &nbsp;&nbsp;&nbsp;</P
3526
3527  </TT
3528 ></P
3529 ><P
3530 > Now some URLs that we want <SPAN
3531 CLASS="QUOTE"
3532 >"blocked"</SPAN
3533 > (normally generates 
3534  the <SPAN
3535 CLASS="QUOTE"
3536 >"blocked"</SPAN
3537 > banner). Many of these use regular expressions
3538  that will expand to match multiple URLs:</P
3539 ><P
3540 > <TT
3541 CLASS="LITERAL"
3542 >  <P
3543 CLASS="LITERALLAYOUT"
3544 >&nbsp;&nbsp;#&nbsp;Blocklist:<br>
3545 &nbsp;&nbsp;{+block}<br>
3546 &nbsp;&nbsp;/.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))<br>
3547 &nbsp;&nbsp;/.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])<br>
3548 &nbsp;&nbsp;/.*/(ng)?adclient\.cgi<br>
3549 &nbsp;&nbsp;/.*/(plain|live|rotate)[-_.]?ads?/<br>
3550 &nbsp;&nbsp;/.*/(sponsor)s?[0-9]?/<br>
3551 &nbsp;&nbsp;/.*/_?(plain|live)?ads?(-banners)?/<br>
3552 &nbsp;&nbsp;/.*/abanners/<br>
3553 &nbsp;&nbsp;/.*/ad(sdna_image|gifs?)/<br>
3554 &nbsp;&nbsp;/.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)<br>
3555 &nbsp;&nbsp;/.*/adbanners/<br>
3556 &nbsp;&nbsp;/.*/adserver<br>
3557 &nbsp;&nbsp;/.*/adstream\.cgi<br>
3558 &nbsp;&nbsp;/.*/adv((er)?ts?|ertis(ing|ements?))?/<br>
3559 &nbsp;&nbsp;/.*/banner_?ads/<br>
3560 &nbsp;&nbsp;/.*/banners?/<br>
3561 &nbsp;&nbsp;/.*/banners?\.cgi/<br>
3562 &nbsp;&nbsp;/.*/cgi-bin/centralad/getimage<br>
3563 &nbsp;&nbsp;/.*/images/addver\.gif<br>
3564 &nbsp;&nbsp;/.*/images/marketing/.*\.(gif|jpe?g)<br>
3565 &nbsp;&nbsp;/.*/popupads/<br>
3566 &nbsp;&nbsp;/.*/siteads/<br>
3567 &nbsp;&nbsp;/.*/sponsor.*\.gif<br>
3568 &nbsp;&nbsp;/.*/sponsors?[0-9]?/<br>
3569 &nbsp;&nbsp;/.*/advert[0-9]+\.jpg<br>
3570 &nbsp;&nbsp;/Media/Images/Adds/<br>
3571 &nbsp;&nbsp;/ad_images/<br>
3572 &nbsp;&nbsp;/adimages/<br>
3573 &nbsp;&nbsp;/.*/ads/<br>
3574 &nbsp;&nbsp;/bannerfarm/<br>
3575 &nbsp;&nbsp;/grafikk/annonse/<br>
3576 &nbsp;&nbsp;/graphics/defaultAd/<br>
3577 &nbsp;&nbsp;/image\.ng/AdType<br>
3578 &nbsp;&nbsp;/image\.ng/transactionID<br>
3579 &nbsp;&nbsp;/images/.*/.*_anim\.gif&nbsp;#&nbsp;alvin&nbsp;brattli<br>
3580 &nbsp;&nbsp;/ip_img/.*\.(gif|jpe?g)<br>
3581 &nbsp;&nbsp;/rotateads/<br>
3582 &nbsp;&nbsp;/rotations/&nbsp;<br>
3583 &nbsp;&nbsp;/worldnet/ad\.cgi<br>
3584 &nbsp;&nbsp;/cgi-bin/nph-adclick.exe/<br>
3585 &nbsp;&nbsp;/.*/Image/BannerAdvertising/<br>
3586 &nbsp;&nbsp;/.*/ad-bin/<br>
3587 &nbsp;&nbsp;/.*/adlib/server\.cgi<br>
3588 &nbsp;&nbsp;/autoads/<br>
3589 &nbsp;&nbsp;&nbsp;</P
3590
3591  </TT
3592 ></P
3593 ><P
3594 > Note that many of these actions have the potential to cause a page to
3595  misbehave, possibly even not to display at all. There are many ways 
3596  a site designer may choose to design his site, and what HTTP header 
3597  content he may depend on. There is no way to have hard and fast rules 
3598  for all sites. See the <A
3599 HREF="appendix.html#ACTIONSANAT"
3600 >Appendix</A
3601 >
3602  for a brief example on troubleshooting actions.</P
3603 ></DIV
3604 ><DIV
3605 CLASS="SECT3"
3606 ><H3
3607 CLASS="SECT3"
3608 ><A
3609 NAME="AEN1285"
3610 >5.4.3. Aliases</A
3611 ></H3
3612 ><P
3613 > Custom <SPAN
3614 CLASS="QUOTE"
3615 >"actions"</SPAN
3616 >, known to <SPAN
3617 CLASS="APPLICATION"
3618 >Privoxy</SPAN
3619 >
3620  as <SPAN
3621 CLASS="QUOTE"
3622 >"aliases"</SPAN
3623 >, can be defined by combining other <SPAN
3624 CLASS="QUOTE"
3625 >"actions"</SPAN
3626 >.
3627  These can in turn be invoked just like the built-in <SPAN
3628 CLASS="QUOTE"
3629 >"actions"</SPAN
3630 >.
3631  Currently, an alias can contain any character except space, tab, <SPAN
3632 CLASS="QUOTE"
3633 >"="</SPAN
3634 >,
3635  <SPAN
3636 CLASS="QUOTE"
3637 >"{"</SPAN
3638 > or <SPAN
3639 CLASS="QUOTE"
3640 >"}"</SPAN
3641 >. But please use only <SPAN
3642 CLASS="QUOTE"
3643 >"a"</SPAN
3644 >-
3645  <SPAN
3646 CLASS="QUOTE"
3647 >"z"</SPAN
3648 >, <SPAN
3649 CLASS="QUOTE"
3650 >"0"</SPAN
3651 >-<SPAN
3652 CLASS="QUOTE"
3653 >"9"</SPAN
3654 >, <SPAN
3655 CLASS="QUOTE"
3656 >"+"</SPAN
3657 >, and
3658  <SPAN
3659 CLASS="QUOTE"
3660 >"-"</SPAN
3661 >. Alias names are not case sensitive, and 
3662  <I
3663 CLASS="EMPHASIS"
3664 >must be defined  before anything</I
3665 > else in the
3666  <TT
3667 CLASS="FILENAME"
3668 >default.action</TT
3669 >file! And there can only be one set of
3670  <SPAN
3671 CLASS="QUOTE"
3672 >"aliases"</SPAN
3673 > defined.</P
3674 ><P
3675 > Now let's define a few aliases:</P
3676 ><P
3677 > <TT
3678 CLASS="LITERAL"
3679 >  <P
3680 CLASS="LITERALLAYOUT"
3681 >&nbsp;#&nbsp;Useful&nbsp;custom&nbsp;aliases&nbsp;we&nbsp;can&nbsp;use&nbsp;later.&nbsp;These&nbsp;must&nbsp;come&nbsp;first!<br>
3682 &nbsp;{{alias}}<br>
3683 &nbsp;+no-cookies&nbsp;=&nbsp;+no-cookies-set&nbsp;+no-cookies-read<br>
3684 &nbsp;-no-cookies&nbsp;=&nbsp;-no-cookies-set&nbsp;-no-cookies-read<br>
3685 &nbsp;fragile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;-block&nbsp;-no-cookies&nbsp;-filter&nbsp;-fast-redirects&nbsp;-hide-referer&nbsp;-no-popups<br>
3686 &nbsp;shop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;-no-cookies&nbsp;-filter&nbsp;-fast-redirects<br>
3687 &nbsp;+imageblock&nbsp;=&nbsp;+block&nbsp;+image<br>
3688 <br>
3689 &nbsp;#For&nbsp;people&nbsp;who&nbsp;don't&nbsp;like&nbsp;to&nbsp;type&nbsp;too&nbsp;much:&nbsp;&nbsp;;-)<br>
3690 &nbsp;c0&nbsp;=&nbsp;+no-cookies<br>
3691 &nbsp;c1&nbsp;=&nbsp;-no-cookies<br>
3692 &nbsp;c2&nbsp;=&nbsp;-no-cookies-set&nbsp;+no-cookies-read<br>
3693 &nbsp;c3&nbsp;=&nbsp;+no-cookies-set&nbsp;-no-cookies-read<br>
3694 &nbsp;#...&nbsp;etc.&nbsp;&nbsp;Customize&nbsp;to&nbsp;your&nbsp;heart's&nbsp;content.<br>
3695 &nbsp;&nbsp;&nbsp;</P
3696
3697  </TT
3698 ></P
3699 ><P
3700 > Some examples using our <SPAN
3701 CLASS="QUOTE"
3702 >"shop"</SPAN
3703 > and <SPAN
3704 CLASS="QUOTE"
3705 >"fragile"</SPAN
3706 >
3707  aliases from above:</P
3708 ><P
3709 > <TT
3710 CLASS="LITERAL"
3711 >  <P
3712 CLASS="LITERALLAYOUT"
3713 >&nbsp;#&nbsp;These&nbsp;sites&nbsp;are&nbsp;very&nbsp;complex&nbsp;and&nbsp;require<br>
3714 &nbsp;#&nbsp;minimal&nbsp;interference.<br>
3715 &nbsp;{fragile}<br>
3716 &nbsp;.office.microsoft.com<br>
3717 &nbsp;.windowsupdate.microsoft.com<br>
3718 &nbsp;.nytimes.com<br>
3719 <br>
3720 &nbsp;#&nbsp;Shopping&nbsp;sites&nbsp;-&nbsp;still&nbsp;want&nbsp;to&nbsp;block&nbsp;ads.<br>
3721 &nbsp;{shop}<br>
3722 &nbsp;.quietpc.com<br>
3723 &nbsp;.worldpay.com&nbsp;&nbsp;&nbsp;#&nbsp;for&nbsp;quietpc.com<br>
3724 &nbsp;.jungle.com<br>
3725 &nbsp;.scan.co.uk<br>
3726 <br>
3727 &nbsp;#&nbsp;These&nbsp;shops&nbsp;require&nbsp;pop-ups<br>
3728 &nbsp;{shop&nbsp;-no-popups}<br>
3729 &nbsp;.dabs.com<br>
3730 &nbsp;.overclockers.co.uk<br>
3731 &nbsp;&nbsp;&nbsp;</P
3732
3733  </TT
3734 ></P
3735 ><P
3736 > The <SPAN
3737 CLASS="QUOTE"
3738 >"shop"</SPAN
3739 > and <SPAN
3740 CLASS="QUOTE"
3741 >"fragile"</SPAN
3742 > aliases are often used for 
3743  <SPAN
3744 CLASS="QUOTE"
3745 >"problem"</SPAN
3746 > sites that require most actions to be disabled 
3747  in order to function properly.&#13;</P
3748 ></DIV
3749 ></DIV
3750 ><DIV
3751 CLASS="SECT2"
3752 ><H2
3753 CLASS="SECT2"
3754 ><A
3755 NAME="FILTERFILE"
3756 >5.5. The Filter File</A
3757 ></H2
3758 ><P
3759 > Any web page can be dynamically modified with the filter file. This
3760  modification can be removal, or re-writing, of any web page content,
3761  including tags and non-visible content. The default filter file is
3762  <TT
3763 CLASS="FILENAME"
3764 >default.filter</TT
3765 >, located in the config directory. </P
3766 ><P
3767 > This is potentially a very powerful feature, and requires knowledge of both 
3768  <SPAN
3769 CLASS="QUOTE"
3770 >"regular expression"</SPAN
3771 > and HTML in order create custom 
3772  filters. But, there are a number of useful filters included with 
3773  <SPAN
3774 CLASS="APPLICATION"
3775 >Privoxy</SPAN
3776 > for many common situations.</P
3777 ><P
3778 > The included example file is divided into sections. Each section begins 
3779  with the <TT
3780 CLASS="LITERAL"
3781 >FILTER</TT
3782 > keyword, followed by the identifier 
3783  for that section, e.g. <SPAN
3784 CLASS="QUOTE"
3785 >"FILTER: webbugs"</SPAN
3786 >. Each section performs
3787  a similar type of filtering, such as <SPAN
3788 CLASS="QUOTE"
3789 >"html-annoyances"</SPAN
3790 >.</P
3791 ><P
3792 > This file uses regular expressions to alter or remove any string in the
3793  target page. The expressions can only operate on one line at a time. Some
3794  examples from the included default <TT
3795 CLASS="FILENAME"
3796 >default.filter</TT
3797 >:</P
3798 ><P
3799 > Stop web pages from displaying annoying messages in the status bar by
3800  deleting such references:</P
3801 ><P
3802 > <TT
3803 CLASS="LITERAL"
3804 >  <P
3805 CLASS="LITERALLAYOUT"
3806 >&nbsp;FILTER:&nbsp;html-annoyances<br>
3807 <br>
3808 &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>
3809 &nbsp;#&nbsp;bar.&nbsp;Make&nbsp;it&nbsp;so.<br>
3810 &nbsp;#<br>
3811 &nbsp;s/resizable="?(no|0)"?/resizable=1/ig&nbsp;s/noresize/yesresize/ig<br>
3812 &nbsp;s/location="?(no|0)"?/location=1/ig&nbsp;s/status="?(no|0)"?/status=1/ig<br>
3813 &nbsp;s/scrolling="?(no|0|Auto)"?/scrolling=1/ig<br>
3814 &nbsp;s/menubar="?(no|0)"?/menubar=1/ig&nbsp;<br>
3815 <br>
3816 &nbsp;#&nbsp;The&nbsp;&#60;BLINK&#62;&nbsp;tag&nbsp;was&nbsp;a&nbsp;crime!<br>
3817 &nbsp;#<br>
3818 &nbsp;s*&#60;blink&#62;|&#60;/blink&#62;**ig<br>
3819 <br>
3820 &nbsp;#&nbsp;Is&nbsp;this&nbsp;evil?&nbsp;<br>
3821 &nbsp;#<br>
3822 &nbsp;#s/framespacing="?(no|0)"?//ig<br>
3823 &nbsp;#s/margin(height|width)=[0-9]*//gi<br>
3824 &nbsp;&nbsp;&nbsp;</P
3825
3826  </TT
3827 ></P
3828 ><P
3829 > Just for kicks, replace any occurrence of <SPAN
3830 CLASS="QUOTE"
3831 >"Microsoft"</SPAN
3832 > with
3833  <SPAN
3834 CLASS="QUOTE"
3835 >"MicroSuck"</SPAN
3836 >, and have a little fun with topical buzzwords: </P
3837 ><P
3838 > <TT
3839 CLASS="LITERAL"
3840 >  <P
3841 CLASS="LITERALLAYOUT"
3842 >&nbsp;FILTER:&nbsp;fun<br>
3843 <br>
3844 &nbsp;s/microsoft(?!.com)/MicroSuck/ig<br>
3845 <br>
3846 &nbsp;#&nbsp;Buzzword&nbsp;Bingo:<br>
3847 &nbsp;#<br>
3848 &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>
3849 &nbsp;&nbsp;&nbsp;</P
3850
3851  </TT
3852 ></P
3853 ><P
3854 > Kill those pesky little web-bugs:</P
3855 ><P
3856 > <TT
3857 CLASS="LITERAL"
3858 >  <P
3859 CLASS="LITERALLAYOUT"
3860 >&nbsp;#&nbsp;webbugs:&nbsp;Squish&nbsp;WebBugs&nbsp;(1x1&nbsp;invisible&nbsp;GIFs&nbsp;used&nbsp;for&nbsp;user&nbsp;tracking)<br>
3861 &nbsp;FILTER:&nbsp;webbugs<br>
3862 <br>
3863 &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>
3864 &nbsp;&nbsp;&nbsp;</P
3865
3866  </TT
3867 ></P
3868 ></DIV
3869 ><DIV
3870 CLASS="SECT2"
3871 ><H2
3872 CLASS="SECT2"
3873 ><A
3874 NAME="AEN1351"
3875 >5.6. Templates</A
3876 ></H2
3877 ><P
3878 > When <SPAN
3879 CLASS="APPLICATION"
3880 >Privoxy</SPAN
3881 > displays one of its internal 
3882  pages, such as a 404 Not Found error page, it uses the appropriate template.
3883  On Linux, BSD, and Unix, these are located in
3884  <TT
3885 CLASS="FILENAME"
3886 >/etc/privoxy/templates</TT
3887 > by default. These may be
3888  customized, if desired.</P
3889 ><P
3890 > The default <SPAN
3891 CLASS="QUOTE"
3892 >"Blocked"</SPAN
3893 > banner page with the bright red top 
3894  banner, is called just <SPAN
3895 CLASS="QUOTE"
3896 >"<TT
3897 CLASS="FILENAME"
3898 >blocked</TT
3899 >"</SPAN
3900 >. This 
3901  may be customized or replaced with something else if desired.&#13;</P
3902 ></DIV
3903 ></DIV
3904 ><DIV
3905 CLASS="NAVFOOTER"
3906 ><HR
3907 ALIGN="LEFT"
3908 WIDTH="100%"><TABLE
3909 WIDTH="100%"
3910 BORDER="0"
3911 CELLPADDING="0"
3912 CELLSPACING="0"
3913 ><TR
3914 ><TD
3915 WIDTH="33%"
3916 ALIGN="left"
3917 VALIGN="top"
3918 ><A
3919 HREF="quickstart.html"
3920 >Prev</A
3921 ></TD
3922 ><TD
3923 WIDTH="34%"
3924 ALIGN="center"
3925 VALIGN="top"
3926 ><A
3927 HREF="index.html"
3928 >Home</A
3929 ></TD
3930 ><TD
3931 WIDTH="33%"
3932 ALIGN="right"
3933 VALIGN="top"
3934 ><A
3935 HREF="contact.html"
3936 >Next</A
3937 ></TD
3938 ></TR
3939 ><TR
3940 ><TD
3941 WIDTH="33%"
3942 ALIGN="left"
3943 VALIGN="top"
3944 >Quickstart to Using <SPAN
3945 CLASS="APPLICATION"
3946 >Privoxy</SPAN
3947 ></TD
3948 ><TD
3949 WIDTH="34%"
3950 ALIGN="center"
3951 VALIGN="top"
3952 >&nbsp;</TD
3953 ><TD
3954 WIDTH="33%"
3955 ALIGN="right"
3956 VALIGN="top"
3957 >Contacting the Developers, Bug Reporting and Feature
3958 Requests</TD
3959 ></TR
3960 ></TABLE
3961 ></DIV
3962 ></BODY
3963 ></HTML
3964 >