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