e7c6334d520623b8ff4888d46d589b81cf5a095d
[privoxy.git] / doc / source / user-manual.sgml
1 <!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
2 <!--
3 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4  File        :  $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
5
6  Purpose     :  user manual
7                 This file belongs into
8                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
9                 
10  $Id: user-manual.sgml,v 1.2 2001/09/13 15:27:40 swa Exp $
11
12  Written by and Copyright (C) 2001 the SourceForge
13  IJBSWA team.  http://ijbswa.sourceforge.net
14
15  Based on the Internet Junkbuster originally written
16  by and Copyright (C) 1997 Anonymous Coders and 
17  Junkbusters Corporation.  http://www.junkbusters.com
18 -->
19
20 <!--
21 Sun 09/23/01 08:53:31 PM 
22
23 This is an unfinished, rough draft. Anyone reading this, believe let me 
24 know errors!!!!! Stefan, especially you!
25
26 Hal Burgiss <hal@foobox.net>
27 -->
28
29 <article id="index">
30 <artheader>
31 <title>Junkbuster User Manual</title>
32
33 <pubdate>$Id: user-manual.sgml,v 1.2 2001/09/13 15:27:40 swa Exp $</pubdate>
34
35 <authorgroup>
36  <author>
37   <affiliation>
38    <orgname>By: Junkbuster Developers</orgname>
39    </affiliation>
40  </author>
41 </authorgroup>
42
43 <abstract>
44  <para>
45   The user manual gives the users information on how to install and configure
46   <application>Internet Junkbuster</application>. <application>Internet
47   Junkbuster</application> is an application that provides privacy and
48   security to users of the World Wide Web.
49  </para>
50  <para>
51 You can find the latest version of the user manual at  <ulink url="http://ijbswa.sourceforge.net/doc/user-manual/">http://ijbswa.sourceforge.net/doc/user-manual/</ulink>.
52  </para>
53
54  <para>
55   Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>.
56  </para>
57 </abstract>
58
59 </artheader>
60
61
62 <!--   ~~~~~       New section      ~~~~~     -->
63
64 <sect1 id="introduction"><title>Introduction</title>
65 <para>
66  <application>Internet Junkbuster</application> is a web proxy with advanced
67  filtering capabilities for protecting privacy, filtering web page content,
68  managing cookies and removing ads, banners, pop-ups and other obnoxious
69  Internet Junk. <application>Junkbuster</application> has a very flexible
70  configuration and can be customized to suit individual needs and tastes.
71  <application>Internet Junkbuster</application> has application for both 
72  stand-alone systems and multi-user networks.
73 </para>
74
75 <para>
76  This documentation is included with the current development version of
77  <application>Internet Junkbuster</application> and is incomplete at this
78  point. The most up to date reference for the time being is still the comments
79  in the source files and in the individual configuration files. Development
80  of version 3.0 is currently underway, and includes significant changes and
81  enhancements over earlier verions.
82 </para>
83
84 <para>
85  Since this is a development version, there <emphasis>are</emphasis> bugs!
86 </para>
87
88 <!--   ~~~~~       New section      ~~~~~     -->
89
90 <sect2>
91 <title>License</title>
92 <para>
93  <application>Internet Junkbuster</application> is free software; you can
94  redistribute it and/or modify it under the terms of the GNU General Public
95  License as published by the Free Software Foundation; either version 2 of the
96  License, or (at your option) any later version.
97 </para>
98
99 <para>
100  This program is distributed in the hope that it will be useful, but WITHOUT
101  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
102  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
103  details, which is available from <ulink
104  url="http://www.gnu.org/copyleft/gpl.html">the Free Software Foundation,
105  Inc</ulink>, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
106 </para>
107
108 </sect2>
109
110 <!--  ~  End section  ~  -->
111
112
113 <!--   ~~~~~       New section      ~~~~~     -->
114
115 <sect2>
116 <title>History</title>
117 <para>
118  <application>Junkbuster</application> was originally written by <ulink
119  url="http://www.junkbusters.com/ht/en/ijbfaq.html">JunkBusters
120  Corporation</ulink>, and was released as free open-source software under the
121  GNU GPL. <ulink url="http://www.waldherr.org/junkbuster/">Stefan
122  Waldherr</ulink> made many improvements, and started the <ulink
123  url="http://sourceforge.net/projects/ijbswa/">SourceForge project</ulink> to
124  rekindle development. 
125 </para>
126
127 </sect2>
128
129 </sect1>
130
131 <!--  ~  End section  ~  -->
132
133
134 <!--   ~~~~~       New section      ~~~~~     -->
135 <sect1 id="installation"><title>Installation</title>
136 <para>
137  <application>Junkbuster</application> is available as raw source code, or
138  pre-compiled binaries. See the <ulink
139  url="http://sourceforge.net/projects/ijbswa/">Junkbuster Home Page</ulink>
140  for current releases. <application>Junkbuster</application> is also available
141  via <ulink
142  url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/current/">CVS</ulink>.
143  This is the recommended approach at this time.
144 </para>
145
146 <!--   ~~~~~       New section      ~~~~~     -->
147 <sect2 id="installation-source"><title>Source</title>
148 <para>
149  For gzipped tar archives, unpack the source:
150 </para>
151
152 <para>
153  <screen>
154  tar zxvf ijb_source_2.9*
155  cd ijb_source_2.9*
156  </screen>
157 </para>
158
159 <para>
160  For retrieving the current CVS sources, you'll need the CVS 
161  package installed first. To download CVS source:
162 </para>
163
164 <para>
165  <screen>
166   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
167   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current
168   cd current
169  </screen>
170 </para>
171
172 <para>
173  This will create a directory named <filename>current/</filename>, which will 
174  contain the source tree.
175 </para>
176
177 <para>
178  Then, in either case, to build from source:
179 </para>
180
181 <para>
182  <screen>
183  ./configure
184  make
185  su
186  make install
187  </screen>
188 </para>
189
190 <para>
191  For Redhat and SuSE Linux RPM packages, see below.
192 </para>
193
194 </sect2>
195
196
197 <!--   ~~~~~       New section      ~~~~~     -->
198 <sect2 id="installation-rh"><title>Red Hat</title>
199 <para>
200  To build Redhat RPM packages, install source as above. Then:
201 </para>
202
203 <para>
204  <screen>
205  ./configure
206  make redhat-dist
207  </screen>
208 </para>
209
210 <para>
211  This will create both binary and src RPMs in the usual places. Example:
212 </para>
213
214 <para>
215  &nbsp;&nbsp;&nbsp;/usr/src/redhat/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
216 </para>
217 <para>
218  &nbsp;&nbsp;&nbsp;/usr/src/redhat/SRPMS/junkbuster-2.9.8-1.src.rpm
219 </para>
220
221 <para>
222  To install, of course:
223 </para>
224
225 <para>
226  <screen>
227  rpm -Uvv /usr/src/redhat/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
228  </screen>
229 </para>
230
231 <para>
232  This will place the <application>Junkbuster</application> configuration 
233  files in <filename>/etc/junkbuster/</filename>, and log files in 
234  <filename>/var/log/junkbuster/</filename>.
235 </para>
236
237 </sect2>
238
239 <!--   ~~~~~       New section      ~~~~~     -->
240 <sect2 id="installation-suse"><title>SuSE</title>
241 <para>
242  To build SuSE RPM packages, install source as above. Then:
243 </para>
244
245 <para>
246  <screen>
247  ./configure
248  make suse-dist
249  </screen>
250 </para>
251
252 <para>
253  This will create both binary and src RPMs in the usual places. Example:
254 </para>
255
256 <para>
257  &nbsp;&nbsp;&nbsp;/usr/src/suse/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
258 </para>
259 <para>
260  &nbsp;&nbsp;&nbsp;/usr/src/suse/SRPMS/junkbuster-2.9.8-1.src.rpm
261 </para>
262
263 <para>
264  To install, of course:
265 </para>
266
267 <para>
268  <screen>
269  rpm -Uvv /usr/src/suse/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
270  </screen>
271 </para>
272
273 <para>
274  This will place the <application>Junkbuster</application> configuration 
275  files in <filename>/etc/junkbuster/</filename>, and log files in 
276  <filename>/var/log/junkbuster/</filename>.
277 </para>
278
279 </sect2>
280
281
282 <!--   ~~~~~       New section      ~~~~~     -->
283 <sect2 id="installation-win"><title>Windows</title>
284 <para>I need help on this. Not a clue here. Also for 
285 configuration section below.
286 </para>
287 </sect2>
288
289 <!--   ~~~~~       New section      ~~~~~     -->
290 <sect2 id="installation-other"><title>Other</title>
291 <para>I need help on this too. OS/2? What others?
292 </para>
293 </sect2>
294
295 </sect1>
296
297 <!--  ~  End section  ~  -->
298
299
300 <!--   ~~~~~       New section      ~~~~~     -->
301 <sect1 id="configuration"><title>Junkbuster Configuration</title>
302 <para>
303  For Unix and Linux, all configuraton files are located in
304  <filename>/etc/junkbuster/</filename> by default. For MS Windows, these 
305  are all in the same directory as the <application>Junkbuster</application>
306  executable. The name and number of configuration files has changed from
307  previous versions, and is subject to change as development progresses.
308 </para>
309
310 <para>
311  The installed defaults provide a reasonable starting point. For the
312  time being, there are only three default configuration files (this will
313  change in time):
314 </para>
315
316 <para>
317  <itemizedlist>
318
319   <listitem>
320    <para>
321      The main configuration file is named <filename>config</filename>
322      on Linux and Unix, and <filename>junkbustr.txt</filename> on Windows.
323    </para>
324   </listitem> 
325
326   <listitem>
327    <para>
328     The <filename>actionsfile</filename> file is used  to define various 
329     actions relating to images, banners, pop-ups, banners and cookies.
330    </para>
331   </listitem> 
332
333   <listitem>
334    <para>
335     The <filename>re_filterfile</filename> file can be used to rewrite the raw
336     page content, including text as well as embedded HTML and JavaScript.
337    </para>
338   </listitem> 
339
340  </itemizedlist>
341 </para>
342
343 <para>
344  <filename>actionsfile</filename> and <filename>re_filterfile</filename> 
345  can use Perl style regular expressions for maximum flexibility. All files use
346  the <quote><literal>#</literal></quote> character to denote a comment. Such
347  lines are not processed by <application>Junkbuster</application>. After
348  making any changes, restart <application>Junkbuster</application> in order
349  for the changes to take effect.
350 </para>
351
352
353 <!--   ~~~~~       New section      ~~~~~     -->
354
355 <sect2>
356 <title>The Main Configuration File</title>
357 <para>
358  Again, the main configuration file is named <filename>config</filename> on
359  Linux and Unix, and <filename>junkbustr.txt</filename> on Windows.
360  Configuration lines consist of an initial keyword followed by a list of
361  values, all separated by whitespace (any number of spaces or tabs). For
362  example:
363 </para>
364
365 <para>
366  <literal>
367   <MSGText> 
368    <literallayout>
369   <emphasis>blockfile blocklist.ini</emphasis>
370    </literallayout>
371   </MSGText> 
372  </literal>
373 </para>
374
375 <para>
376  Indicates that the blockfile is named <quote>blocklist.ini</quote>.
377 </para>
378
379 <para>
380  The <quote><literal>#</literal></quote> indicates a comment.  Any part of a
381  line following a <quote><literal>#</literal></quote> is ignored, except if
382  the <quote><literal>#</literal></quote> is preceded by a
383  <quote><literal>\</literal></quote>.
384 </para>
385
386 <para>
387  Thus, by placing a <quote><literal>#</literal></quote> at the start of an
388  existing configuration line, you can make it a comment and it will be treated
389  as if it weren't there. This is called <quote>commenting out</quote> an
390  option and can be useful to turn off features: If you comment out the
391  <quote>logfile</quote> line, <application>junkbuster</application> will not
392  log to a file at all. Watch for the <quote>default:</quote> section in each
393  explanation to see what happens if the option is left unset (or commented
394  out). 
395 </para>
396
397 <para>
398  Long lines can be continued on the next line by using a
399  <quote><literal>\</literal></quote> as the very last character.
400 </para>
401
402 <para>
403  There are various aspects of <application>Junkbuster</application> behavior 
404  that can be adjusted.
405 </para>
406
407
408 <!--   ~~~~~       New section      ~~~~~     -->
409
410 <sect3>
411 <title>Defining Other Configuration Files</title>
412
413 <para>
414  <application>Junkbuster</application> can use a number of other files to tell it
415  what ads to block, what cookies to accept, etc.  This section of the
416  configuration file tells <application>Junkbuster</application> where to find
417  all those other files. 
418 </para>
419
420 <para>
421  On <application>Windows</application>, <application>Junkbuster</application>
422  looks for these files in the same directory as the executable.  On Unix,
423  <application>Junkbuster</application> looks for these files in the current
424  working directory.  In either case, an absolute path name can be used to
425  avoid problems.
426 </para>
427
428 <para>
429  When development goes modular and multiuser, the blocker, filter, and
430  per-user config will be stored in subdirectories of <quote>confdir</quote>.
431  For now, only <filename>confdir/templates</filename> is used for storing HTML
432  templates for CGI results. 
433 </para>
434
435 <para>
436  The location of the configuration files:
437 </para>
438
439 <para>
440  <literal>
441   <MSGText> 
442    <literallayout>
443   <emphasis>confdir  /etc/junkbuster</emphasis>       # No trailing /, please.
444    </literallayout>
445   </MSGText> 
446  </literal>
447 </para>
448
449 <para>
450  The directory where all logging (i.e. <filename>logfile</filename> and 
451  <filename>jarfile</filename>) takes place. No trailing
452  <quote><literal>/</literal></quote>, please: 
453 </para>
454
455 <para>
456  <literal>
457   <MSGText> 
458    <literallayout>
459   <emphasis>logdir  /var/log/junkbuster</emphasis>
460    </literallayout>
461   </MSGText> 
462  </literal>
463 </para>
464
465 <para>
466  Note that all file specifications below are relative to 
467  the above two directories!
468 </para>
469
470 <para>
471  The <quote>actionsfile</quote> contains patterns to specify the actions to
472  apply to requests for each site. Default: Cookies to and from all
473  destinations are filtered. Popups are disabled for all sites. All sites are
474  filtered if re_filterfile specified. No sites are blocked. An empty image is
475  displayed for filtered ads and other images (formerly
476  <quote>tinygif</quote>). The syntax of this file is explained in detail 
477  <link linkend="actionsfile">below</link>.
478 </para>
479
480 <para>
481  <literal>
482   <MSGText> 
483    <literallayout>
484   <emphasis>actionsfile  actionsfile</emphasis>
485    </literallayout>
486   </MSGText> 
487  </literal>
488 </para>
489
490 <para>
491  The <quote>re_filterfile</quote> file contains content modification rules.
492  These rules permit powerful changes on the content of Web pages, e.g., you
493  could disable your favourite JavaScript annoyances, rewrite the actual
494  content, or just have some fun replacing <quote>Microsoft</quote> with
495  <quote>MicroSuck</quote> wherever it appears on a Web page. Default: No
496  content modification, or whatever the developers are playing with :-/
497 </para>
498
499 <para>
500  <literal>
501   <MSGText> 
502    <literallayout>
503   <emphasis>re_filterfile  re_filterfile</emphasis>
504    </literallayout>
505   </MSGText> 
506  </literal>
507 </para>
508
509 <para>
510  The logfile is where all logging and error messages are written. The logfile
511  can be useful for tracking down a problem with
512  <application>Junkbuster</application> (e.g., it's not blocking an ad you
513  think it should block) but in most cases you probably will never look at it.
514 </para>
515
516 <para>
517  Your logfile will grow indefinitely, and you will probably want to
518  periodically remove it.  On Unix systems, you can do this with a cron job
519  (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command> 
520  script has been included.
521 </para>
522
523 <para>
524  On SuSE Linux systems, you can place a line like <quote>/var/log/junkbuster.*
525  +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
526  the effect that cron.daily will automatically archive, gzip, and empty the
527  log, when it exceeds 1M size.
528 </para>
529
530 <para>
531  Default: Log to the a file named <filename>logfile</filename>. 
532  Comment out to disable logging.
533 </para>
534
535 <para>
536  <literal>
537   <MSGText> 
538    <literallayout>
539   <emphasis>logfile  logfile</emphasis>
540    </literallayout>
541   </MSGText> 
542  </literal>
543 </para>
544
545 <para>
546  The <quote>jarfile</quote> defines where
547  <application>Junkbuster</application> stores the cookies it intercepts.  Note
548  that if you use a <quote>jarfile</quote>, it may grow quite large. Default:
549  Don't store intercepted cookies.
550 </para>
551
552 <para>
553  <literal>
554   <MSGText> 
555    <literallayout>
556   <emphasis>#jarfile  jarfile</emphasis>
557    </literallayout>
558   </MSGText> 
559  </literal>
560 </para>
561
562 <para>
563  If you specify a <quote>trustfile</quote>,
564  <application>Junkbuster</application> will only allow access to sites that
565  are named in the trustfile. You can also mark sites as trusted referrers,
566  with the effect that access to untrusted sites will be granted, if a link
567  from a trusted referrer was used. The link target will then be added to the
568  <quote>trustfile</quote>. This is a very restrictive feature that typical
569  users most propably want to leave disabled. Default: Disabled, don't use the
570  trust mechanism.
571 </para>
572
573 <para>
574  <literal>
575   <MSGText> 
576    <literallayout>
577   <emphasis>#trustfile  trust</emphasis>
578    </literallayout>
579   </MSGText> 
580  </literal>
581 </para>
582  
583 <para>
584  If you use the trust mechanism, it is a good idea to write up some online
585  documentation about your blocking policy and to specify the URL(s) here. They
586  will appear on the page that your users receive when they try to access
587  untrusted content. Use multiple times for multiple URLs. Default: Don't
588  display links on the <quote>untrusted</quote> info page.
589 </para>
590
591 <para>
592  <literal>
593   <MSGText> 
594    <literallayout>
595   <emphasis>trust-info-url http://www.your-site.com/why_we_block.html</emphasis>
596   <emphasis>trust-info-url http://www.your-site.com/what_we_allow.html</emphasis>
597    </literallayout>
598   </MSGText> 
599  </literal>
600 </para>
601
602 </sect3>
603
604 <!--  ~  End section  ~  -->
605
606
607
608 <!--   ~~~~~       New section      ~~~~~     -->
609
610 <sect3>
611 <title>Other Configuration Options</title>
612
613 <para>
614  This part of the configuration file contains options that control how
615  <application>Junkbuster</application> operates.
616 </para>
617
618 <para>
619  <quote>Admin-address</quote> should be set to the email address of the proxy
620  administrator. It is used in many of the proxy-generated pages. Default:
621  fill@me.in.please.
622 </para>
623
624 <para>
625  <literal>
626   <MSGText> 
627    <literallayout>
628   <emphasis>#admin-address  fill@me.in.please</emphasis>
629    </literallayout>
630   </MSGText> 
631  </literal>
632 </para>
633
634 <para>
635  <quote>Proxy-info-url</quote> can be set to a URL that contains more info
636  about this <application>Junkbuster</application> installation, it's
637  configuration and policies. It is used in many of the proxy-generated pages
638  and its use is highly recommended in multi-user installations, since your
639  users will want to know why certain content is blocked or modified. Default:
640  Don't show a link to online documentation.
641 </para>
642
643 <para>
644  <literal>
645   <MSGText> 
646    <literallayout>
647   <emphasis>proxy-info-url  http://www.your-site.com/proxy.html</emphasis>
648    </literallayout>
649   </MSGText> 
650  </literal>
651 </para>
652
653 <para>
654  <quote>Listen-address</quote> specifies the address and port where
655  <application>Junkbuster</application> will listen for connections from your
656  Web browser.  The default is to listen on the localhost port 8000, and
657  this is suitable for most users.  (In your web browser, under proxy
658  configuration, list the proxy server as <quote>localhost</quote> and the
659  port as <quote>8000</quote>).
660 </para>
661
662 <para>
663  If you already have another service running on port 8000, or if you want to
664  serve requests from other machines (e.g. on your local network) as well, you
665  will need to override the default. The syntax is 
666  <quote>listen-address [&lt;ip-address&gt;]:&lt;port&gt;</quote>. If you leave
667  out the IP adress, <application>junkbuster</application> will bind to all
668  interfaces (addresses) on your machine and may become reachable from the
669  internet. In that case, consider using access control lists (acl's) (see
670  <quote>aclfile</quote> above).
671 </para>
672
673 <para>
674  For example, suppose you are running <application>Junkbuster</application> on
675  a machine which has the address 192.168.0.1 on your local private network
676  (192.168.0.0) and has another outside connection with a different address.
677  You want it to serve requests from inside only:
678 </para>
679
680 <para>
681  <literal>
682   <MSGText> 
683    <literallayout>
684   <emphasis>listen-address  192.168.0.1:8000</emphasis>
685    </literallayout>
686   </MSGText> 
687  </literal>
688 </para>
689
690 <para>
691  If you want it to listen on all addresses (including the outside
692  connection):
693 </para>
694
695 <para>
696  <literal>
697   <MSGText> 
698    <literallayout>
699   <emphasis>listen-address  :8000</emphasis>
700    </literallayout>
701   </MSGText> 
702  </literal>
703 </para>
704
705 <para>
706  If you do this, consider using ACLs (see <quote>aclfile</quote> above). Note:
707  you will need to point your browser(s) to the address and port that you have
708  configured here. Default: localhost:8000 (127.0.0.1:8000).
709 </para>
710
711 <para>
712  The debug option sets the level of debugging information to log in the
713  logfile (and to the console in the Windows version).  A debug level of 1 is
714  informative because it will show you each request as it happens.  Higher
715  levels of debug are probably only of interest to developers.
716 </para>
717
718 <Para>
719  <Literal>
720   <MSGText> 
721    <LiteralLayout>
722   debug         1 # GPC   = show each GET/POST/CONNECT request
723   debug         2 # CONN  = show each connection status
724   debug         4 # IO    = show I/O status
725   debug         8 # HDR   = show header parsing
726   debug        16 # LOG   = log all data into the logfile
727   debug        32 # FRC   = debug force feature
728   debug        64 # REF   = debug regular expression filter 
729   debug       128 #       = debug fast redirects
730   debug       256 #       = debug GIF deanimation
731   debug       512 # CLF   = Common Log Format
732   debug      1024 #       = debug kill popups
733   debug      4096 # INFO  = Startup banner and warnings.
734   debug      8192 # ERROR = Non-fatal errors
735     </LiteralLayout>
736   </MSGText>
737  </Literal>
738 </Para>
739
740 <para>
741  It is <emphasis>highly recommended</emphasis> that you enable ERROR
742  reporting (debug 8192), at least until the next stable release.
743 </para>
744
745 <para>
746  The reporting of FATAL errors (i.e. ones which crash 
747  <application>JunkBuster</application>) is always on and cannot be disabled.
748 </para>
749
750 <para>
751  If you want to use CLF (Common Log Format), you should set <quote>debug
752  512</quote> ONLY, do not enable anything else.
753 </para>
754
755 <para>
756  Multiple <quote>debug</quote> directives, are OK - they're logical-OR'd
757  together. 
758 </para>
759
760 <para>
761  <literal>
762   <MSGText> 
763    <literallayout>
764   <emphasis>debug    15     # same as setting the first 4 listed above</emphasis>
765    </literallayout>
766   </MSGText> 
767  </literal>
768 </para>
769
770 <para>
771  Default:
772 </para>
773
774 <para>
775  <literal>
776   <MSGText> 
777    <literallayout>
778   <emphasis>debug   1     # URLs</emphasis>
779   <emphasis>debug   4096  # Info</emphasis>
780   <emphasis>debug   8192  # Errors - *we highly recommended enabling this*</emphasis>
781    </literallayout>
782   </MSGText> 
783  </literal>
784 </para>
785
786 <para>
787  <application>Junkbuster</application> normally uses
788  <quote>multi-threading</quote>, a software technique that permits it to
789  handle many different requests simultaneously. In some cases you may wish to
790  disable this -- particularly if you're trying to debug a problem.  The
791  <quote>single-threaded</quote> option forces
792  <application>Junkbuster</application> to handle requests sequentially.
793  Default: Multi-threaded mode.
794 </para>
795
796 <para>
797  <literal>
798   <MSGText> 
799    <literallayout>
800   <emphasis>#single-threaded</emphasis>
801    </literallayout>
802   </MSGText> 
803  </literal>
804 </para>
805
806 <para>
807  <quote>toggle</quote> allows you to temporarily disable all
808  <application>Junkbuster's</application>  filtering. Just set <quote>toggle
809  0</quote>.
810 </para>
811
812 <para>
813  The Windows version of <application>Junkbuster</application> puts an icon in
814  the system tray, which allows you to change this option without having to
815  edit this file.  If you right-click on that icon (or select the
816  <quote>Options</quote> menu), one choice is <quote>Enable</quote>. Clicking
817  on enable toggles <application>Junkbuster</application> on and off. This is
818  useful if you want to temporarily disable
819  <application>Junkbuster</application>, e.g., to access a site that requires
820  cookies which you normally have blocked.
821 </para>
822
823 <para>
824  <quote>toggle 1</quote> means <application>Junkbuster</application> runs
825  normally, <quote>toggle 0</quote> means that
826  <application>Junkbuster</application> becomes a non-anonymizing non-blocking
827  proxy. Default: 1.
828 </para>
829
830 <para>
831  <literal>
832   <MSGText> 
833    <literallayout>
834   <emphasis>toggle    1</emphasis>
835    </literallayout>
836   </MSGText> 
837  </literal>
838 </para>
839
840 </sect3>
841
842 <!--  ~  End section  ~  -->
843
844
845 <!--   ~~~~~       New section      ~~~~~     -->
846
847 <sect3>
848 <title>Access Control List (ACL)</title>
849 <para>
850  Access controls are included at the request of some ISPs and systems
851  administrators, and are not usually needed by individual users. Please note
852  the warnings in the FAQ that this proxy is not intended to be a substitute
853  for a firewall or to encourage anyone to defer addressing basic security
854  weaknesses.
855 </para>
856
857 <para>
858  If no access settings are specified, the proxy talks to anyone that
859  connects. If any access settings file are specified, then the proxy
860  talks only to IP addresses permitted somewhere in this file and not
861  denied later in this file.
862 </para>
863
864 <para>
865  Summary -- if using an ACL:
866 </para>
867
868  <simplelist>
869   <member>
870    Client must have permission to receive service.
871   </member>
872  </simplelist>
873  <simplelist>
874   <member>
875    LAST match in ACL wins.
876   </member>
877  </simplelist>
878  <simplelist>
879   <member>
880    Default behavior is to deny service.
881   </member>
882  </simplelist>
883
884 <para>
885  The syntax for an entry in the Access Control List is:
886 </para>
887
888 <para>
889  <literal>
890   <MSGText> 
891    <literallayout>
892   ACTION    SRC_ADDR[/SRC_MASKLEN]    [ DST_ADDR[/DST_MASKLEN] ]
893    </literallayout>
894   </MSGText> 
895  </literal>
896 </para>
897
898 <para>
899  Where the individual fields are:
900 </para>
901
902 <para>
903  <literal>
904   <MSGText> 
905    <literallayout>
906  <emphasis>ACTION</emphasis>      = <quote>permit-access</quote> or <quote>deny-access</quote>
907
908  <emphasis>SRC_ADDR</emphasis>    = client hostname or dotted IP address
909  <emphasis>SRC_MASKLEN</emphasis> = number of bits in the subnet mask for the source
910
911  <emphasis>DST_ADDR</emphasis>    = server or forwarder hostname or dotted IP address
912  <emphasis>DST_MASKLEN</emphasis> = number of bits in the subnet mask for the target
913    </literallayout>
914   </MSGText> 
915  </literal>
916 </para>
917
918
919 <para> 
920  The field separator (FS) is whitespace (space or tab).
921 </para>
922
923 <para>
924  IMPORTANT NOTE: If the <application>junkbuster</application> is using a
925  forwarder (see below) or a gateway for a particular destination URL, the
926  <literal>DST_ADDR</literal> that is examined is the address of the forwarder
927  or the gateway and <emphasis>NOT</emphasis> the address of the ultimate
928  target. This is necessary because it may be impossible for the local
929  <application>Junkbuster</application> to determine the address of the
930  ultimate target (that's often what gateways are used for).
931 </para>
932
933 <para>
934  Here are a few examples to show how the ACL features work:
935 </para>
936
937 <para>
938  <quote>localhost</quote> is OK -- no DST_ADDR implies that
939  <emphasis>ALL</emphasis> destination addresses are OK:
940 </para>
941
942 <para>
943  <literal>
944   <MSGText> 
945    <literallayout>
946   <emphasis>permit-access  localhost</emphasis>
947    </literallayout>
948   </MSGText> 
949  </literal>
950 </para>
951
952 <para>
953  A silly example to illustrate permitting any host on the class-C subnet with
954  <application>Junkbuster</application> to go anywhere:
955 </para>
956
957 <para>
958  <literal>
959   <MSGText> 
960    <literallayout>
961   <emphasis>permit-access    www.junkbusters.com/24</emphasis>
962    </literallayout>
963   </MSGText> 
964  </literal>
965 </para>
966
967 <para>
968  Except deny one particular IP address from using it at all:
969 </para>
970
971 <para>
972  <literal>
973   <MSGText> 
974    <literallayout>
975   <emphasis>deny-access      ident.junkbusters.com</emphasis>
976    </literallayout>
977   </MSGText> 
978  </literal>
979 </para>
980
981 <para>
982  You can also specify an explicit network address and subnet mask.
983  Explicit addresses do not have to be resolved to be used.
984 </para>
985
986 <para>
987  <literal>
988   <MSGText> 
989    <literallayout>
990   <emphasis>permit-access    207.153.200.0/24</emphasis>
991    </literallayout>
992   </MSGText> 
993  </literal>
994 </para>
995
996 <para>
997  A subnet mask of 0 matches anything, so the next line permits everyone.
998 </para>
999
1000 <para>
1001  <literal>
1002   <MSGText> 
1003    <literallayout>
1004   <emphasis>permit-access    0.0.0.0/0</emphasis>
1005    </literallayout>
1006   </MSGText> 
1007  </literal>
1008 </para>
1009
1010 <para>
1011  Note, you <emphasis>cannot</emphasis> say:
1012 </para>
1013
1014 <para>
1015  <literal>
1016   <MSGText> 
1017    <literallayout>
1018   <emphasis>permit-access    .org</emphasis>
1019    </literallayout>
1020   </MSGText> 
1021  </literal>
1022 </para>
1023
1024 <para>
1025  to allow all *.org domains. Every IP address listed must resolve fully.
1026 </para>
1027
1028 <para>
1029  An ISP may want to provide a <application>Junkbuster</application> that is
1030  accessible by <quote>the world</quote> and yet restrict use of some of their
1031  private content to hosts on its internal network (i.e. its own subscribers).
1032  Say, for instance the ISP owns the Class-B IP address block 123.124.0.0 (a 16
1033  bit netmask). This is how they could do it:
1034 </para>
1035
1036 <para>
1037  <literal>
1038   <MSGText> 
1039    <literallayout>
1040  <emphasis>permit-access 0.0.0.0/0   0.0.0.0/0</emphasis>   # other clients can go anywhere 
1041                                        # with the following exceptions:
1042  
1043  <emphasis>deny-access</emphasis>   0.0.0.0/0   123.124.0.0/16 # block all external requests for
1044                                           # sites on the ISP's network
1045
1046  <emphasis>permit 0.0.0.0/0   www.my_isp.com</emphasis>        # except for the ISP's main 
1047                                           # web site
1048
1049  <emphasis>permit 123.124.0.0/16 0.0.0.0/0</emphasis>          # the ISP's clients can go 
1050                                           # anywhere
1051    </literallayout>
1052   </MSGText> 
1053  </literal>
1054 </para>
1055
1056 <para>
1057  Note that if some hostnames are listed with multiple IP addresses, 
1058  the primary value returned by DNS (via gethostbyname()) is used. Default:
1059  Anyone can access the proxy.
1060 </para>
1061
1062 </sect3>
1063
1064 <!--  ~  End section  ~  -->
1065
1066
1067 <!--   ~~~~~       New section      ~~~~~     -->
1068
1069 <sect3>
1070 <title>Forwarding</title>
1071
1072 <para>
1073  This feature allows routing of HTTP requests via multiple proxies.
1074  It can be used to better protect privacy and confidentiality when
1075  accessing specific domains by routing requests to those domains
1076  to a special purpose filtering proxy such as lpwa.com.
1077 </para>
1078
1079 <para>
1080  It can also be used in an environment with multiple networks to route
1081  requests via multiple gateways allowing transparent access to multiple
1082  networks without having to modify browser configurations.
1083 </para>
1084
1085 <para>
1086  Also specified here are SOCKS proxies. <application>Junkbuster</application>
1087  SOCKS 4 and SOCKS 4A. The difference is that SOCKS 4A will resolve the target
1088  hostname using DNS on the SOCKS server, not our local DNS client.
1089 </para>
1090
1091 <para>
1092  The syntax of each line is:
1093 </para>
1094
1095 <para>
1096  <literal>
1097   <MSGText> 
1098    <literallayout>
1099  <emphasis>forward target_domain[:port] http_proxy_host[:port]</emphasis>
1100  <emphasis>forward-socks4  target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1101  <emphasis>forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1102    </literallayout>
1103   </MSGText> 
1104  </literal>
1105 </para>
1106
1107 <para>
1108  If http_proxy_host is <quote>.</quote>, then requests are not forwarded to a
1109  HTTP proxy but are made directly to the web servers.
1110 </para>
1111
1112 <para>
1113  Lines are checked in sequence, and the last match wins.
1114 </para>
1115
1116 <para>
1117  There is an implicit line equivalent to the following, which specifies that
1118  anything not finding a match on the list is to go out without forwarding
1119  or gateway protocol, like so:
1120 </para>
1121
1122 <para>
1123  <literal>
1124   <MSGText> 
1125    <literallayout>
1126   <emphasis>forward   .*   .       </emphasis># implicit
1127    </literallayout>
1128   </MSGText> 
1129  </literal>
1130 </para>
1131
1132 <para>
1133  In the following common configuration, everything goes to Lucent's LPWA,
1134  except SSL on port 443 (which it doesn't handle):
1135 </para>
1136
1137 <para>
1138  <literal>
1139   <MSGText> 
1140    <literallayout>
1141  <emphasis>forward   .*     lpwa.com:8000</emphasis>
1142  <emphasis>forward   :443   .</emphasis>
1143    </literallayout>
1144   </MSGText> 
1145  </literal>
1146 </para>
1147
1148 <para>
1149  See the FAQ for instructions on how to automate the login procedure for LPWA.
1150  Some users have reported difficulties related to LPWA's use of
1151  <quote>.</quote> as the last element of the domain, and have said that this
1152  can be fixed with this:
1153 </para>
1154    
1155 <para>
1156  <literal>
1157   <MSGText> 
1158    <literallayout>
1159   <emphasis>forward   lpwa.  lpwa.com:8000</emphasis>
1160    </literallayout>
1161   </MSGText> 
1162  </literal>
1163 </para>
1164  
1165 <para>
1166  (NOTE: the syntax for specifiying target_domain has changed since the
1167  previous paragraph was written -- it will not work now.  More information
1168  is welcome.)
1169 </para>
1170
1171 <para>
1172  In this fictitious example, everything goes via an ISP's caching proxy,
1173  except requests to that ISP:
1174 </para>
1175
1176 <para>
1177  <literal>
1178   <MSGText> 
1179    <literallayout>
1180  <emphasis>forward    .*         caching.myisp.net:8000</emphasis>
1181  <emphasis>forward    myisp.net  .</emphasis>
1182    </literallayout>
1183   </MSGText> 
1184  </literal>
1185 </para>
1186
1187 <para>
1188  For the @home network, we're told the forwarding configuration is this:
1189 </para>
1190
1191
1192 <para>
1193  <literal>
1194   <MSGText> 
1195    <literallayout>
1196   <emphasis>forward    .*    proxy:8080</emphasis>
1197    </literallayout>
1198   </MSGText> 
1199  </literal>
1200 </para>
1201
1202 <para>
1203  Also, we're told they insist on getting cookies and JavaScript, so you need
1204  to add home.com to the cookie file. We consider JavaScript a security risk.
1205  Java need not be enabled.
1206 </para>
1207
1208 <para>
1209  In this example direct connections are made to all <quote>internal</quote>
1210  domains, but everything else goes through Lucent's LPWA by way of the
1211  company's SOCKS gateway to the Internet.
1212 </para>
1213
1214 <para>
1215  <literal>
1216   <MSGText> 
1217    <literallayout>
1218  <emphasis>forward_socks4  .*  lpwa.com:8000  firewall.my_company.com:1080</emphasis>
1219  <emphasis>forward    my_company.com  .</emphasis>
1220    </literallayout>
1221   </MSGText> 
1222  </literal>
1223 </para>
1224
1225 <para>
1226  This is how you could set up a site that always uses SOCKS but no forwarders:
1227 </para>
1228
1229 <para>
1230  <literal>
1231   <MSGText> 
1232    <literallayout>
1233   <emphasis>forward_socks4a   .*  .  firewall.my_company.com:1080</emphasis>
1234    </literallayout>
1235   </MSGText> 
1236  </literal>
1237 </para>
1238
1239 <para>
1240  An advanced example for network administrators:
1241 </para>
1242
1243 <para>
1244  If you have links to multiple ISPs that provide various special content to
1245  their subscribers, you can configure forwarding to pass requests to the
1246  specific host that's connected to that ISP so that everybody can see all
1247  of the content on all of the ISPs.
1248 </para>
1249
1250 <para>
1251  This is a bit tricky, but here's an example:
1252 </para>
1253
1254
1255 <para>
1256  host-a has a PPP connection to isp-a.com. And host-b has a PPP connection to
1257  isp-b.com. host-a can run a <application>Junkbuster</application> proxy with
1258  forwarding like this: 
1259 </para>
1260
1261 <para>
1262  <literal>
1263   <MSGText> 
1264    <literallayout>
1265  <emphasis>forward    .*         .</emphasis>
1266  <emphasis>forward    isp-b.com  host-b:8000</emphasis>
1267    </literallayout>
1268   </MSGText> 
1269  </literal>
1270 </para>
1271
1272 <para>
1273  host-b can run a <application>Junkbuster</application> proxy with forwarding
1274  like this: 
1275 </para>
1276
1277 <para>
1278  <literal>
1279   <MSGText> 
1280    <literallayout>
1281  <emphasis>forward    .*          .</emphasis>
1282  <emphasis>forward    isp-a.com   host-a:8000</emphasis>
1283    </literallayout>
1284   </MSGText> 
1285  </literal>
1286 </para>
1287
1288 <para>
1289  Now, <emphasis>anyone</emphasis> on the Internet (including users on host-a
1290  and host-b) can set their browser's proxy to <emphasis>either</emphasis>
1291  host-a or host-b and be able to browse the content on isp-a or isp-b.
1292 </para>
1293
1294 <para>
1295  Here's another practical example, for University of Kent at
1296  Canterbury students with a network connection in their room, who
1297  need to use the University's Squid web cache.
1298 </para>
1299
1300 <para>
1301  <literal>
1302   <MSGText> 
1303    <literallayout>
1304  <emphasis>forward  *. ssbcache.ukc.ac.uk:3128</emphasis>  # Use the proxy, except for:
1305  <emphasis>forward  .ukc.ac.uk            .    </emphasis> # Anything on the same domain as us
1306  <emphasis>forward  *                     .    </emphasis> # Host with no domain specified
1307  <emphasis>forward  129.12.*.*            .    </emphasis> # A dotted IP on our /16 network.
1308  <emphasis>forward  127.*.*.*             .    </emphasis> # Loopback address
1309  <emphasis>forward  localhost.localdomain .    </emphasis> # Loopback address
1310  <emphasis>forward  www.ukc.mirror.ac.uk  .    </emphasis> # Specific host
1311    </literallayout>
1312   </MSGText> 
1313  </literal>
1314 </para>
1315
1316 <para>
1317  If you intend to chain <application>Junkbuster</application> and 
1318  <application>squid</application> locally, then chain as 
1319  <literal>browser -> squid -> junkbuster</literal> is the recommended way. 
1320 </para>
1321
1322 <para>
1323  Your squid configuration could then look like this:
1324 </para>
1325
1326 <para>
1327  <literal>
1328   <MSGText> 
1329    <literallayout>
1330   # Define junkbuster as parent cache 
1331   cache_peer 127.0.0.1 8000 parent 0 no-query 
1332
1333   # Define ACL for protocol FTP 
1334   acl FTP proto FTP 
1335
1336   # Do not forward ACL FTP to junkbuster 
1337   always_direct allow FTP 
1338
1339   # Do not forward ACL CONNECT (https) to junkbuster 
1340   always_direct allow CONNECT 
1341
1342   # Forward the rest to junkbuster 
1343   never_direct allow all 
1344    </literallayout>
1345   </MSGText> 
1346  </literal>
1347 </para>
1348
1349 </sect3>
1350
1351 <!--  ~  End section  ~  -->
1352
1353
1354 <!--   ~~~~~       New section      ~~~~~     -->
1355
1356 <sect3>
1357 <title>Windows GUI Options</title>
1358 <!--
1359 Removed references to Win32. HB 09/23/01
1360 -->
1361 <para>
1362  <application>Junkbuster</application> has a number of options specific to the
1363  Windows GUI interface:
1364 </para>
1365
1366 <para>
1367  If <quote>activity-animation</quote> is set to 1, the
1368  <application>Junkbuster</application> icon will animate when
1369  <quote>Junkbuster</quote> is active. To turn off, set to 0.
1370 </para>
1371
1372 <para>
1373  <literal>
1374   <MSGText> 
1375    <literallayout>
1376   <emphasis>activity-animation   1</emphasis>
1377    </literallayout>
1378   </MSGText> 
1379  </literal>
1380 </para>
1381
1382 <para>
1383  If <quote>log-messages</quote> is set to 1,
1384  <application>Junkbuster</application> will log messages to the console
1385  window:
1386 </para>
1387
1388 <para>
1389  <literal>
1390   <MSGText> 
1391    <literallayout>
1392   <emphasis>log-messages       1</emphasis>
1393    </literallayout>
1394   </MSGText> 
1395  </literal>
1396 </para>
1397
1398 <para> 
1399  If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
1400  i.e. the amount of memory used for the log messages displayed in the
1401  console window, will be limited to <quote>log-max-lines</quote> (see below).
1402 </para>
1403
1404 <para>
1405  Warning: Setting this to 0 will result in the buffer to grow infinitely and
1406  eat up all your memory!
1407 </para>
1408
1409 <para>
1410  <literal>
1411   <MSGText> 
1412    <literallayout>
1413   <emphasis>log-buffer-size      1</emphasis>
1414    </literallayout>
1415   </MSGText> 
1416  </literal>
1417 </para>
1418
1419 <para>
1420  <application>log-max-lines</application> is the maximum number of lines held
1421  in the log buffer. See above.
1422 </para>
1423
1424 <para>
1425  <literal>
1426   <MSGText> 
1427    <literallayout>
1428   <emphasis>log-max-lines      200</emphasis>
1429    </literallayout>
1430   </MSGText> 
1431  </literal>
1432 </para>
1433
1434 <para>
1435  If <quote>log-highlight-messages</quote> is set to 1,
1436  <application>Junkbuster</application> will highlight portions of the log
1437  messages with a bold-faced font:
1438 </para>
1439
1440 <para>
1441  <literal>
1442   <MSGText> 
1443    <literallayout>
1444   <emphasis>log-highlight-messages   1</emphasis>
1445    </literallayout>
1446   </MSGText> 
1447  </literal>
1448 </para>
1449
1450 <para>
1451  The font used in the console window:
1452 </para>
1453
1454 <para>
1455  <literal>
1456   <MSGText> 
1457    <literallayout>
1458   <emphasis>log-font-name        Comic Sans MS</emphasis>
1459    </literallayout>
1460   </MSGText> 
1461  </literal>
1462 </para>
1463
1464 <para>
1465  Font size used in the console window:
1466 </para>
1467
1468 <para>
1469  <literal>
1470   <MSGText> 
1471    <literallayout>
1472   <emphasis>log-font-size        8</emphasis>
1473    </literallayout>
1474   </MSGText> 
1475  </literal>
1476 </para>
1477
1478 <para>  
1479  <quote>show-on-task-bar</quote> controls whether or not
1480  <application>Junkbuster</application> will appear as a button on the Task bar
1481  when minimized:
1482 </para>
1483
1484 <para>
1485  <literal>
1486   <MSGText> 
1487    <literallayout>
1488   <emphasis>show-on-task-bar     0</emphasis>
1489    </literallayout>
1490   </MSGText> 
1491  </literal>
1492 </para>
1493
1494 <para>
1495  If <quote>close-button-minimizes</quote> is set to 1, the Windows close
1496  button will minimize <application>Junkbuster</application> instead of closing
1497  the program (close with the exit option on the File menu).
1498 </para>
1499
1500 <para>
1501  <literal>
1502   <MSGText> 
1503    <literallayout>
1504   <emphasis>close-button-minimizes  1</emphasis>
1505    </literallayout>
1506   </MSGText> 
1507  </literal>
1508 </para>
1509
1510 <para>
1511  The <quote>hide-console</quote> option is specific to the MS-Win console
1512  version of <application>JunkBuster</application>. If this option is used,
1513  <application>Junkbuster</application> will disconnect from and hide  the
1514  command console.
1515 </para>
1516
1517 <para>
1518  <literal>
1519   <MSGText> 
1520    <literallayout>
1521   #hide-console
1522    </literallayout>
1523   </MSGText> 
1524  </literal>
1525 </para>
1526
1527 </sect3>
1528 </sect2>
1529
1530 <!--  ~  End section  ~  -->
1531
1532
1533 <!--   ~~~~~       New section      ~~~~~     -->
1534 <sect2 id="actionsfile">
1535 <title>The Actions File</title>
1536
1537 <para>
1538  The <quote>actionsfile</quote> is used to define what actions
1539  <application>Junkbuster</application> takes, and thus determines how images,
1540  cookies and various other aspects of HTTP content and transactions are
1541  handled. Images can be anything you want, including ads, banners, or just
1542  some obnoxious image that you would rather not see. Cookies can be accepted
1543  or rejected. The default file is in fact named <filename>actionsfile</filename>.
1544 </para>
1545
1546 <para>
1547  To determine which actions apply to a request, the URL of the request is
1548  compared to all patterns in this file. Every time it matches, the list of
1549  applicable actions for the URL is incrementally updated. You can trace
1550  this process by visiting <ulink
1551  url="http://i.j.b/show-url-info">http://i.j.b/show-url-info</ulink>. 
1552 </para>
1553
1554 <para>
1555  There are four types of lines in this file: comments (begin with a 
1556  <quote>#</quote> character), actions, aliases and patterns, all of which are
1557  explained below.
1558 </para>
1559
1560
1561 <!--   ~~~~~       New section      ~~~~~     -->
1562 <sect3>
1563 <title>URL Domain and Path Syntax</title>
1564 <para>
1565  Generally, a pattern has the form &lt;domain&gt;/&lt;path&gt;, where both the
1566  &lt;domain&gt; and &lt;path&gt; part are optional. If you only specify a
1567  domain part, the <quote>/</quote> can be left out:
1568 </para>
1569
1570 <para>
1571  <emphasis>www.example.com</emphasis> - is a domain only pattern and will match any request to
1572  <quote>www.example.com</quote>.
1573 </para>
1574
1575 <para>
1576  <emphasis>www.example.com/</emphasis> - means exactly the same.
1577 </para>
1578
1579 <para>
1580  <emphasis>www.example.com/index.html</emphasis> - matches only the single
1581  document <quote>/index.html</quote> on <quote>www.example.com</quote>.
1582 </para>
1583
1584 <para>
1585  <emphasis>/index.html</emphasis> - matches the document <quote>/index.html</quote>, regardless of
1586  the domain.
1587 </para>
1588
1589 <para>
1590  <emphasis>index.html</emphasis> - matches nothing, since it would be
1591  interpreted as a domain name and there is no top-level domain called
1592  <quote>.html</quote>.
1593 </para>
1594
1595 <para>
1596  The matching of the domain part offers some flexible options: if the
1597  domain starts or ends with a dot, it becomes unanchored at that end. 
1598  For example:
1599 </para>
1600
1601 <para>
1602  <emphasis>.example.com</emphasis> - matches any domain that <emphasis>ENDS</emphasis> in 
1603  <quote>.example.com</quote>.
1604 </para>
1605
1606 <para>
1607  <emphasis>www.</emphasis> - matches any domain that <emphasis>STARTS</emphasis> with
1608  <quote>www</quote>.
1609 </para>
1610
1611 <para>
1612  Additionally, there are wildcards that you can use in the domain names
1613  themselves. They work pretty similar to shell wildcards: <quote>*</quote>
1614  stands for zero or more arbitrary characters, <quote>?</quote> stands for
1615  any single character. And you can define charachter classes in square
1616  brackets and they can be freely mixed:
1617 </para>
1618
1619 <para>
1620  <emphasis>ad*.example.com</emphasis> - matches <quote>adserver.example.com</quote>, 
1621  <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>.
1622 </para>
1623
1624 <para>
1625  <emphasis>*ad*.example.com</emphasis> - matches all of the above, and then some.
1626 </para>
1627
1628 <para>
1629  <emphasis>.?pix.com</emphasis> - matches <quote>www.ipix.com</quote>,
1630  <quote>pictures.epix.com</quote>, <quote>a.b.c.d.e.upix.com</quote>, etc. 
1631 </para>
1632
1633 <para>
1634  <emphasis>www[1-9a-ez].example.com</emphasis> - matches <quote>www1.example.com</quote>, 
1635  <quote>www4.example.com</quote>, <quote>wwwd.example.com</quote>, 
1636  <quote>wwwz.example.com</quote>, etc., but <emphasis>not</emphasis> 
1637  <quote>wwww.example.com</quote>.
1638 </para>
1639
1640 <para>
1641  If <application>Junkbuster</application> was compiled with
1642  <quote>pcre</quote> support (default), Perl compatible regular expressions
1643  can be used. See the <filename>pcre/docs/</filename> direcory or <quote>man
1644  perlre</quote> (also available on  <ulink
1645  url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>)
1646  for details. A brief discussion of regular expressions is in the 
1647  <link linkend="regex">Appendix</link>. For instance:
1648 </para>
1649
1650 <para>
1651  <emphasis>/.*/advert[0-9]+\.jpe?g</emphasis>  - would match a URL from any
1652  domain, with any path that includes <quote>advert</quote> followed
1653  immediately by one or more digits, then a <quote>.</quote> and ending in
1654  either <quote>jpeg</quote> or <quote>jpg</quote>. So we match
1655  <quote>example.com/ads/advert2.jpg</quote>, and
1656  <quote>www.example.com/ads/banners/advert39.jpeg</quote>, but not
1657  <quote>www.example.com/ads/banners/advert39.gif</quote> (no gifs in the
1658  example pattern).
1659 </para>
1660
1661 <para>
1662  Please note that matching in the path is case
1663  <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
1664  sensitive at any point in the pattern by using the 
1665  <quote>(?-i)</quote> switch:
1666 </para>
1667
1668 <para>
1669  <emphasis>www.example.com/(?-i)PaTtErN.*</emphasis> - will match only
1670  documents whose path starts with <quote>PaTtErN</quote> in
1671  <emphasis>exactly</emphasis> this capitalization.
1672 </para>
1673
1674 </sect3>
1675
1676 <!--  ~  End section  ~  -->
1677
1678
1679
1680 <!--   ~~~~~       New section      ~~~~~     -->
1681
1682 <sect3>
1683 <title>Actions</title>
1684 <para>
1685  Actions are enabled if preceded with a <quote>+</quote>, and disabled if 
1686  preceded with a <quote>-</quote>. Actions are invoked by enclosing the 
1687  action name in curly braces (e.g. {+some_action}), followed by a list of 
1688  URLs to which the action applies. There are three classes of actions:
1689 </para>
1690
1691 <para>
1692  <itemizedlist>
1693
1694  <listitem>
1695   <para>  
1696    Boolean (e.g. <quote>+/-block</quote>):
1697   </para>
1698   <para>
1699    <literal>
1700     <MSGText> 
1701      <literallayout>
1702   <emphasis>{+name}</emphasis>        # enable this action
1703   <emphasis>{-name}</emphasis>        # disable this action
1704      </literallayout>
1705     </MSGText> 
1706    </literal>
1707   </para>
1708  </listitem>
1709
1710
1711  <listitem>
1712   <para>  
1713    Parameterized (e.g. <quote>+/-hide-user-agent</quote>):
1714   </para>
1715   <para>
1716    <literal>
1717     <MSGText> 
1718      <literallayout>
1719   <emphasis>{+name{param}}</emphasis>  # enable action and set parameter to <quote>param</quote>
1720   <emphasis>{-name}</emphasis>         # disable action
1721      </literallayout>
1722     </MSGText> 
1723    </literal>
1724   </para>
1725  </listitem>
1726  
1727  <listitem>
1728   <para>  
1729    Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
1730   </para>
1731   <para>
1732    <literal>
1733     <MSGText> 
1734      <literallayout>
1735   <emphasis>{+name{param}}</emphasis>   # enable action and add parameter <quote>param</quote>
1736   <emphasis>{-name{param}}</emphasis>   # remove the parameter <quote>param</quote>
1737   <emphasis>{-name}</emphasis>          # disable this action totally
1738      </literallayout>
1739     </MSGText> 
1740    </literal>
1741   </para>
1742  </listitem>
1743
1744  </itemizedlist>
1745 </para>
1746
1747 <para>
1748  If nothing is specified in this file, no <quote>actions</quote> are taken.
1749  So in this case <application>JunkBuster</application> would just be a
1750  normal, non-blocking, non-anonymizing proxy. You must specifically
1751  enable the privacy and blocking features you need (although the 
1752  provided default <filename>actionsfile</filename> file will 
1753  give a good starting point).
1754 </para>
1755
1756 <para>
1757  Later defined actions always over-ride earlier ones.  For multi-valued
1758  actions, the actions are applied in the order they are specified.
1759 </para>
1760
1761 <para>
1762  The list of valid <application>Junkbuster</application> <quote>actions</quote> are:
1763 </para>
1764
1765 <para>
1766  <itemizedlist>
1767  
1768  <listitem>
1769   <para>  
1770    Add the specified HTTP header, which is not checked for validity.
1771    You may specify this many times to specify many different headers:
1772   </para>
1773   <para>
1774    <literal>
1775     <MSGText> 
1776      <literallayout>
1777   <emphasis>+add-header{Name: value}</emphasis>
1778      </literallayout>
1779     </MSGText> 
1780    </literal>
1781   </para>
1782  </listitem>
1783  
1784  
1785  <listitem>
1786   <para>  
1787    Block this URL totally.
1788   </para>
1789   <para>
1790    <literal>
1791     <MSGText> 
1792      <literallayout>
1793   <emphasis>+block</emphasis>
1794      </literallayout>
1795     </MSGText> 
1796    </literal>
1797   </para>
1798  </listitem>
1799  
1800  
1801  <listitem>
1802   <para>  
1803    De-animate all animated GIF images, i.e. reduce them to their last frame.
1804    This will also shrink the images considerably (in bytes, not pixels!). If
1805    the option <quote>first</quote> is given, the first frame of the animation
1806    is used as the replacement. If <quote>last</quote> is given, the last frame
1807    of the animation is used instead, which propably makes more sense for most
1808    banner animations, but also has the risk of not showing the entire last
1809    frame (if it is only a delta to an earlier frame).
1810   </para>
1811   <para>
1812    <literal>
1813     <MSGText> 
1814      <literallayout>
1815   <emphasis>+deanimate-gifs{last}</emphasis>
1816   <emphasis>+deanimate-gifs{first}</emphasis>
1817      </literallayout>
1818     </MSGText> 
1819    </literal>
1820   </para>
1821  </listitem>
1822    
1823  <listitem>
1824   <para>  
1825    Many sites, like yahoo.com, don't just link to other sites. Instead, they
1826    will link to some script on their own server, giving the destination as a
1827    parameter, which will then redirect you to the final target. URLs resulting
1828    from this scheme typically look like:
1829    http://some.place/some_script?http://some.where-else.
1830   </para>
1831   <para>
1832    Sometimes, there are even multiple consecutive redirects encoded in the
1833    URL. These redirections via scripts make your web browing more traceable,
1834    since the server from which you follow such a link can see where you go to.
1835    Apart from that, valuable bandwidth and time is wasted, while your browser
1836    ask the server for one redirect after the other. Plus, it feeds the
1837    advertisers.
1838   </para>
1839   <para>
1840    The <quote>+fast-redirects</quote> option enables interception of these
1841    requests by <application>Junkbuster</application>, who will cut off all but
1842    the last valid URL in the request and send a local redirect back to your
1843    browser without contacting the remote site.
1844   </para>
1845   <para>
1846    <literal>
1847     <MSGText> 
1848      <literallayout>
1849   <emphasis>+fast-redirects</emphasis>
1850      </literallayout>
1851     </MSGText> 
1852    </literal>
1853   </para>
1854  </listitem>
1855
1856  <listitem>
1857   <para>  
1858    Filter the website through the re_filterfile:
1859   </para>
1860   <para>
1861    <literal>
1862     <MSGText> 
1863      <literallayout>
1864  <emphasis>+filter{filename}</emphasis>
1865      </literallayout>
1866     </MSGText> 
1867    </literal>
1868   </para>
1869  </listitem>
1870
1871  <listitem>
1872   <para>  
1873    Block any existing X-Forwarded-for header, and do not add a new one:
1874   </para>
1875   <para>
1876    <literal>
1877     <MSGText> 
1878      <literallayout>
1879   <emphasis>+hide-forwarded</emphasis>
1880      </literallayout>
1881     </MSGText> 
1882    </literal>
1883   </para>
1884  </listitem>
1885
1886  <listitem>
1887   <para>  
1888    If the browser sends a <quote>From:</quote> header containing your e-mail
1889    address, this either completely removes the header (<quote>block</quote>), or
1890    changes it to the specified e-mail address.
1891   </para>
1892   <para>
1893    <literal>
1894     <MSGText> 
1895      <literallayout>
1896   <emphasis>+hide-from{block}</emphasis>
1897   <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
1898      </literallayout>
1899     </MSGText> 
1900    </literal>
1901   </para>
1902  </listitem>
1903  
1904  <listitem>
1905   <para>  
1906    Don't send the <quote>Referer:</quote> (sic) header to the web site.  You
1907    can block it, forge a URL to the same server as the request (which is
1908    preferred because some sites will not send images otherwise) or set it to a
1909    constant string of your choice.
1910   </para>
1911   <para>
1912    <literal>
1913     <MSGText> 
1914      <literallayout>
1915   <emphasis>+hide-referer{block}</emphasis>
1916   <emphasis>+hide-referer{forge}</emphasis>
1917   <emphasis>+hide-referer{http://nowhere.com}</emphasis>
1918      </literallayout>
1919     </MSGText> 
1920    </literal>
1921   </para>
1922  </listitem>
1923  
1924  <listitem>
1925   <para>  
1926    Alternative spelling of <quote>+hide-referer</quote>.  It has the same
1927    parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
1928    (<quote>referrer</quote> is the correct English spelling, however the HTTP
1929    specification has a bug - it requires it to be spelled <quote>referer</quote>.) 
1930   </para>
1931   <para>
1932    <literal>
1933     <MSGText> 
1934      <literallayout>
1935   <emphasis>+hide-referrer{...}</emphasis>
1936      </literallayout>
1937     </MSGText> 
1938    </literal>
1939   </para>
1940  </listitem>
1941
1942  <listitem>
1943   <para>  
1944    Change the <quote>User-Agent:</quote> header so web servers can't tell your
1945    browser type.  Warning! This breaks many web sites.  Specify the
1946    user-agent value you want. Example, pretend to be using Netscape on
1947    Linux:
1948   </para>
1949   <para>
1950    <literal>
1951     <MSGText> 
1952      <literallayout>
1953   <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
1954      </literallayout>
1955     </MSGText> 
1956    </literal>
1957   </para>
1958  <!-- 
1959   <para>
1960    Or to identify yourself explicitly as a <quote>Junkbuster</quote> user:
1961   </para>
1962   <para>
1963    <literal>
1964     <MSGText> 
1965      <literallayout>
1966   <emphasis>+hide-user-agent{JunkBuster/1.0}</emphasis>
1967      </literallayout>
1968     </MSGText> 
1969    </literal>
1970   </para>
1971    (Don't change the version number from 1.0 - after all, why tell them?)
1972   <para>
1973   </para>
1974   <para>
1975    <literal>
1976     <MSGText> 
1977      <literallayout>
1978   <emphasis>+hide-user-agent{browser-type}</emphasis>
1979      </literallayout>
1980     </MSGText> 
1981    </literal>
1982   </para>
1983 -->
1984  </listitem>
1985
1986  <listitem>
1987   <para>  
1988    Treat this URL as an image.  This only matters if it's also <quote>+block</quote>ed,
1989     in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
1990     See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
1991   </para>
1992   <para>
1993    <literal>
1994     <MSGText> 
1995      <literallayout>
1996   <emphasis>+image</emphasis>
1997      </literallayout>
1998     </MSGText> 
1999    </literal>
2000   </para>
2001  </listitem>
2002  
2003  <listitem>
2004   <para>  
2005    Decides what to do with URLs that end up tagged with <quote>{+block
2006    +image}</quote>. There are 4 options.  <quote>-image-blocker</quote> will
2007    send a HTML <quote>blocked</quote> page, usually resulting in a
2008    <quote>broken image</quote> icon.  <quote>+image-blocker{logo}</quote> will
2009    send a <quote>JunkBuster</quote> image.
2010    <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF image.
2011    And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a HTTP
2012    temporary redirect to the specified image. This has the advantage of the
2013    icon being being cached by the browser, which will speed up the display.  
2014   </para>
2015   <para>
2016    <literal>
2017     <MSGText> 
2018      <literallayout>
2019   <emphasis>+image-blocker{logo}</emphasis>
2020   <emphasis>+image-blocker{blank}</emphasis>
2021   <emphasis>+image-blocker{http://i.j.b/send-banner}</emphasis>
2022      </literallayout>
2023     </MSGText> 
2024    </literal>
2025   </para>
2026  </listitem>
2027  
2028  <listitem>
2029   <para>  
2030    Prevent the website from reading cookies:
2031   </para>
2032   <para>
2033    <literal>
2034     <MSGText> 
2035      <literallayout>
2036   <emphasis>+no-cookies-read</emphasis>
2037      </literallayout>
2038     </MSGText> 
2039    </literal>
2040   </para>
2041  </listitem>
2042  
2043  <listitem>
2044   <para>  
2045    Prevent the website from setting cookies:
2046   </para>
2047   <para>
2048    <literal>
2049     <MSGText> 
2050      <literallayout>
2051   <emphasis>+no-cookies-set</emphasis>
2052      </literallayout>
2053     </MSGText> 
2054    </literal>
2055   </para>
2056  </listitem>
2057  
2058  <listitem>
2059   <para>  
2060    Filter the website through a built-in filter to disable those obnoxious 
2061    JavaScript pop-up windows via window.open(), etc. The two alternative
2062    spellings are equivalent.
2063   </para>
2064   <para>
2065    <literal>
2066     <MSGText> 
2067      <literallayout>
2068   <emphasis>+no-popup</emphasis>
2069   <emphasis>+no-popups</emphasis>
2070      </literallayout>
2071     </MSGText> 
2072    </literal>
2073   </para>
2074  </listitem>
2075  
2076  <listitem>
2077   <para>  
2078    This action only applies if you are using a <filename>jarfile</filename>
2079    for saving cookies. It sends a cookie to every site stating that you do not
2080    accept any copyright on cookies sent to you, and asking them not to track
2081    you.  Of course, this is a (relatively) unique header they could use to
2082    track you.
2083   </para>
2084   <para>
2085    <literal>
2086     <MSGText> 
2087      <literallayout>
2088   <emphasis>+vanilla-wafer</emphasis>
2089      </literallayout>
2090     </MSGText> 
2091    </literal>
2092   </para>
2093  </listitem>
2094  
2095  <listitem>
2096   <para>  
2097    This allows you to add an arbitrary cookie. It can be specified multiple
2098    times in order to add as many cookies as you like.
2099   </para>
2100   <para>
2101    <literal>
2102     <MSGText> 
2103      <literallayout>
2104   <emphasis>+wafer{name=value}</emphasis>
2105      </literallayout>
2106     </MSGText> 
2107    </literal>
2108   </para>
2109  </listitem>
2110
2111  </itemizedlist>
2112 </para>
2113
2114 <para>
2115  The meaning of any of the above is reversed by preceding the action with a 
2116  <quote>-</quote>, in place of the <quote>+</quote>.
2117 </para>
2118
2119 <para>
2120  Some examples:
2121 </para>
2122
2123 <para>
2124  Turn off cookies by default, then allow a few through for specified sites:
2125 </para>
2126   
2127 <para>
2128  <literal>
2129   <MSGText> 
2130    <literallayout>
2131  # Turn off all cookies
2132  { +no-cookies-read }
2133  { +no-cookies-set }
2134
2135  # Execeptions to the above, sites that need cookies
2136  { -no-cookies-read }
2137  { -no-cookies-set }
2138  .javasoft.com
2139  .sun.com
2140  .yahoo.com
2141  .msdn.microsoft.com
2142  .redhat.com
2143
2144  # Alternative way of saying the same thing
2145  {-no-cookies-set -no-cookies-read}
2146  .sourceforge.net
2147  .sf.net
2148    </literallayout>
2149   </MSGText> 
2150  </literal>
2151 </para>
2152
2153 <para>
2154  Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
2155 </para>
2156
2157 <para>
2158  <literal>
2159   <MSGText> 
2160    <literallayout>
2161  # Turn them off!
2162  {+fast-redirects}
2163  
2164  # Reverse it for these two sites, which don't work right without it.
2165  {-fast-redirects}
2166  www.ukc.ac.uk/cgi-bin/wac\.cgi\?
2167  login.yahoo.com
2168    </literallayout>
2169   </MSGText> 
2170  </literal>
2171 </para>
2172
2173 <para>
2174  Turn on page filtering, with one exception for sourceforge:
2175 </para>
2176
2177 <para>
2178  <literal>
2179   <MSGText> 
2180    <literallayout>
2181  # Run everything through the default filter file (<filename>re_filterfile</filename>):
2182  {+filter}
2183  
2184  # But please don't re_filter code from sourceforge!
2185  {-filter}
2186  .cvs.sourceforge.net
2187    </literallayout>
2188   </MSGText> 
2189  </literal>
2190 </para>
2191
2192 <para>
2193  Now some URLs that we want <quote>blocked</quote>, ie we won't see them.
2194  Many of these use regular expressions that will expand to match multiple 
2195  URLs:
2196 </para>
2197
2198 <para>
2199  <literal>
2200   <MSGText> 
2201    <literallayout>
2202   # Blocklist:
2203   {+block}
2204   /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
2205   /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
2206   /.*/(ng)?adclient\.cgi
2207   /.*/(plain|live|rotate)[-_.]?ads?/
2208   /.*/(sponsor)s?[0-9]?/
2209   /.*/_?(plain|live)?ads?(-banners)?/
2210   /.*/abanners/
2211   /.*/ad(sdna_image|gifs?)/
2212   /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
2213   /.*/adbanners/
2214   /.*/adserver
2215   /.*/adstream\.cgi
2216   /.*/adv((er)?ts?|ertis(ing|ements?))?/
2217   /.*/banner_?ads/
2218   /.*/banners?/
2219   /.*/banners?\.cgi/
2220   /.*/cgi-bin/centralad/getimage
2221   /.*/images/addver\.gif
2222   /.*/images/marketing/.*\.(gif|jpe?g)
2223   /.*/popupads/
2224   /.*/siteads/
2225   /.*/sponsor.*\.gif
2226   /.*/sponsors?[0-9]?/
2227   /.*/advert[0-9]+\.jpg
2228   /Media/Images/Adds/
2229   /ad_images/
2230   /adimages/
2231   /.*/ads/
2232   /bannerfarm/
2233   /grafikk/annonse/
2234   /graphics/defaultAd/
2235   /image\.ng/AdType
2236   /image\.ng/transactionID
2237   /images/.*/.*_anim\.gif # alvin brattli
2238   /ip_img/.*\.(gif|jpe?g)
2239   /rotateads/
2240   /rotations/ 
2241   /worldnet/ad\.cgi
2242   /cgi-bin/nph-adclick.exe/
2243   /.*/Image/BannerAdvertising/
2244   /.*/ad-bin/
2245   /.*/adlib/server\.cgi
2246   /autoads/
2247    </literallayout>
2248   </MSGText> 
2249  </literal>
2250 </para>
2251
2252 </sect3>
2253
2254 <!--  ~  End section  ~  -->
2255
2256
2257 <!--   ~~~~~       New section      ~~~~~     -->
2258 <sect3>
2259 <title>Aliases</title>
2260 <para>
2261  Custom <quote>actions</quote>, known to <application>Junkbuster</application>
2262  as <quote>aliases</quote>, can be defined by combing other <quote>actions</quote>.
2263  These can in turn be invoked just like the built-in <quote>actions</quote>.
2264  Currently, an alias can contain any character except space, tab, <quote>=</quote>,
2265  <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
2266  <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
2267  <quote>-</quote>. Alias names are not case sensitive, and must be defined 
2268  before they are used.
2269 </para>
2270
2271 <para>
2272  Now let's define a few aliases:
2273 </para>
2274
2275 <para>
2276  <literal>
2277   <MSGText> 
2278    <literallayout>
2279  # Aliases
2280  {{alias}}
2281
2282  # Useful aliases
2283  +no-cookies = +no-cookies-set +no-cookies-read
2284  -no-cookies = -no-cookies-set -no-cookies-read
2285  fragile     = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
2286  shop        = -no-cookies -filter -fast-redirects
2287  +imageblock = +block +image
2288
2289  #For people who don't like to type too much:  ;-)
2290  c0 = +no-cookies
2291  c1 = -no-cookies
2292  c2 = -no-cookies-set +no-cookies-read
2293  c3 = +no-cookies-set -no-cookies-read
2294  #... etc.  Customize to your heart's content.
2295    </literallayout>
2296   </MSGText> 
2297  </literal>
2298 </para>
2299
2300 <para>
2301  Some examples using our <quote>shop</quote> and <quote>fragile</quote>
2302  aliases from above:
2303 </para>
2304
2305 <para>
2306  <literal>
2307   <MSGText> 
2308    <literallayout>
2309  # These sites are very complex and require
2310  # minimal interference.
2311  {fragile}
2312  .office.microsoft.com
2313  .windowsupdate.microsoft.com
2314
2315  # Shopping sites - still want to block ads.
2316  {shop}
2317  .quietpc.com
2318  .worldpay.com   # for quietpc.com
2319  .jungle.com
2320  .scan.co.uk
2321
2322  # These shops require pop-ups
2323  {shop -no-popups}
2324  .dabs.com
2325  .overclockers.co.uk
2326    </literallayout>
2327   </MSGText> 
2328  </literal>
2329 </para>
2330
2331 </sect3>
2332 </sect2>
2333
2334 <!--  ~  End section  ~  -->
2335
2336
2337 <!--   ~~~~~       New section      ~~~~~     -->
2338 <sect2 id="filterfile">
2339 <title>The Filter File</title>
2340 <para>
2341  The filter file defines what filtering of web pages
2342  <application>Junkbuster</application> does. The default filter file is 
2343  <filename>re_filterfile</filename>, located in the config directory. In this 
2344  file, <emphasis>any document content</emphasis>, whether viewable text or
2345  embedded non-visible content, can be changed. 
2346 </para>
2347
2348 <para>
2349  This file uses regular expressions to alter or remove any string in the
2350  target page. Some examples from the included default <filename>re_filterfile</filename>:
2351 </para>
2352
2353 <para>
2354  Stop web pages from displaying annoying messages in the status bar by
2355  deleting such references:
2356 </para>
2357
2358 <para>
2359  <literal>
2360   <MSGText> 
2361    <literallayout>
2362  # The status bar is for displaying link targets, not pointless buzzwords.
2363  # Again, check it out on http://www.airport-cgn.de/.
2364  s/status='.*?';*//ig
2365    </literallayout>
2366   </MSGText> 
2367  </literal>
2368 </para>
2369
2370 <para>
2371  Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
2372  <quote>MicroSuck</quote>: 
2373 </para>
2374
2375 <para>
2376  <literal>
2377   <MSGText> 
2378    <literallayout>
2379  s/microsoft(?!.com)/MicroSuck/ig
2380    </literallayout>
2381   </MSGText> 
2382  </literal>
2383 </para>
2384
2385 <para>
2386  Kill those auto-refresh tags:
2387 </para>
2388
2389 <para>
2390  <literal>
2391   <MSGText> 
2392    <literallayout>
2393  # Kill refresh tags. I like to refresh myself. Manually.
2394  # check it out on http://www.airport-cgn.de/ and go to the arrivals page.
2395  #
2396  s/&lt;meta[^&gt;]*http-equiv[^&gt;]*refresh.*URL=([^&gt;]*?)"?&gt;/&lt;link rev="x-refresh" href=$1&gt;/i
2397  s/&lt;meta[^&gt;]*http-equiv="?page-enter"?[^&gt;]*content=[^&gt;]*&gt;/&lt;!--no page enter for me--&gt;/i
2398    </literallayout>
2399   </MSGText> 
2400  </literal>
2401 </para>
2402
2403 </sect2>
2404
2405 </sect1>
2406
2407 <!--   ~~~~~       New section      ~~~~~     -->
2408 <sect1 id="quickstart"><title>Quickstart to Using Junkbuster</title>
2409 <para>To be filled.
2410 </para>
2411 </sect1>
2412
2413
2414 <!--   ~~~~~       New section      ~~~~~     -->
2415 <sect1 id="contact"><title>Contact the developers</title>
2416 <para>To be filled. mention the support forums as the primary channel of
2417 communication (bugs, feature requests, etc.)
2418 </para>
2419 </sect1>
2420
2421 <!--   ~~~~~       New section      ~~~~~     -->
2422 <sect1 id="copyright"><title>Copyright and History</title>
2423 <para>To be filled.
2424 </para>
2425 </sect1>
2426
2427 <!--   ~~~~~       New section      ~~~~~     -->
2428 <sect1 id="seealso"><title>See also</title>
2429 <para>To be filled.
2430 </para>
2431 </sect1>
2432
2433
2434
2435 <!--   ~~~~~       New section      ~~~~~     -->
2436 <sect1 id="appendix"><title>Appendix</title>
2437
2438
2439 <!--   ~~~~~       New section      ~~~~~     -->
2440 <sect2 id="regex">
2441 <title>Regular Expressions</title>
2442 <para>
2443  WIP
2444 </para>
2445
2446 </sect2>
2447
2448 </sect1>
2449
2450  <!--
2451
2452  This program is free software; you can redistribute it 
2453  and/or modify it under the terms of the GNU General
2454  Public License as published by the Free Software
2455  Foundation; either version 2 of the License, or (at
2456  your option) any later version.
2457
2458  This program is distributed in the hope that it will
2459  be useful, but WITHOUT ANY WARRANTY; without even the
2460  implied warranty of MERCHANTABILITY or FITNESS FOR A
2461  PARTICULAR PURPOSE.  See the GNU General Public
2462  License for more details.
2463
2464  The GNU General Public License should be included with
2465  this file.  If not, you can view it at
2466  http://www.gnu.org/copyleft/gpl.html
2467  or write to the Free Software Foundation, Inc., 59
2468  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2469
2470  $Log: user-manual.sgml,v $
2471  Revision 1.2  2001/09/13 15:27:40  swa
2472  cosmetics
2473
2474  Revision 1.1  2001/09/12 15:36:41  swa
2475  source files for junkbuster documentation
2476
2477  Revision 1.3  2001/09/10 17:43:59  swa
2478  first proposal of a structure.
2479
2480  Revision 1.2  2001/06/13 14:28:31  swa
2481  docs should have an author.
2482
2483  Revision 1.1  2001/06/13 14:20:37  swa
2484  first import of project's documentation for the webserver.
2485
2486  -->
2487
2488 </article>