Adding finished docs to CVS
[privoxy.git] / doc / text / user-manual.txt
1
2    output  is  user-manual Using catalogs: /etc/sgml/sgml-docbook-3.1.cat
3    Using stylesheet:
4    /usr/share/sgml/docbook/utils-0.6/docbook-utils.dsl#html  Working  on:
5    /home/hal/junkbuster/current/doc/source/user-manual.sgml
6
7 Junkbuster User Manual
8
9    By: Junkbuster Developers
10
11                                   Abstract
12
13      The user manual gives the users information on how to install and
14     configure Internet Junkbuster. Internet Junkbuster is an application
15      that provides privacy and security to users of the World Wide Web.
16
17            You can find the latest version of the user manual at
18              [1]http://ijbswa.sourceforge.net/doc/user-manual/.
19
20                Feel free to send a note to the developers at
21
22    ijbswa-developers@lists.sourceforge.net
23
24                                      .
25             ____________________________________________________
26
27    Table of Contents
28    [2]Introduction
29    [3]Installation
30    [4]Junkbuster Configuration
31    [5]Quickstart to Using Junkbuster
32    [6]Contact the Developers
33    [7]Copyright and History
34    [8]See also
35    [9]Appendix
36
37 Introduction
38
39    Internet   Junkbuster   is   a   web  proxy  with  advanced  filtering
40    capabilities  for  protecting  privacy,  filtering  web  page content,
41    managing  cookies,  controlling  access,  and  removing  ads, banners,
42    pop-ups  and  other  obnoxious  Internet  Junk.  Junkbuster has a very
43    flexible  configuration and can be customized to suit individual needs
44    and  tastes.  Internet Junkbuster has application for both stand-alone
45    systems and multi-user networks.
46
47    This documentation is included with the current development version of
48    Internet  Junkbuster  and  is incomplete at this point. The most up to
49    date  reference for the time being is still the comments in the source
50    files  and  in  the  individual  configuration  files.  Development of
51    version  3.0  is  currently  underway,  and  includes many significant
52    changes and enhancements over earlier verions. The target release date
53    for stable v3.0 is December 2001.
54
55    Since  this is a development version, some features are in the process
56    of  being  implemented. This documentation may be slightly out of sync
57    as a result. And there are bugs, though hopefully not many!
58      _________________________________________________________________
59
60 New Features
61
62    In  addition  to  Junkbuster's  traditional  features of ad and banner
63    blocking  and  cookie  management,  this  is  a  list  of new features
64    currently under development:
65
66      * Modularized   configuration   that  will  allow  for  system  wide
67        settings, and individual user settings.
68      * A browser based GUI configuration utility (not finished).
69      * Blocking  of annoying pop-up browser windows (previously available
70        as a patch).
71      * Partial support for HTTP/1.1.
72      * Support   for   Perl   Compatible   Regular   Expressions  in  the
73        configuration   files,   and   generally   a   more  sophisticated
74        configuration syntax over previous versions.
75      * Web page content filtering.
76      * Multi-threaded.
77      _________________________________________________________________
78
79 Installation
80
81    Junkbuster  is available as raw source code, or pre-compiled binaries.
82    See  the [10]Junkbuster Home Page for current release info. Junkbuster
83    is  also  available  via  [11]CVS. This is the recommended approach at
84    this time. But please be aware that CVS is constantly changing, and it
85    may break in mysterious ways.
86      _________________________________________________________________
87
88 Source
89
90    For gzipped tar archives, unpack the source:
91
92  tar zxvf ijb_source_2.9*
93  cd ijb_source_2.9*
94
95    For  retrieving  the  current CVS sources, you'll need the CVS package
96    installed first. To download CVS source:
97
98   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
99   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co cu
100 rrent
101   cd current
102
103    This  will  create  a directory named current/, which will contain the
104    source tree.
105
106    Then, in either case, to build from source:
107
108  ./configure
109  make
110  su
111  make install
112
113    For Redhat and SuSE Linux RPM packages, see below.
114      _________________________________________________________________
115
116 Red Hat
117
118    To build Redhat RPM packages, install source as above. Then:
119
120  ./configure
121  make redhat-dist
122
123    This  will  create  both  binary  and  src  RPMs  in the usual places.
124    Example:
125
126       /usr/src/redhat/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
127
128       /usr/src/redhat/SRPMS/junkbuster-2.9.9-1.src.rpm
129
130    To install, of course:
131
132  rpm -Uvv /usr/src/redhat/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
133
134    This    will    place    the   Junkbuster   configuration   files   in
135    /etc/junkbuster/, and log files in /var/log/junkbuster/.
136      _________________________________________________________________
137
138 SuSE
139
140    To build SuSE RPM packages, install source as above. Then:
141
142  ./configure
143  make suse-dist
144
145    This  will  create  both  binary  and  src  RPMs  in the usual places.
146    Example:
147
148       /usr/src/suse/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
149
150       /usr/src/suse/SRPMS/junkbuster-2.9.9-1.src.rpm
151
152    To install, of course:
153
154  rpm -Uvv /usr/src/suse/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
155
156    This    will    place    the   Junkbuster   configuration   files   in
157    /etc/junkbuster/, and log files in /var/log/junkbuster/.
158      _________________________________________________________________
159
160 OS/2
161
162    The  OS/2 version of Junkbuster requires the EMX runtime library to be
163    installed.  The  EMX  runtime  library is available on the hobbes OS/2
164    archive, among many other locations:
165    [12]http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=emx
166    rt.zip&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fdev%2Femx%2Fv0.9d
167
168    Junkbuster  is  packaged  in  a  WarpIN  self- installing archive. The
169    self-installing  program  will  be  named  depending  on  the  release
170    version,  something like: ijbos123.exe. In order to install it, simply
171    run  this executable or double-click on its icon and follow the WarpIN
172    installation  panels.  A  shadow  of the Junkbuster executable will be
173    placed  in your startup folder so it will start automatically whenever
174    OS/2 starts.
175
176    The  directory  you choose to install Junkbuster into will contain all
177    of the configuration files.
178
179    If  you  would  like to build binary images on OS/2 yourself, you will
180    need  a working EMX/GCC environment, plus several Unix-like tools. The
181    Hobbes  OS/2  archive  is  a good place to start when building such an
182    environment.  A  set of Unix-like tools named gnupack is located here:
183    [13]http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&key=gnupack&stype=all
184    &sort=type&dir=%2Fpub%2Fos2%2Fapps
185
186    Once  you  have  the  source code unpacked as above, you can build the
187    binaries from the current/ directory:
188
189  autoconf
190  sh configure
191  make
192      _________________________________________________________________
193
194 Windows
195
196    Click-click.  (I  need  help  on  this.  Not  a  clue  here.  Also for
197    configuration section below. HB.)
198      _________________________________________________________________
199
200 Other
201
202    Some quick notes on other Operating Systems.
203
204    For  FreeBSD  (and other *BSDs?), the build will need gmake instead of
205    the included make. gmake is available from [14]http://www.gnu.org. The
206    rest should be the same as above for Linux/Unix.
207      _________________________________________________________________
208
209 Junkbuster Configuration
210
211    For  Unix,  *BSD  and  Linux,  all  configuraton  files are located in
212    /etc/junkbuster/ by default. For MS Windows and OS/2, these are all in
213    the  same  directory as the Junkbuster executable. The name and number
214    of  configuration  files  has  changed  from previous versions, and is
215    subject to change as development progresses.
216
217    The  installed  defaults  provide a reasonable starting point. For the
218    time  being,  there  are  only three default configuration files (this
219    will change in time):
220
221      * The  main  configuration file is named config on Linux, Unix, BSD,
222        and   OS/2,   and  junkbustr.txt  on  Windows.  On  Amiga,  it  is
223        AmiTCP:db/junkbuster/config.
224      * The actionsfile file is used to define various actions relating to
225        images, banners, pop-ups, banners and cookies.
226      * The  re_filterfile  file  can  be  used  to  rewrite  the raw page
227        content, including text as well as embedded HTML and JavaScript.
228
229    actionsfile  and  re_filterfile can use Perl style regular expressions
230    for  maximum  flexibility. All files use the "#" character to denote a
231    comment.  Such lines are not processed by Junkbuster. After making any
232    changes, restart Junkbuster in order for the changes to take effect.
233      _________________________________________________________________
234
235 The Main Configuration File
236
237    Again,  the  main configuration file is named config on Linux/Unix/BSD
238    and OS/2, and junkbustr.txt on Windows. Configuration lines consist of
239    an  initial  keyword  followed  by  a list of values, all separated by
240    whitespace (any number of spaces or tabs). For example:
241
242      blockfile blocklist.ini
243
244    Indicates that the blockfile is named "blocklist.ini".
245
246    The  "#"  indicates  a  comment. Any part of a line following a "#" is
247    ignored, except if the "#" is preceded by a "\".
248
249    Thus, by placing a "#" at the start of an existing configuration line,
250    you  can  make  it  a  comment and it will be treated as if it weren't
251    there.  This is called "commenting out" an option and can be useful to
252    turn  off  features: If you comment out the "logfile" line, junkbuster
253    will  not  log  to  a file at all. Watch for the "default:" section in
254    each  explanation  to see what happens if the option is left unset (or
255    commented out).
256
257    Long  lines  can  be  continued on the next line by using a "\" as the
258    very last character.
259
260    There are various aspects of Junkbuster behavior that can be adjusted.
261      _________________________________________________________________
262
263 Defining Other Configuration Files
264
265    Junkbuster  can  use  a  number  of other files to tell it what ads to
266    block,  what cookies to accept, etc. This section of the configuration
267    file tells Junkbuster where to find all those other files.
268
269    On  Windows, Junkbuster looks for these files in the same directory as
270    the  executable. On Unix and OS/2, Junkbuster looks for these files in
271    the  current  working directory. In either case, an absolute path name
272    can be used to avoid problems.
273
274    When  development goes modular and multiuser, the blocker, filter, and
275    per-user  config  will  be  stored in subdirectories of "confdir". For
276    now, only confdir/templates is used for storing HTML templates for CGI
277    results.
278
279    The location of the configuration files:
280
281      confdir /etc/junkbuster       # No trailing /, please.
282
283    The  directory  where  all  logging  (i.e.  logfile and jarfile) takes
284    place. No trailing "/", please:
285
286      logdir /var/log/junkbuster
287
288    Note  that all file specifications below are relative to the above two
289    directories!
290
291    The "actionsfile" contains patterns to specify the actions to apply to
292    requests  for each site. Default: Cookies to and from all destinations
293    are  filtered.  Popups  are  disabled  for  all  sites.  All sites are
294    filtered  if  re_filterfile  specified. No sites are blocked. An empty
295    image  is  displayed  for  filtered  ads  and  other  images (formerly
296    "tinygif"). The syntax of this file is explained in detail [15]below.
297
298      actionsfile actionsfile
299
300    The  "re_filterfile"  file  contains content modification rules. These
301    rules  permit  powerful changes on the content of Web pages, e.g., you
302    could disable your favourite JavaScript annoyances, rewrite the actual
303    content,  or just have some fun replacing "Microsoft" with "MicroSuck"
304    wherever  it  appears on a Web page. Default: No content modification,
305    or whatever the developers are playing with :-/
306
307      re_filterfile re_filterfile
308
309    The  logfile  is where all logging and error messages are written. The
310    logfile  can  be  useful  for  tracking down a problem with Junkbuster
311    (e.g.,  it's not blocking an ad you think it should block) but in most
312    cases you probably will never look at it.
313
314    Your  logfile  will  grow  indefinitely, and you will probably want to
315    periodically  remove  it. On Unix systems, you can do this with a cron
316    job  (see  "man  cron").  For  Redhat,  a  logrotate  script  has been
317    included.
318
319    On    SuSE    Linux    systems,    you   can   place   a   line   like
320    "/var/log/junkbuster.*  +1024k  644  nobody.nogroup" in /etc/logfiles,
321    with  the effect that cron.daily will automatically archive, gzip, and
322    empty the log, when it exceeds 1M size.
323
324    Default:  Log  to  the  a  file  named logfile. Comment out to disable
325    logging.
326
327      logfile logfile
328
329    The   "jarfile"   defines  where  Junkbuster  stores  the  cookies  it
330    intercepts. Note that if you use a "jarfile", it may grow quite large.
331    Default: Don't store intercepted cookies.
332
333      #jarfile jarfile
334
335    If  you  specify  a  "trustfile", Junkbuster will only allow access to
336    sites  that  are  named  in  the trustfile. You can also mark sites as
337    trusted referrers, with the effect that access to untrusted sites will
338    be  granted,  if  a  link  from  a trusted referrer was used. The link
339    target  will  then  be  added  to  the  "trustfile".  This  is  a very
340    restrictive  feature  that  typical  users most propably want to leave
341    disabled. Default: Disabled, don't use the trust mechanism.
342
343      #trustfile trust
344
345    If  you  use  the  trust mechanism, it is a good idea to write up some
346    online  documentation  about  your  blocking policy and to specify the
347    URL(s) here. They will appear on the page that your users receive when
348    they  try to access untrusted content. Use multiple times for multiple
349    URLs. Default: Don't display links on the "untrusted" info page.
350
351      trust-info-url http://www.your-site.com/why_we_block.html
352      trust-info-url http://www.your-site.com/what_we_allow.html
353      _________________________________________________________________
354
355 Other Configuration Options
356
357    This  part of the configuration file contains options that control how
358    Junkbuster operates.
359
360    "Admin-address"  should  be  set  to  the  email  address of the proxy
361    administrator.  It  is  used  in  many  of  the proxy-generated pages.
362    Default: fill@me.in.please.
363
364      #admin-address fill@me.in.please
365
366    "Proxy-info-url"  can  be  set  to a URL that contains more info about
367    this  Junkbuster  installation, it's configuration and policies. It is
368    used  in  many  of  the  proxy-generated  pages  and its use is highly
369    recommended in multi-user installations, since your users will want to
370    know why certain content is blocked or modified. Default: Don't show a
371    link to online documentation.
372
373      proxy-info-url http://www.your-site.com/proxy.html
374
375    "Listen-address"  specifies the address and port where Junkbuster will
376    listen for connections from your Web browser. The default is to listen
377    on  the  localhost port 8000, and this is suitable for most users. (In
378    your  web browser, under proxy configuration, list the proxy server as
379    "localhost" and the port as "8000").
380
381    If  you  already  have another service running on port 8000, or if you
382    want  to  serve  requests  from  other  machines  (e.g.  on your local
383    network) as well, you will need to override the default. The syntax is
384    "listen-address  [<ip-address>]:<port>".  If  you  leave  out  the  IP
385    adress,  junkbuster  will  bind  to all interfaces (addresses) on your
386    machine  and  may  become  reachable  from the internet. In that case,
387    consider using access control lists (acl's) (see "aclfile" above).
388
389    For example, suppose you are running Junkbuster on a machine which has
390    the  address  192.168.0.1  on your local private network (192.168.0.0)
391    and  has another outside connection with a different address. You want
392    it to serve requests from inside only:
393
394      listen-address 192.168.0.1:8000
395
396    If  you  want  it  to  listen  on all addresses (including the outside
397    connection):
398
399      listen-address :8000
400
401    If  you  do this, consider using ACLs (see "aclfile" above). Note: you
402    will  need  to  point your browser(s) to the address and port that you
403    have configured here. Default: localhost:8000 (127.0.0.1:8000).
404
405    The debug option sets the level of debugging information to log in the
406    logfile  (and to the console in the Windows version). A debug level of
407    1  is informative because it will show you each request as it happens.
408    Higher levels of debug are probably only of interest to developers.
409
410      debug         1 # GPC   = show each GET/POST/CONNECT request
411      debug         2 # CONN  = show each connection status
412      debug         4 # IO    = show I/O status
413      debug         8 # HDR   = show header parsing
414      debug        16 # LOG   = log all data into the logfile
415      debug        32 # FRC   = debug force feature
416      debug        64 # REF   = debug regular expression filter
417      debug       128 #       = debug fast redirects
418      debug       256 #       = debug GIF deanimation
419      debug       512 # CLF   = Common Log Format
420      debug      1024 #       = debug kill popups
421      debug      4096 # INFO  = Startup banner and warnings.
422      debug      8192 # ERROR = Non-fatal errors
423
424    It is highly recommended that you enable ERROR reporting (debug 8192),
425    at least until the next stable release.
426
427    The  reporting  of  FATAL errors (i.e. ones which crash JunkBuster) is
428    always on and cannot be disabled.
429
430    If you want to use CLF (Common Log Format), you should set "debug 512"
431    ONLY, do not enable anything else.
432
433    Multiple "debug" directives, are OK - they're logical-OR'd together.
434
435      debug 15 # same as setting the first 4 listed above
436
437    Default:
438
439      debug 1 # URLs
440      debug 4096 # Info
441      debug 8192 # Errors - *we highly recommended enabling this*
442
443    Junkbuster  normally uses "multi-threading", a software technique that
444    permits  it  to handle many different requests simultaneously. In some
445    cases you may wish to disable this -- particularly if you're trying to
446    debug  a  problem.  The  "single-threaded" option forces Junkbuster to
447    handle requests sequentially. Default: Multi-threaded mode.
448
449      #single-threaded
450
451    "toggle" allows you to temporarily disable all Junkbuster's filtering.
452    Just set "toggle 0".
453
454    The  Windows  version  of  Junkbuster puts an icon in the system tray,
455    which  allows  you  to  change this option without having to edit this
456    file.  If you right-click on that icon (or select the "Options" menu),
457    one  choice  is "Enable". Clicking on enable toggles Junkbuster on and
458    off.  This  is  useful  if you want to temporarily disable Junkbuster,
459    e.g.,  to  access a site that requires cookies which you normally have
460    blocked.
461
462    "toggle  1"  means  Junkbuster  runs  normally,  "toggle 0" means that
463    Junkbuster becomes a non-anonymizing non-blocking proxy. Default: 1.
464
465      toggle 1
466      _________________________________________________________________
467
468 Access Control List (ACL)
469
470    Access  controls  are included at the request of some ISPs and systems
471    administrators, and are not usually needed by individual users. Please
472    note  the  warnings in the FAQ that this proxy is not intended to be a
473    substitute  for  a firewall or to encourage anyone to defer addressing
474    basic security weaknesses.
475
476    If  no  access  settings are specified, the proxy talks to anyone that
477    connects.  If  any  access settings file are specified, then the proxy
478    talks  only  to  IP addresses permitted somewhere in this file and not
479    denied later in this file.
480
481    Summary -- if using an ACL:
482
483    Client must have permission to receive service.
484
485    LAST match in ACL wins.
486
487    Default behavior is to deny service.
488
489    The syntax for an entry in the Access Control List is:
490
491      ACTION    SRC_ADDR[/SRC_MASKLEN]    [ DST_ADDR[/DST_MASKLEN] ]
492
493    Where the individual fields are:
494
495     ACTION      = "permit-access" or "deny-access"
496     SRC_ADDR    = client hostname or dotted IP address
497     SRC_MASKLEN = number of bits in the subnet mask for the source
498     DST_ADDR    = server or forwarder hostname or dotted IP address
499     DST_MASKLEN = number of bits in the subnet mask for the target
500
501    The field separator (FS) is whitespace (space or tab).
502
503    IMPORTANT  NOTE: If the junkbuster is using a forwarder (see below) or
504    a  gateway  for  a  particular  destination  URL, the DST_ADDR that is
505    examined  is  the  address of the forwarder or the gateway and NOT the
506    address  of  the  ultimate target. This is necessary because it may be
507    impossible  for  the  local Junkbuster to determine the address of the
508    ultimate target (that's often what gateways are used for).
509
510    Here are a few examples to show how the ACL features work:
511
512    "localhost"  is  OK  --  no  DST_ADDR  implies  that  ALL  destination
513    addresses are OK:
514
515      permit-access localhost
516
517    A  silly  example  to  illustrate  permitting  any host on the class-C
518    subnet with Junkbuster to go anywhere:
519
520      permit-access www.junkbusters.com/24
521
522    Except deny one particular IP address from using it at all:
523
524      deny-access ident.junkbusters.com
525
526    You  can  also  specify  an  explicit network address and subnet mask.
527    Explicit addresses do not have to be resolved to be used.
528
529      permit-access 207.153.200.0/24
530
531    A  subnet  mask  of  0  matches  anything,  so  the  next line permits
532    everyone.
533
534      permit-access 0.0.0.0/0
535
536    Note, you cannot say:
537
538      permit-access .org
539
540    to  allow  all  *.org  domains.  Every  IP address listed must resolve
541    fully.
542
543    An  ISP  may  want  to provide a Junkbuster that is accessible by "the
544    world"  and yet restrict use of some of their private content to hosts
545    on  its internal network (i.e. its own subscribers). Say, for instance
546    the  ISP  owns  the  Class-B  IP  address  block 123.124.0.0 (a 16 bit
547    netmask). This is how they could do it:
548
549     permit-access 0.0.0.0/0 0.0.0.0/0   # other clients can go anywhere
550                                           # with the following exceptions
551    :
552
553     deny-access   0.0.0.0/0   123.124.0.0/16 # block all external request
554    s for
555                                              # sites on the ISP's network
556     permit 0.0.0.0/0 www.my_isp.com        # except for the ISP's main
557                                              # web site
558     permit 123.124.0.0/16 0.0.0.0/0          # the ISP's clients can go
559                                              # anywhere
560
561    Note that if some hostnames are listed with multiple IP addresses, the
562    primary  value returned by DNS (via gethostbyname()) is used. Default:
563    Anyone can access the proxy.
564      _________________________________________________________________
565
566 Forwarding
567
568    This feature allows chaining of HTTP requests via multiple proxies. It
569    can  be  used  to  better  protect  privacy  and  confidentiality when
570    accessing  specific  domains by routing requests to those domains to a
571    special purpose filtering proxy such as lpwa.com.
572
573    It  can also be used in an environment with multiple networks to route
574    requests via multiple gateways allowing transparent access to multiple
575    networks without having to modify browser configurations.
576
577    Also  specified  here  are SOCKS proxies. Junkbuster SOCKS 4 and SOCKS
578    4A.  The  difference is that SOCKS 4A will resolve the target hostname
579    using DNS on the SOCKS server, not our local DNS client.
580
581    The syntax of each line is:
582
583     forward target_domain[:port] http_proxy_host[:port]
584     forward-socks4      target_domain[:port]      socks_proxy_host[:port]
585    http_proxy_host[:port]
586     forward-socks4a      target_domain[:port]     socks_proxy_host[:port]
587    http_proxy_host[:port]
588
589    If  http_proxy_host  is ".", then requests are not forwarded to a HTTP
590    proxy but are made directly to the web servers.
591
592    Lines are checked in sequence, and the last match wins.
593
594    There is an implicit line equivalent to the following, which specifies
595    that  anything  not  finding  a match on the list is to go out without
596    forwarding or gateway protocol, like so:
597
598      forward .* . # implicit
599
600    In  the  following  common  configuration, everything goes to Lucent's
601    LPWA, except SSL on port 443 (which it doesn't handle):
602
603     forward .* lpwa.com:8000
604     forward :443 .
605
606    See  the  FAQ  for instructions on how to automate the login procedure
607    for  LPWA. Some users have reported difficulties related to LPWA's use
608    of  "." as the last element of the domain, and have said that this can
609    be fixed with this:
610
611      forward lpwa. lpwa.com:8000
612
613    (NOTE:  the syntax for specifiying target_domain has changed since the
614    previous  paragraph  was  written  --  it  will  not  work  now.  More
615    information is welcome.)
616
617    In  this  fictitious  example,  everything  goes  via an ISP's caching
618    proxy, except requests to that ISP:
619
620     forward .* caching.myisp.net:8000
621     forward myisp.net .
622
623    For  the  @home  network,  we're  told the forwarding configuration is
624    this:
625
626      forward .* proxy:8080
627
628    Also, we're told they insist on getting cookies and JavaScript, so you
629    need  to  add  home.com  to  the cookie file. We consider JavaScript a
630    security risk. Java need not be enabled.
631
632    In this example direct connections are made to all "internal" domains,
633    but everything else goes through Lucent's LPWA by way of the company's
634    SOCKS gateway to the Internet.
635
636     forward_socks4 .* lpwa.com:8000 firewall.my_company.com:1080
637     forward my_company.com .
638
639    This  is  how  you  could  set up a site that always uses SOCKS but no
640    forwarders:
641
642      forward_socks4a .* . firewall.my_company.com:1080
643
644    An advanced example for network administrators:
645
646    If  you  have  links  to  multiple  ISPs  that provide various special
647    content  to  their  subscribers,  you can configure forwarding to pass
648    requests  to  the  specific  host that's connected to that ISP so that
649    everybody can see all of the content on all of the ISPs.
650
651    This is a bit tricky, but here's an example:
652
653    host-a  has  a  PPP  connection  to  isp-a.com.  And  host-b has a PPP
654    connection  to  isp-b.com.  host-a  can  run  a  Junkbuster proxy with
655    forwarding like this:
656
657     forward .* .
658     forward isp-b.com host-b:8000
659
660    host-b can run a Junkbuster proxy with forwarding like this:
661
662     forward .* .
663     forward isp-a.com host-a:8000
664
665    Now, anyone on the Internet (including users on host-a and host-b) can
666    set  their  browser's  proxy to either host-a or host-b and be able to
667    browse the content on isp-a or isp-b.
668
669    Here's another practical example, for University of Kent at Canterbury
670    students  with a network connection in their room, who need to use the
671    University's Squid web cache.
672
673     forward *. ssbcache.ukc.ac.uk:3128  # Use the proxy, except for:
674     forward .ukc.ac.uk .  # Anything on the same domain as us
675     forward * .  # Host with no domain specified
676     forward 129.12.*.* .  # A dotted IP on our /16 network.
677     forward 127.*.*.* .  # Loopback address
678     forward localhost.localdomain .  # Loopback address
679     forward www.ukc.mirror.ac.uk .  # Specific host
680
681    If  you  intend  to  chain Junkbuster and squid locally, then chain as
682    browser -> squid -> junkbuster is the recommended way.
683
684    Your squid configuration could then look like this:
685
686      # Define junkbuster as parent cache
687
688      cache_peer 127.0.0.1 parent 8000 0 no-query
689
690      # Define ACL for protocol FTP
691      acl FTP proto FTP
692      # Do not forward ACL FTP to junkbuster
693      always_direct allow FTP
694      # Do not forward ACL CONNECT (https) to junkbuster
695      always_direct allow CONNECT
696      # Forward the rest to junkbuster
697      never_direct allow all
698      _________________________________________________________________
699
700 Windows GUI Options
701
702    Junkbuster  has  a  number  of  options  specific  to  the Windows GUI
703    interface:
704
705    If  "activity-animation" is set to 1, the Junkbuster icon will animate
706    when "Junkbuster" is active. To turn off, set to 0.
707
708      activity-animation 1
709
710    If  "log-messages"  is  set  to 1, Junkbuster will log messages to the
711    console window:
712
713      log-messages 1
714
715    If "log-buffer-size" is set to 1, the size of the log buffer, i.e. the
716    amount  of  memory  used for the log messages displayed in the console
717    window, will be limited to "log-max-lines" (see below).
718
719    Warning:  Setting  this  to  0  will  result  in  the  buffer  to grow
720    infinitely and eat up all your memory!
721
722      log-buffer-size 1
723
724    log-max-lines  is  the maximum number of lines held in the log buffer.
725    See above.
726
727      log-max-lines 200
728
729    If  "log-highlight-messages"  is  set  to 1, Junkbuster will highlight
730    portions of the log messages with a bold-faced font:
731
732      log-highlight-messages 1
733
734    The font used in the console window:
735
736      log-font-name Comic Sans MS
737
738    Font size used in the console window:
739
740      log-font-size 8
741
742    "show-on-task-bar" controls whether or not Junkbuster will appear as a
743    button on the Task bar when minimized:
744
745      show-on-task-bar 0
746
747    If "close-button-minimizes" is set to 1, the Windows close button will
748    minimize  Junkbuster  instead  of  closing the program (close with the
749    exit option on the File menu).
750
751      close-button-minimizes 1
752
753    The "hide-console" option is specific to the MS-Win console version of
754    JunkBuster.  If  this  option is used, Junkbuster will disconnect from
755    and hide the command console.
756
757      #hide-console
758      _________________________________________________________________
759
760 The Actions File
761
762    The "actionsfile" is used to define what actions Junkbuster takes, and
763    thus  determines how images, cookies and various other aspects of HTTP
764    content and transactions are handled. Images can be anything you want,
765    including  ads,  banners,  or just some obnoxious image that you would
766    rather  not see. Cookies can be accepted or rejected. The default file
767    is in fact named actionsfile.
768
769    To  determine which actions apply to a request, the URL of the request
770    is  compared  to all patterns in this file. Every time it matches, the
771    list  of  applicable actions for the URL is incrementally updated. You
772    can trace this process by visiting [16]http://i.j.b/show-url-info.
773
774    There are four types of lines in this file: comments (begin with a "#"
775    character),  actions, aliases and patterns, all of which are explained
776    below.
777      _________________________________________________________________
778
779 URL Domain and Path Syntax
780
781    Generally,  a  pattern  has  the  form <domain>/<path>, where both the
782    <domain>  and  <path>  part are optional. If you only specify a domain
783    part, the "/" can be left out:
784
785    www.example.com  - is a domain only pattern and will match any request
786    to "www.example.com".
787
788    www.example.com/ - means exactly the same.
789
790    www.example.com/index.html   -   matches   only  the  single  document
791    "/index.html" on "www.example.com".
792
793    /index.html  -  matches  the document "/index.html", regardless of the
794    domain.
795
796    index.html  -  matches  nothing,  since  it  would be interpreted as a
797    domain name and there is no top-level domain called ".html".
798
799    The  matching  of the domain part offers some flexible options: if the
800    domain  starts  or ends with a dot, it becomes unanchored at that end.
801    For example:
802
803    .example.com - matches any domain that ENDS in ".example.com".
804
805    www. - matches any domain that STARTS with "www".
806
807    Additionally, there are wildcards that you can use in the domain names
808    themselves.  They  work  pretty similar to shell wildcards: "*" stands
809    for  zero  or  more  arbitrary  characters,  "?" stands for any single
810    character.  And  you  can define charachter classes in square brackets
811    and they can be freely mixed:
812
813    ad*.example.com  -  matches "adserver.example.com", "ads.example.com",
814    etc but not "sfads.example.com".
815
816    *ad*.example.com - matches all of the above, and then some.
817
818    .?pix.com     -     matches    "www.ipix.com",    "pictures.epix.com",
819    "a.b.c.d.e.upix.com", etc.
820
821    www[1-9a-ez].example.com       -      matches      "www1.example.com",
822    "www4.example.com",  "wwwd.example.com", "wwwz.example.com", etc., but
823    not "wwww.example.com".
824
825    If  Junkbuster  was  compiled  with  "pcre"  support  (default),  Perl
826    compatible  regular  expressions  can  be  used.  See  the  pcre/docs/
827    direcory or "man perlre" (also available on
828    [17]http://www.perldoc.com/perl5.6/pod/perlre.html)   for  details.  A
829    brief  discussion  of  regular expressions is in the [18]Appendix. For
830    instance:
831
832    /.*/advert[0-9]+\.jpe?g  - would match a URL from any domain, with any
833    path  that  includes  "advert"  followed  immediately  by  one or more
834    digits,  then  a "." and ending in either "jpeg" or "jpg". So we match
835    "example.com/ads/advert2.jpg", and
836    "www.example.com/ads/banners/advert39.jpeg",          but          not
837    "www.example.com/ads/banners/advert39.gif"  (no  gifs  in  the example
838    pattern).
839
840    Please  note that matching in the path is case INSENSITIVE by default,
841    but  you  can  switch to case sensitive at any point in the pattern by
842    using the "(?-i)" switch:
843
844    www.example.com/(?-i)PaTtErN.*  - will match only documents whose path
845    starts with "PaTtErN" in exactly this capitalization.
846      _________________________________________________________________
847
848 Actions
849
850    Actions  are  enabled if preceded with a "+", and disabled if preceded
851    with  a "-". Actions are invoked by enclosing the action name in curly
852    braces  (e.g. {+some_action}), followed by a list of URLs to which the
853    action applies. There are three classes of actions:
854
855      * Boolean (e.g. "+/-block"):
856          {+name}        # enable this action
857          {-name}        # disable this action
858
859      * Parameterized (e.g. "+/-hide-user-agent"):
860          {+name{param}}  # enable action and set parameter to "param"
861          {-name}         # disable action
862
863      * Multi-value       (e.g.       "{+/-add-header{Name:      value}}",
864        "{+/-wafer{name=value}}"):
865          {+name{param}}   # enable action and add parameter "param"
866          {-name{param}}   # remove the parameter "param"
867          {-name}          # disable this action totally
868
869    If  nothing  is  specified in this file, no "actions" are taken. So in
870    this   case   JunkBuster   would   just  be  a  normal,  non-blocking,
871    non-anonymizing  proxy.  You  must specifically enable the privacy and
872    blocking  features you need (although the provided default actionsfile
873    file will give a good starting point).
874
875    Later  defined actions always over-ride earlier ones. For multi-valued
876    actions, the actions are applied in the order they are specified.
877
878    The list of valid Junkbuster "actions" are:
879
880      * Add  the specified HTTP header, which is not checked for validity.
881        You may specify this many times to specify many different headers:
882          +add-header{Name: value}
883
884      * Block this URL totally.
885          +block
886
887      * De-animate all animated GIF images, i.e. reduce them to their last
888        frame.  This  will  also shrink the images considerably (in bytes,
889        not  pixels!).  If the option "first" is given, the first frame of
890        the  animation is used as the replacement. If "last" is given, the
891        last  frame of the animation is used instead, which propably makes
892        more  sense  for  most banner animations, but also has the risk of
893        not  showing  the  entire  last frame (if it is only a delta to an
894        earlier frame).
895          +deanimate-gifs{last}
896          +deanimate-gifs{first}
897
898      * "+downgrade"  will  downgrade HTTP/1.1 client requests to HTTP/1.0
899        and  downgrade  the responses as well. Use this action for servers
900        that use HTTP/1.1 protocol features that Junkbuster doesn't handle
901        well  yet.  HTTP/1.1 is only partially implemented. Default is not
902        to downgrade requests.
903          +downgrade
904
905      * Many  sites,  like  yahoo.com,  don't  just  link  to other sites.
906        Instead, they will link to some script on their own server, giving
907        the  destination  as  a parameter, which will then redirect you to
908        the  final  target. URLs resulting from this scheme typically look
909        like: http://some.place/some_script?http://some.where-else.
910        Sometimes,  there  are even multiple consecutive redirects encoded
911        in  the  URL. These redirections via scripts make your web browing
912        more traceable, since the server from which you follow such a link
913        can  see  where you go to. Apart from that, valuable bandwidth and
914        time is wasted, while your browser ask the server for one redirect
915        after the other. Plus, it feeds the advertisers.
916        The   "+fast-redirects"   option  enables  interception  of  these
917        requests  by  Junkbuster,  who will cut off all but the last valid
918        URL  in the request and send a local redirect back to your browser
919        without contacting the remote site.
920          +fast-redirects
921
922      * Filter the website through the re_filterfile:
923         +filter{filename}
924
925      * Block  any  existing  X-Forwarded-for header, and do not add a new
926        one:
927          +hide-forwarded
928
929      * If  the  browser  sends  a  "From:"  header containing your e-mail
930        address,  this  either completely removes the header ("block"), or
931        changes it to the specified e-mail address.
932          +hide-from{block}
933          +hide-from{spam@sittingduck.xqq}
934
935      * Don't  send  the  "Referer:" (sic) header to the web site. You can
936        block  it, forge a URL to the same server as the request (which is
937        preferred  because  some  sites will not send images otherwise) or
938        set it to a constant string of your choice.
939          +hide-referer{block}
940          +hide-referer{forge}
941          +hide-referer{http://nowhere.com}
942
943      * Alternative   spelling   of   "+hide-referer".  It  has  the  same
944        parameters,   and  can  be  freely  mixed  with,  "+hide-referer".
945        ("referrer"  is  the  correct  English  spelling, however the HTTP
946        specification has a bug - it requires it to be spelled "referer".)
947          +hide-referrer{...}
948
949      * Change  the  "User-Agent:"  header  so web servers can't tell your
950        browser  type.  Warning!  This  breaks many web sites. Specify the
951        user-agent  value  you want. Example, pretend to be using Netscape
952        on Linux:
953          +hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}
954
955      * Treat  this  URL  as  an  image.  This  only  matters if it's also
956        "+block"ed,  in  which  case  a "blocked" image can be sent rather
957        than  a  HTML  page.  See "+image-blocker{}" below for the control
958        over what is actually sent.
959          +image
960
961      * Decides  what  to  do  with  URLs that end up tagged with "{+block
962        +image}".  There  are 4 options. "-image-blocker" will send a HTML
963        "blocked"  page,  usually  resulting  in  a  "broken  image" icon.
964        "+image-blocker{logo}"    will    send   a   "JunkBuster"   image.
965        "+image-blocker{blank}" will send a 1x1 transparent GIF image. And
966        finally,   "+image-blocker{http://xyz.com}"   will   send  a  HTTP
967        temporary  redirect to the specified image. This has the advantage
968        of the icon being being cached by the browser, which will speed up
969        the display.
970          +image-blocker{logo}
971          +image-blocker{blank}
972          +image-blocker{http://i.j.b/send-banner}
973
974      * By  default  (i.e.  in  the absence of a "+limit-connect" action),
975        Junkbuster  will only allow CONNECT requests to port 443, which is
976        the standard port for https as a precaution.
977        The  CONNECT  methods  exists  in  HTTP  to allow access to secure
978        websites  (https://  URLs)  through proxies. It works very simply:
979        the  proxy  connects to the server on the specified port, and then
980        short-circuits  its  connections  to  the client and to the remote
981        proxy.  This  can  be  a  big security hole, since CONNECT-enabled
982        proxies can be abused as TCP relays very easily.
983        If  you want to allow CONNECT for more ports than this, or want to
984        forbid  CONNECT altogether, you can specify a comma separated list
985        of  ports  and  port  ranges  (the  latter  using dashes, with the
986        minimum defaulting to 0 and max to 65K):
987          +limit-connect{443}  #  This  is  the  default  and  need  no be
988        specified.
989          +limit-connect{80,443} # Ports 80 and 443 are OK.
990          +limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to
991        100
992           #and above 500 are OK.
993
994      * "+no-compression"  prevents the website from compressing the data.
995        Some  websites  do  this,  which  can be a problem for Junkbuster,
996        since "+filter", "+no-popup" and "+gif-deanimate" will not work on
997        compressed   data.  This  will  slow  down  connections  to  those
998        websites, though. Default is "nocompression" is turned on.
999          +nocompression
1000
1001      * Prevent the website from reading cookies:
1002          +no-cookies-read
1003
1004      * Prevent the website from setting cookies:
1005          +no-cookies-set
1006
1007      * Filter  the  website  through  a  built-in filter to disable those
1008        obnoxious  JavaScript  pop-up  windows via window.open(), etc. The
1009        two alternative spellings are equivalent.
1010          +no-popup
1011          +no-popups
1012
1013      * This  action  only  applies  if you are using a jarfile for saving
1014        cookies.  It  sends a cookie to every site stating that you do not
1015        accept  any  copyright on cookies sent to you, and asking them not
1016        to track you. Of course, this is a (relatively) unique header they
1017        could use to track you.
1018          +vanilla-wafer
1019
1020      * This  allows  you  to add an arbitrary cookie. It can be specified
1021        multiple times in order to add as many cookies as you like.
1022          +wafer{name=value}
1023
1024    The  meaning  of  any of the above is reversed by preceding the action
1025    with a "-", in place of the "+".
1026
1027    Some examples:
1028
1029    Turn  off  cookies  by default, then allow a few through for specified
1030    sites:
1031
1032     # Turn off all cookies
1033     { +no-cookies-read }
1034     { +no-cookies-set }
1035     # Execeptions to the above, sites that need cookies
1036     { -no-cookies-read }
1037     { -no-cookies-set }
1038     .javasoft.com
1039     .sun.com
1040     .yahoo.com
1041     .msdn.microsoft.com
1042     .redhat.com
1043     # Alternative way of saying the same thing
1044     {-no-cookies-set -no-cookies-read}
1045     .sourceforge.net
1046     .sf.net
1047
1048    Now turn off "fast redirects", and then we allow two exceptions:
1049
1050     # Turn them off!
1051     {+fast-redirects}
1052
1053     # Reverse it for these two sites, which don't work right without it.
1054     {-fast-redirects}
1055     www.ukc.ac.uk/cgi-bin/wac\.cgi\?
1056     login.yahoo.com
1057
1058    Turn on page filtering, with one exception for sourceforge:
1059
1060     # Run everything through the default filter file (re_filterfile):
1061     {+filter}
1062
1063     # But please don't re_filter code from sourceforge!
1064     {-filter}
1065     .cvs.sourceforge.net
1066
1067    Now  some  URLs  that we want "blocked", ie we won't see them. Many of
1068    these use regular expressions that will expand to match multiple URLs:
1069
1070      # Blocklist:
1071      {+block}
1072      /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
1073      /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
1074      /.*/(ng)?adclient\.cgi
1075      /.*/(plain|live|rotate)[-_.]?ads?/
1076      /.*/(sponsor)s?[0-9]?/
1077      /.*/_?(plain|live)?ads?(-banners)?/
1078      /.*/abanners/
1079      /.*/ad(sdna_image|gifs?)/
1080      /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
1081      /.*/adbanners/
1082      /.*/adserver
1083      /.*/adstream\.cgi
1084      /.*/adv((er)?ts?|ertis(ing|ements?))?/
1085      /.*/banner_?ads/
1086      /.*/banners?/
1087      /.*/banners?\.cgi/
1088      /.*/cgi-bin/centralad/getimage
1089      /.*/images/addver\.gif
1090      /.*/images/marketing/.*\.(gif|jpe?g)
1091      /.*/popupads/
1092      /.*/siteads/
1093      /.*/sponsor.*\.gif
1094      /.*/sponsors?[0-9]?/
1095      /.*/advert[0-9]+\.jpg
1096      /Media/Images/Adds/
1097      /ad_images/
1098      /adimages/
1099      /.*/ads/
1100      /bannerfarm/
1101      /grafikk/annonse/
1102      /graphics/defaultAd/
1103      /image\.ng/AdType
1104      /image\.ng/transactionID
1105      /images/.*/.*_anim\.gif # alvin brattli
1106      /ip_img/.*\.(gif|jpe?g)
1107      /rotateads/
1108      /rotations/
1109      /worldnet/ad\.cgi
1110      /cgi-bin/nph-adclick.exe/
1111      /.*/Image/BannerAdvertising/
1112      /.*/ad-bin/
1113      /.*/adlib/server\.cgi
1114      /autoads/
1115      _________________________________________________________________
1116
1117 Aliases
1118
1119    Custom  "actions", known to Junkbuster as "aliases", can be defined by
1120    combining  other "actions". These can in turn be invoked just like the
1121    built-in  "actions".  Currently,  an  alias  can contain any character
1122    except  space,  tab,  "=",  "{"  or "}". But please use only "a"- "z",
1123    "0"-"9", "+", and "-". Alias names are not case sensitive, and must be
1124    defined before anything else in actionsfile! And there can only be one
1125    set of "aliases" of defined.
1126
1127    Now let's define a few aliases:
1128
1129     # Useful customer aliases we can use later. These must come first!
1130     {{alias}}
1131     +no-cookies = +no-cookies-set +no-cookies-read
1132     -no-cookies = -no-cookies-set -no-cookies-read
1133     fragile     = -block -no-cookies -filter -fast-redirects -hide-refere
1134    r -no-popups
1135     shop        = -no-cookies -filter -fast-redirects
1136     +imageblock = +block +image
1137     #For people who don't like to type too much:  ;-)
1138     c0 = +no-cookies
1139     c1 = -no-cookies
1140     c2 = -no-cookies-set +no-cookies-read
1141     c3 = +no-cookies-set -no-cookies-read
1142     #... etc.  Customize to your heart's content.
1143
1144    Some examples using our "shop" and "fragile" aliases from above:
1145
1146     # These sites are very complex and require
1147     # minimal interference.
1148     {fragile}
1149     .office.microsoft.com
1150     .windowsupdate.microsoft.com
1151     .nytimes.com
1152     # Shopping sites - still want to block ads.
1153     {shop}
1154     .quietpc.com
1155     .worldpay.com   # for quietpc.com
1156     .jungle.com
1157     .scan.co.uk
1158     # These shops require pop-ups
1159     {shop -no-popups}
1160     .dabs.com
1161     .overclockers.co.uk
1162      _________________________________________________________________
1163
1164 The Filter File
1165
1166    The  filter  file defines what filtering of web pages Junkbuster does.
1167    The  default  filter  file  is  re_filterfile,  located  in the config
1168    directory.  In  this file, any document content, whether viewable text
1169    or embedded non-visible content, can be changed.
1170
1171    This  file  uses  regular expressions to alter or remove any string in
1172    the   target   page.   Some   examples   from   the  included  default
1173    re_filterfile:
1174
1175    Stop  web pages from displaying annoying messages in the status bar by
1176    deleting such references:
1177
1178     # The status bar is for displaying link targets, not pointless buzzwo
1179    rds.
1180     # Again, check it out on http://www.airport-cgn.de/.
1181     s/status='.*?';*//ig
1182
1183    Just   for   kicks,   replace   any  occurrence  of  "Microsoft"  with
1184    "MicroSuck":
1185
1186     s/microsoft(?!.com)/MicroSuck/ig
1187
1188    Kill those auto-refresh tags:
1189
1190     # Kill refresh tags. I like to refresh myself. Manually.
1191     # check it out on http://www.airport-cgn.de/ and go to the arrivals p
1192    age.
1193     #
1194     s/<meta[^>]*http-equiv[^>]*refresh.*URL=([^>]*?)"?>/<link rev="x-refr
1195    esh" href=$1>/i
1196     s/<meta[^>]*http-equiv="?page-enter"?[^>]*content=[^>]*>/<!--no page
1197    enter for me-->/i
1198      _________________________________________________________________
1199
1200 Quickstart to Using Junkbuster
1201
1202    Install  package,  then  run  and  enjoy!  Junbuster  accepts only one
1203    command line option -- the configuration file to be used. Example Unix
1204    startup command:
1205
1206
1207  # /usr/sbin/junkbuster /etc/junkbuster/config &
1208
1209
1210    If  no configuration file is specified on the command line, Junkbuster
1211    will  look for a file named config in the current directory. Except on
1212    Amiga  where  it  will  look for AmiTCP:db/junkbuster/config and Win32
1213    where it will try junkbstr.txt. If no file is specified on the command
1214    line  and  no default configuration file can be found, Junkbuster will
1215    fail to start.
1216
1217    Be  sure  your  browser is set to use the proxy which is by default at
1218    localhost,  port  8000.  With  Netscape (and Mozilla), this can be set
1219    under  Edit  ->  Preferences -> Advanced -> Proxies -> HTTP Proxy. For
1220    Internet  Explorer:  Tools > Internet Properties -> Connections -> LAN
1221    Setting.  Then,  check  "Use  Proxy"  and fill in the appropriate info
1222    (Address: localhost, Port: 8000). Include if HTTPS proxy support too.
1223
1224    The  included  default  configuration  files  should give a reasonable
1225    starting  point,  though  may be somewhat aggressive in blocking junk.
1226    You  will  probably  want  to  keep  an eye out for sites that require
1227    cookies,  and  add these to actionsfile as needed. By default, most of
1228    these  will be blocked until you add them to the configuration. If you
1229    want  the  browser  to  handle  this  instead,  you  will need to edit
1230    actionsfile  and  disable  this  feature.  If  you  use  more than one
1231    browser,  it  would  make more sense to let Junkbuster handle this. In
1232    which case, the browser(s) should be set to accept all cookies.
1233
1234    If a particular site shows problems loading properly, try adding it to
1235    the  {fragile} section of actionsfile. This will turn off most actions
1236    for this site.
1237
1238    HTTP/1.1  support  is  not fully implemented. If browsers that support
1239    HTTP/1.1   (like  Mozilla  or  recent  versions  of  I.E.)  experience
1240    problems,  you  might try to force HTTP/1.0 compatiblity. For Mozilla,
1241    look  under  Edit  ->  Preferences  -> Debug -> Networking. Or set the
1242    "+downgrade" config option in actionsfile.
1243
1244    After  running  Junkbuster for a while, you can start to fine tune the
1245    configuration   to  suit  your  personal,  or  site,  preferences  and
1246    requirements. There are many, many aspects that can be customized.
1247
1248    If  you  encounter  problems, please verify it is a Junkbuster bug, by
1249    disabling Junkbuster, and then trying the same page. Also, try another
1250    browser  if  possible  to  eliminate  browser or site problems. Before
1251    reporting it as a bug, see if there is not a configuration option that
1252    is  enabled  that is causing the page not to load. You can then add an
1253    exception  for  that  page  or site. If a bug, please report it to the
1254    developers (see below).
1255      _________________________________________________________________
1256
1257 Contact the Developers
1258
1259    Feature   requests  and  other  questions  should  be  posted  to  the
1260    [19]Feature  request  page  at  SourceForge.  There is also an archive
1261    there.
1262
1263    Anyone interested in actively participating in development and related
1264    discussions  can  join the appropriate mailing list [20]here. Archives
1265    are available here too.
1266
1267    Please  report  bugs, using the form at [21]Sourceforge. Please try to
1268    verify  that  it  is  a  Junkbuster bug, and not a browser or site bug
1269    first. Also, check to make sure this is not already a known bug.
1270      _________________________________________________________________
1271
1272 Copyright and History
1273
1274 License
1275
1276    Internet  Junkbuster  is free software; you can redistribute it and/or
1277    modify  it  under  the  terms  of  the  GNU  General Public License as
1278    published  by  the  Free  Software Foundation; either version 2 of the
1279    License, or (at your option) any later version.
1280
1281    This  program  is  distributed in the hope that it will be useful, but
1282    WITHOUT   ANY   WARRANTY;   without   even  the  implied  warranty  of
1283    MERCHANTABILITY  or  FITNESS  FOR  A  PARTICULAR  PURPOSE. See the GNU
1284    General  Public  License  for  more  details,  which is available from
1285    [22]the  Free  Software  Foundation, Inc, 59 Temple Place - Suite 330,
1286    Boston, MA 02111-1307, USA.
1287      _________________________________________________________________
1288
1289 History
1290
1291    Junkbuster   was   originally   written   by   Anonymous   Coders  and
1292    [23]JunkBusters  Corporation,  and  was  released  as free open-source
1293    software   under   the   GNU   GPL.   [24]Stefan  Waldherr  made  many
1294    improvements,  and  started  the  [25]SourceForge  project to rekindle
1295    development.  The  last stable release was v2.0.2, which has now grown
1296    whiskers ;-).
1297      _________________________________________________________________
1298
1299 See also
1300
1301      [26]http://sourceforge.net/projects/ijbswa
1302
1303      [27]http://ijbswa.sourceforge.net/
1304
1305      [28]http://ijbswa.sourceforge.net/config/
1306
1307      [29]http://www.junkbusters.com/ht/en/cookies.html
1308
1309      [30]http://www.waldherr.org/junkbuster/
1310
1311      [31]http://privacy.net/analyze/
1312
1313     [32]http://www.squid-cache.org/
1314      _________________________________________________________________
1315
1316 Appendix
1317
1318 Regular Expressions
1319
1320    Junkbuster  can  use  "regular  expressions"  in various config files.
1321    Assuming  support  for "pcre" (Perl Compatible Regular Expressions) is
1322    compiled  in,  which  is the default. Such configuration directives do
1323    not  require  regular  expressions,  but  they can be used to increase
1324    flexibility by matching a pattern with wildcards against URLs.
1325
1326    If  you  are reading this, you probably don't understand what "regular
1327    expressions"  are,  or  what they can do. So this will be a very brief
1328    introduction only. A full explanation would require a book ;-)
1329
1330    "Regular  expressions"  is  a way of matching one character expression
1331    against  another to see if it matches or not. One of the "expressions"
1332    is a literal string of readable characters (letter, numbers, etc), and
1333    the  other  is  a  complex  string of literal characters combined with
1334    wildcards,  and  other  special characters, called metacharacters. The
1335    "metacharacters"  have  special  meanings  and  are  used to build the
1336    complex  pattern  to  be  matched  against.  Perl  Compatible  Regular
1337    Expressions  is  an  enhanced  form of the regular expression language
1338    with backward compatibility.
1339
1340    To make a simple analogy, we do something similar when we use wildcard
1341    characters when listing files with the dir command in DOS. *.* matches
1342    all  filenames.  The  "special"  character  here  is the asterik which
1343    matches  any  and all characters. We can be more specific and use ? to
1344    match  just  individual  characters.  So  "dir file?.text" would match
1345    "file1.txt",  "file2.txt",  etc.  We  are  pattern  matching,  using a
1346    similar technique to "regular expressions"!
1347
1348    Regular  expressions do essentially the same thing, but are much, much
1349    more  powerful.  There  are many more "special characters" and ways of
1350    building  complex  patterns however. Let's look at a few of the common
1351    ones, and then some examples:
1352
1353    . - Matches any single character, e.g. "a", "A", "4", ":", or "@".
1354
1355    ?  -  The  preceding  character  or  expression is matched ZERO or ONE
1356    times. Either/or.
1357
1358    +  -  The  preceding  character  or  expression is matched ONE or MORE
1359    times.
1360
1361    *  -  The  preceding  character  or expression is matched ZERO or MORE
1362    times.
1363
1364    \ - The "escape" character denotes that the following character should
1365    be  taken  literally. This is used where one of the special characters
1366    (e.g.  ".")  needs  to  be  taken  literally  and  not  as  a  special
1367    metacharacter.
1368
1369    []  -  Characters  enclosed  in brackets will be matched if any of the
1370    enclosed characters are encountered.
1371
1372    ()  -  Pararentheses  are  used to group a sub-expression, or multiple
1373    sub-expressions.
1374
1375    |  -  The  "bar" character works like an "or" conditional statement. A
1376    match  is  successful  if  the  sub-expression  on  either side of "|"
1377    matches.
1378
1379    s/string1/string2/g  -  This  is  used  to  rewrite  strings  of text.
1380    "string1" is replaced by "string2" in this example.
1381
1382    These  are  just  some of the ones you are likely to use when matching
1383    URLs  with  Junkbuster, and is a long way from a definitive list. This
1384    is  enough  to  get us started with a few simple examples which may be
1385    more illuminating:
1386
1387    /.*/banners/.*  - A simple example that uses the common combination of
1388    "."  and  "*"  to  denote  any character, zero or more times. In other
1389    words,  any  string  at all. So we start with a literal forward slash,
1390    then  our  regular  expression  pattern (".*") another literal forward
1391    slash, the string "banners", another forward slash, and lastly another
1392    ".*".  We are building a directory path here. This will match any file
1393    with  the  path  that  has a directory named "banners" in it. The ".*"
1394    matches  any  characters,  and  this could conceivably be more forward
1395    slashes,  so  it  might  expand  into  a much longer looking path. For
1396    example, this could match:
1397    "/eye/hate/spammers/banners/annoy_me_please.gif",        or       just
1398    "/banners/annoying.html",  or  almost  an  infinite  number  of  other
1399    possible combinations, just so it has "banners" in the path somewhere.
1400
1401    A now something a little more complex:
1402
1403    /.*/adv((er)?ts?|ertis(ing|ements?))?/   -  We  have  several  literal
1404    forward  slashes  again  ("/"),  so we are building another expression
1405    that  is  a  file  path  statement.  We  have  another ".*", so we are
1406    matching  against  any  conceivable  sub-path,  just so it matches our
1407    expression.  The only true literal that must match our pattern is adv,
1408    together  with  the forward slashes. What comes after the "adv" string
1409    is the interesting part.
1410
1411    Remember  the  "?"  means  the  preceding expression (either a literal
1412    character  or anything grouped with "(...)" in this case) can exist or
1413    not,    since    this   means   either   zero   or   one   match.   So
1414    "((er)?ts?|ertis(ing|ements?))"  is  optional,  as  are the individual
1415    sub-expressions:  "(er)",  "(ing|ements?)", and the "s". The "|" means
1416    "or".  We have two of those. For instance, "(ing|ements?)", can expand
1417    to  match  either  "ing"  OR "ements?". What is being done here, is an
1418    attempt  at  matching  as  many  variations  of  "advertisement",  and
1419    similar,  as  possible.  So  this would expand to match just "adv", or
1420    "advert",  or  "adverts",  or  "advertising",  or  "advertisement", or
1421    "advertisements".   You   get   the  idea.  But  it  would  not  match
1422    "advertizements"  (with  a  "z").  We  could  fix that by changing our
1423    regular  expression  to: "/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/",
1424    which would then match either spelling.
1425
1426    /.*/advert[0-9]+\.(gif|jpe?g)  -  Again  another  path  statement with
1427    forward  slashes. Anything in the square brackets "[]" can be matched.
1428    This  is  using  "0-9" as a shorthand expression to mean any digit one
1429    through  nine.  It  is  the  same as saying "0123456789". So any digit
1430    matches. The "+" means one or more of the preceding expression must be
1431    included.  The  preceding  expression  here  is  what is in the square
1432    brackets  --  in  this  case, any digit one through nine. Then, at the
1433    end,  we  have a grouping: "(gif|jpe?g)". This includes a "|", so this
1434    needs  to  match  the  expression on either side of that bar character
1435    also.  A  simple  "gif"  on  one side, and the other side will in turn
1436    match  either  "jpeg"  or "jpg", since the "?" means the letter "e" is
1437    optional  and can be matched once or not at all. So we are building an
1438    expression  here  to  match image GIF or JPEG type image file. It must
1439    include  the  literal  string "advert", then one or more digits, and a
1440    "."  (which is now a literal, and not a special character, since it is
1441    escaped  with "\"), and lastly either "gif", or "jpeg", or "jpg". Some
1442    possible       matches       would      include:      "//advert1.jpg",
1443    "/nasty/ads/advert1234.gif",   "/banners/from/hell/advert99.jpg".   It
1444    would not match "advert1.gif" (no leading slash), or "/adverts232.jpg"
1445    (the  expression does not include an "s"), or "/advert1.jsp" ("jsp" is
1446    not in the expression anywhere).
1447
1448    s/microsoft(?!.com)/MicroSuck/i  - This is a substitution. "MicroSuck"
1449    will  replace  any occurence of "microsoft". The "i" at the end of the
1450    expression  means  ignore  case. The "(?!.com)" means the match should
1451    fail  if  "microsoft" is followed by ".com". In other words, this acts
1452    like  a  "NOT" modifier. In case this is a hyperlink, we don't want to
1453    break it ;-).
1454
1455    We  are  barely  scratching the surface of regular expressions here so
1456    that  you  can  understand the default Junkbuster configuration files,
1457    and maybe use this knowledge to customize your own installation. There
1458    is much, much more that can be done with regular expressions. Now that
1459    you know enough to get started, you can learn more on your own :/
1460
1461    More    reading    on    Perl    Compatible    Regular    expressions:
1462    [33]http://www.perldoc.com/perl5.6/pod/perlre.html
1463
1464    Done.
1465
1466 References
1467
1468    1. http://ijbswa.sourceforge.net/doc/user-manual/
1469    2. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#INTRODUCTION
1470    3. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#INSTALLATION
1471    4. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#CONFIGURATION
1472    5. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#QUICKSTART
1473    6. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#CONTACT
1474    7. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#COPYRIGHT
1475    8. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#SEEALSO
1476    9. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#APPENDIX
1477   10. http://sourceforge.net/projects/ijbswa/
1478   11. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/current/
1479   12. http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=emxrt.zip&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fdev%2Femx%2Fv0.9d
1480   13. http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&key=gnupack&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fapps
1481   14. http://www.gnu.org/
1482   15. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#ACTIONSFILE
1483   16. http://i.j.b/show-url-info
1484   17. http://www.perldoc.com/perl5.6/pod/perlre.html
1485   18. file://localhost/home/hal/junkbuster/current/doc/source/tmp.html#REGEX
1486   19. http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse
1487   20. http://sourceforge.net/mail/?group_id=11118
1488   21. http://sourceforge.net/tracker/?group_id=11118&atid=111118
1489   22. http://www.gnu.org/copyleft/gpl.html
1490   23. http://www.junkbusters.com/ht/en/ijbfaq.html
1491   24. http://www.waldherr.org/junkbuster/
1492   25. http://sourceforge.net/projects/ijbswa/
1493   26. http://sourceforge.net/projects/ijbswa
1494   27. http://ijbswa.sourceforge.net/
1495   28. http://ijbswa.sourceforge.net/config/
1496   29. http://www.junkbusters.com/ht/en/cookies.html
1497   30. http://www.waldherr.org/junkbuster/
1498   31. http://privacy.net/analyze/
1499   32. http://www.squid-cache.org/
1500   33. http://www.perldoc.com/perl5.6/pod/perlre.html