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