newly generated.
[privoxy.git] / doc / text / user-manual.txt
1
2 Junkbuster User Manual
3
4    By: Junkbuster Developers
5    
6    $Id: user-manual.sgml,v 1.49 2002/03/21 17:01:05 hal9 Exp $
7    
8    The user manual gives users information on how to install, configure
9    and use Internet Junkbuster. Internet Junkbuster is a web proxy with
10    advanced filtering capabilities for protecting privacy, filtering web
11    page content, managing cookies, controlling access, and removing ads,
12    banners, pop-ups and other obnoxious Internet Junk. Junkbuster has a
13    very flexible configuration and can be customized to suit individual
14    needs and tastes. Internet Junkbuster has application for both
15    stand-alone systems and multi-user networks.
16    
17    You can find the latest version of the user manual at
18    [1]http://ijbswa.sourceforge.net/user-manual/.
19      _________________________________________________________________
20    
21    Table of Contents
22    1. [2]Introduction
23           
24         1.1. [3]New Features
25                 
26    2. [4]Installation
27           
28         2.1. [5]Source
29         2.2. [6]Red Hat
30         2.3. [7]SuSE
31         2.4. [8]OS/2
32         2.5. [9]Windows
33         2.6. [10]Other
34                 
35    3. [11]JunkBuster Configuration
36           
37         3.1. [12]Controlling Junkbuster with Your Web Browser
38         3.2. [13]Configuration Files Overview
39         3.3. [14]The Main Configuration File
40                 
41               3.3.1. [15]Defining Other Configuration Files
42               3.3.2. [16]Other Configuration Options
43               3.3.3. [17]Access Control List (ACL)
44               3.3.4. [18]Forwarding
45               3.3.5. [19]Windows GUI Options
46                       
47         3.4. [20]The Actions File
48                 
49               3.4.1. [21]URL Domain and Path Syntax
50               3.4.2. [22]Actions
51               3.4.3. [23]Aliases
52                       
53         3.5. [24]The Filter File
54         3.6. [25]Templates
55                 
56    4. [26]Quickstart to Using Junkbuster
57           
58         4.1. [27]Command Line Options
59                 
60    5. [28]Contacting the Developers, Bug Reporting and Feature Requests
61    6. [29]Copyright and History
62           
63         6.1. [30]License
64         6.2. [31]History
65                 
66    7. [32]See also
67    8. [33]Appendix
68           
69         8.1. [34]Regular Expressions
70                 
71               21
72               22
73               23
74               24
75               25
76               26
77               27
78               28
79               29
80                       
81         8.2. [35]JunkBuster's Internal Pages
82         8.3. [36]Anatomy of an Action
83                 
84 1. Introduction
85
86    Internet Junkbuster is a web proxy with advanced filtering
87    capabilities for protecting privacy, filtering and modifying web page
88    content, managing cookies, controlling access, and removing ads,
89    banners, pop-ups and other obnoxious Internet Junk. Junkbuster has a
90    very flexible configuration and can be customized to suit individual
91    needs and tastes. Internet Junkbuster has application for both
92    stand-alone systems and multi-user networks.
93    
94    This documentation is included with the current BETA version of
95    Internet Junkbuster and is mostly complete at this point. The most up
96    to date reference for the time being is still the comments in the
97    source files and in the individual configuration files. Development of
98    version 3.0 is currently nearing completion, and includes many
99    significant changes and enhancements over earlier versions. The target
100    release date for stable v3.0 is "soon" ;-)
101    
102    Since this is a BETA version, not all new features are well tested.
103    This documentation may be slightly out of sync as a result (especially
104    with CVS sources). And there may be bugs, though hopefully not many!
105      _________________________________________________________________
106    
107 1.1. New Features
108
109    In addition to Junkbuster's traditional features of ad and banner
110    blocking and cookie management, this is a list of new features
111    currently under development:
112    
113      * Integrated browser based configuration and control utility
114        ([37]http://i.j.b). Browser-based tracing of rule and filter
115        effects.
116      * Blocking of annoying pop-up browser windows.
117      * HTTP/1.1 compliant (most, but not all 1.1 features are supported).
118      * Support for Perl Compatible Regular Expressions in the
119        configuration files, and generally a more sophisticated and
120        flexible configuration syntax over previous versions.
121      * GIF de-animation.
122      * Web page content filtering (removes banners based on size,
123        invisible "web-bugs", JavaScript, pop-ups, status bar abuse, etc.)
124      * Bypass many click-tracking scripts (avoids script redirection).
125      * Multi-threaded (POSIX and native threads).
126      * Auto-detection and re-reading of config file changes.
127      * User-customizable HTML templates (e.g. 404 error page).
128      * Improved cookie management features (e.g. session based cookies).
129      * Builds from source on most UNIX-like systems. Packages available
130        for: Linux (RedHat, SuSE, or Debian), Windows, Sun Solaris, Mac
131        OSX, OS/2, HP-UX 11 and AmigaOS.
132      * In addition, the configuration is much more powerful and versatile
133        over-all.
134      _________________________________________________________________
135    
136 2. Installation
137
138    Junkbuster is available as raw source code, or pre-compiled binaries.
139    See the [38]Junkbuster Home Page for binaries and current release
140    info. Junkbuster is also available via [39]CVS. This is the
141    recommended approach at this time. But please be aware that CVS is
142    constantly changing, and it may break in mysterious ways.
143      _________________________________________________________________
144    
145 2.1. Source
146
147    For gzipped tar archives, unpack the source:
148    
149  tar xzvf ijb_source_* [.tgz or .tar.gz]
150  cd ijb_source_2.9.11_beta
151
152    For retrieving the current CVS sources, you'll need the CVS package
153    installed first. To download CVS source:
154    
155   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
156   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co cu
157 rrent
158   cd current
159
160    This will create a directory named current/, which will contain the
161    source tree.
162    
163    Then, in either case, to build from tarball/CVS source:
164    
165  ./configure      (--help to see options)
166  make             (the make from gnu, gmake for *BSD)
167  su
168  make -n install  (to see where all the files will go)
169  make install     (to really install)
170
171    For Redhat and SuSE Linux RPM packages, see below.
172      _________________________________________________________________
173    
174 2.2. Red Hat
175
176    To build Redhat RPM packages, install source as above. Then:
177    
178  autoheader   [suggested for CVS source]
179  autoconf     [suggested for CVS source]
180  ./configure
181  make redhat-dist
182
183    This will create both binary and src RPMs in the usual places.
184    Example:
185    
186       /usr/src/redhat/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
187    
188       /usr/src/redhat/SRPMS/junkbuster-2.9.11-1.src.rpm
189    
190    To install, of course:
191    
192  rpm -Uvv /usr/src/redhat/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
193
194    This will place the Junkbuster configuration files in
195    /etc/junkbuster/, and log files in /var/log/junkbuster/.
196      _________________________________________________________________
197    
198 2.3. SuSE
199
200    To build SuSE RPM packages, install source as above. Then:
201    
202  autoheader   [suggested for CVS source]
203  autoconf     [suggested for CVS source]
204  ./configure
205  make suse-dist
206
207    This will create both binary and src RPMs in the usual places.
208    Example:
209    
210       /usr/src/packages/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
211    
212       /usr/src/packages/SRPMS/junkbuster-2.9.11-1.src.rpm
213    
214    To install, of course:
215    
216  rpm -Uvv /usr/src/packages/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
217
218    This will place the Junkbuster configuration files in
219    /etc/junkbuster/, and log files in /var/log/junkbuster/.
220      _________________________________________________________________
221    
222 2.4. OS/2
223
224    Junkbuster is packaged in a WarpIN self- installing archive. The
225    self-installing program will be named depending on the release
226    version, something like: ijbos2_setup_1.2.3.exe. In order to install
227    it, simply run this executable or double-click on its icon and follow
228    the WarpIN installation panels. A shadow of the Junkbuster executable
229    will be placed in your startup folder so it will start automatically
230    whenever OS/2 starts.
231    
232    The directory you choose to install Junkbuster into will contain all
233    of the configuration files.
234    
235    If you would like to build binary images on OS/2 yourself, you will
236    need a few Unix-like tools: autoconf, autoheader and sh. These tools
237    will be used to create the required config.h file, which is not part
238    of the source distribution because it differs based on platform. You
239    will also need a compiler. The distribution has been created using IBM
240    VisualAge compilers, but you can use any compiler you like. GCC/EMX
241    has the disadvantage of needing to be single-threaded due to a
242    limitation of EMX's implementation of the select() socket call.
243    
244    In addition to needing the source code distribution as outlined
245    earlier, you will want to extract the os2seutp directory from CVS:
246  cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
247
248  cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co os2
249 setup
250
251    This will create a directory named os2setup/, which will contain the
252    Makefile.vac makefile and os2build.cmd which is used to completely
253    create the binary distribution. The sequence of events for building
254    the executable for yourself goes something like this:
255  cd current
256  autoheader
257  autoconf
258  sh configure
259  cd ..\os2setup
260  nmake -f Makefile.vac
261
262    You will see this sequence laid out in os2build.cmd.
263      _________________________________________________________________
264    
265 2.5. Windows
266
267    Click-click. (I need help on this. Not a clue here. Also for
268    configuration section below. HB.)
269      _________________________________________________________________
270    
271 2.6. Other
272
273    Some quick notes on other Operating Systems.
274    
275    For FreeBSD (and other *BSDs?), the build will require gmake instead
276    of the included make. gmake is available from [40]http://www.gnu.org.
277    The rest should be the same as above for Linux/Unix.
278      _________________________________________________________________
279    
280 3. JunkBuster Configuration
281
282    All JunkBuster configuration is kept in text files. These files can be
283    edited with a text editor. Many important aspects of JunkBuster can
284    also be controlled easily with a web browser.
285      _________________________________________________________________
286    
287 3.1. Controlling Junkbuster with Your Web Browser
288
289    JunkBuster can be reached by the special URL [41]http://i.j.b/ (or
290    alternately [42]http://ijbswa.sourceforge.net/config/), which is an
291    internal page. You will see the following section:
292    
293 Please choose from the following options:
294
295     * Show information about the current configuration
296     * Show the source code version numbers
297     * Show the client's request headers.
298     * Show which actions apply to a URL and why
299     * Toggle JunkBuster on or off
300     * Edit the actions list
301
302
303    This should be self-explanatory. Note the last item is an editor for
304    the "actions list", which is where much of the ad, banner, cookie, and
305    URL blocking magic is configured as well as other advanced features of
306    Junkbuster. This is an easy way to adjust various aspects of
307    Junkbuster configuration. The actions file, and other configuration
308    files, are explained in detail below. Junkbuster will automatically
309    detect any changes to these files.
310    
311    "Toggle JunkBuster On or Off" is handy for sites that might have
312    problems with your current actions and filters, or just to test if a
313    site misbehaves, whether it is JunkBuster causing the problem or not.
314    Junkbuster continues to run as a proxy in this case, but all filtering
315    is disabled.
316      _________________________________________________________________
317    
318 3.2. Configuration Files Overview
319
320    For Unix, *BSD and Linux, all configuration files are located in
321    /etc/junkbuster/ by default. For MS Windows, OS/2, and AmigaOS these
322    are all in the same directory as the Junkbuster executable. The name
323    and number of configuration files has changed from previous versions,
324    and is subject to change as development progresses.
325    
326    The installed defaults provide a reasonable starting point, though
327    possibly aggressive by some standards. For the time being, there are
328    only three default configuration files (this will change in time):
329    
330      * The main configuration file is named config on Linux, Unix, BSD,
331        OS/2, and AmigaOS and config.txt on Windows.
332      * The ijb.action file is used to define various "actions" relating
333        to images, banners, pop-ups, access restrictions, banners and
334        cookies. There is a CGI based editor for this file that can be
335        accessed via [43]http://i.j.b. (Other actions files are included
336        as well with differing levels of filtering and blocking, e.g.
337        ijb-basic.action.)
338      * The re_filterfile file can be used to re-write the raw page
339        content, including viewable text as well as embedded HTML and
340        JavaScript, and whatever else lurks on any given web page.
341        
342    ijb.action and re_filterfile can use Perl style regular expressions
343    for maximum flexibility. All files use the "#" character to denote a
344    comment. Such lines are not processed by Junkbuster. After making any
345    changes, there is no need to restart Junkbuster in order for the
346    changes to take effect. Junkbuster should detect such changes
347    automatically.
348    
349    While under development, the configuration content is subject to
350    change. The below documentation may not be accurate by the time you
351    read this. Also, what constitutes a "default" setting, may change, so
352    please check all your configuration files on important issues.
353      _________________________________________________________________
354    
355 3.3. The Main Configuration File
356
357    Again, the main configuration file is named config on Linux/Unix/BSD
358    and OS/2, and config.txt on Windows. Configuration lines consist of an
359    initial keyword followed by a list of values, all separated by
360    whitespace (any number of spaces or tabs). For example:
361    
362      blockfile blocklist.ini
363    
364    Indicates that the blockfile is named "blocklist.ini". (A default
365    installation does not use this.)
366    
367    A "#" indicates a comment. Any part of a line following a "#" is
368    ignored, except if the "#" is preceded by a "\".
369    
370    Thus, by placing a "#" at the start of an existing configuration line,
371    you can make it a comment and it will be treated as if it weren't
372    there. This is called "commenting out" an option and can be useful to
373    turn off features: If you comment out the "logfile" line, junkbuster
374    will not log to a file at all. Watch for the "default:" section in
375    each explanation to see what happens if the option is left unset (or
376    commented out).
377    
378    Long lines can be continued on the next line by using a "\" as the
379    very last character.
380    
381    There are various aspects of Junkbuster behavior that can be tuned.
382      _________________________________________________________________
383    
384 3.3.1. Defining Other Configuration Files
385
386    Junkbuster can use a number of other files to tell it what ads to
387    block, what cookies to accept, etc. This section of the configuration
388    file tells Junkbuster where to find all those other files.
389    
390    On Windows and AmigaOS, Junkbuster looks for these files in the same
391    directory as the executable. On Unix and OS/2, Junkbuster looks for
392    these files in the current working directory. In either case, an
393    absolute path name can be used to avoid problems.
394    
395    When development goes modular and multi-user, the blocker, filter, and
396    per-user config will be stored in subdirectories of "confdir". For
397    now, only confdir/templates is used for storing HTML templates for CGI
398    results.
399    
400    The location of the configuration files:
401    
402      confdir /etc/junkbuster       # No trailing /, please.
403    
404    The directory where all logging (i.e. logfile and jarfile) takes
405    place. No trailing "/", please:
406    
407      logdir /var/log/junkbuster
408    
409    Note that all file specifications below are relative to the above two
410    directories!
411    
412    The "ijb.action" file contains patterns to specify the actions to
413    apply to requests for each site. Default: Cookies to and from all
414    destinations are kept only during the current browser session (i.e.
415    they are not saved to disk). Pop-ups are disabled for all sites. All
416    sites are filtered through selected sections of "re_filterfile". No
417    sites are blocked. The JunkBuster logo is displayed for filtered ads
418    and other images. The syntax of this file is explained in detail
419    [44]below. Other "actions" files are included, and you are free to use
420    any of them. They have varying degrees of aggressiveness.
421    
422      actionsfile ijb.action
423    
424    The "re_filterfile" file contains content modification rules that use
425    "regular expressions". These rules permit powerful changes on the
426    content of Web pages, e.g., you could disable your favorite JavaScript
427    annoyances, re-write the actual displayed text, or just have some fun
428    replacing "Microsoft" with "MicroSuck" wherever it appears on a Web
429    page. Default: whatever the developers are playing with :-/
430    
431    Filtering requires buffering the page content, which may appear to
432    slow down page rendering since nothing is displayed until all content
433    has passed the filters. (It does not really take longer, but seems
434    that way since the page is not incrementally displayed.) This effect
435    will be more noticeable on slower connections.
436    
437      re_filterfile re_filterfile
438    
439    The logfile is where all logging and error messages are written. The
440    logfile can be useful for tracking down a problem with Junkbuster
441    (e.g., it's not blocking an ad you think it should block) but in most
442    cases you probably will never look at it.
443    
444    Your logfile will grow indefinitely, and you will probably want to
445    periodically remove it. On Unix systems, you can do this with a cron
446    job (see "man cron"). For Redhat, a logrotate script has been
447    included.
448    
449    On SuSE Linux systems, you can place a line like
450    "/var/log/junkbuster.* +1024k 644 nobody.nogroup" in /etc/logfiles,
451    with the effect that cron.daily will automatically archive, gzip, and
452    empty the log, when it exceeds 1M size.
453    
454    Default: Log to the a file named logfile. Comment out to disable
455    logging.
456    
457      logfile logfile
458    
459    The "jarfile" defines where Junkbuster stores the cookies it
460    intercepts. Note that if you use a "jarfile", it may grow quite large.
461    Default: Don't store intercepted cookies.
462    
463      #jarfile jarfile
464    
465    If you specify a "trustfile", Junkbuster will only allow access to
466    sites that are named in the trustfile. You can also mark sites as
467    trusted referrers, with the effect that access to untrusted sites will
468    be granted, if a link from a trusted referrer was used. The link
469    target will then be added to the "trustfile". This is a very
470    restrictive feature that typical users most probably want to leave
471    disabled. Default: Disabled, don't use the trust mechanism.
472    
473      #trustfile trust
474    
475    If you use the trust mechanism, it is a good idea to write up some
476    on-line documentation about your blocking policy and to specify the
477    URL(s) here. They will appear on the page that your users receive when
478    they try to access untrusted content. Use multiple times for multiple
479    URLs. Default: Don't display links on the "untrusted" info page.
480    
481      trust-info-url http://www.your-site.com/why_we_block.html
482      trust-info-url http://www.your-site.com/what_we_allow.html
483      _________________________________________________________________
484    
485 3.3.2. Other Configuration Options
486
487    This part of the configuration file contains options that control how
488    Junkbuster operates.
489    
490    "Admin-address" should be set to the email address of the proxy
491    administrator. It is used in many of the proxy-generated pages.
492    Default: fill@me.in.please.
493    
494      #admin-address fill@me.in.please
495    
496    "Proxy-info-url" can be set to a URL that contains more info about
497    this Junkbuster installation, it's configuration and policies. It is
498    used in many of the proxy-generated pages and its use is highly
499    recommended in multi-user installations, since your users will want to
500    know why certain content is blocked or modified. Default: Don't show a
501    link to on-line documentation.
502    
503      proxy-info-url http://www.your-site.com/proxy.html
504    
505    "Listen-address" specifies the address and port where Junkbuster will
506    listen for connections from your Web browser. The default is to listen
507    on the localhost port 8118, and this is suitable for most users. (In
508    your web browser, under proxy configuration, list the proxy server as
509    "localhost" and the port as "8118").
510    
511    If you already have another service running on port 8118, or if you
512    want to serve requests from other machines (e.g. on your local
513    network) as well, you will need to override the default. The syntax is
514    "listen-address [<ip-address>]:<port>". If you leave out the IP
515    address, junkbuster will bind to all interfaces (addresses) on your
516    machine and may become reachable from the Internet. In that case,
517    consider using access control lists (acl's) (see "aclfile" above), or
518    a firewall.
519    
520    For example, suppose you are running Junkbuster on a machine which has
521    the address 192.168.0.1 on your local private network (192.168.0.0)
522    and has another outside connection with a different address. You want
523    it to serve requests from inside only:
524    
525      listen-address 192.168.0.1:8118
526    
527    If you want it to listen on all addresses (including the outside
528    connection):
529    
530      listen-address :8118
531    
532    If you do this, consider using ACLs (see "aclfile" above). Note: you
533    will need to point your browser(s) to the address and port that you
534    have configured here. Default: localhost:8118 (127.0.0.1:8118).
535    
536    The debug option sets the level of debugging information to log in the
537    logfile (and to the console in the Windows version). A debug level of
538    1 is informative because it will show you each request as it happens.
539    Higher levels of debug are probably only of interest to developers.
540    
541      debug         1 # GPC   = show each GET/POST/CONNECT request
542      debug         2 # CONN  = show each connection status
543      debug         4 # IO    = show I/O status
544      debug         8 # HDR   = show header parsing
545      debug        16 # LOG   = log all data into the logfile
546      debug        32 # FRC   = debug force feature
547      debug        64 # REF   = debug regular expression filter
548      debug       128 #       = debug fast redirects
549      debug       256 #       = debug GIF de-animation
550      debug       512 # CLF   = Common Log Format
551      debug      1024 #       = debug kill pop-ups
552      debug      4096 # INFO  = Startup banner and warnings.
553      debug      8192 # ERROR = Non-fatal errors
554    
555    It is highly recommended that you enable ERROR reporting (debug 8192),
556    at least until v3.0 is released.
557    
558    The reporting of FATAL errors (i.e. ones which crash JunkBuster) is
559    always on and cannot be disabled.
560    
561    If you want to use CLF (Common Log Format), you should set "debug 512"
562    ONLY, do not enable anything else.
563    
564    Multiple "debug" directives, are OK - they're logical-OR'd together.
565    
566      debug 15 # same as setting the first 4 listed above
567    
568    Default:
569    
570      debug 1 # URLs
571      debug 4096 # Info
572      debug 8192 # Errors - *we highly recommended enabling this*
573    
574    Junkbuster normally uses "multi-threading", a software technique that
575    permits it to handle many different requests simultaneously. In some
576    cases you may wish to disable this -- particularly if you're trying to
577    debug a problem. The "single-threaded" option forces Junkbuster to
578    handle requests sequentially. Default: Multi-threaded mode.
579    
580      #single-threaded
581    
582    "toggle" allows you to temporarily disable all Junkbuster's filtering.
583    Just set "toggle 0".
584    
585    The Windows version of Junkbuster puts an icon in the system tray,
586    which also allows you to change this option. If you right-click on
587    that icon (or select the "Options" menu), one choice is "Enable".
588    Clicking on enable toggles Junkbuster on and off. This is useful if
589    you want to temporarily disable Junkbuster, e.g., to access a site
590    that requires cookies which you would otherwise have blocked. This can
591    also be toggled via a web browser at the Junkbuster internal address
592    of [45]http://i.j.b on any platform.
593    
594    "toggle 1" means Junkbuster runs normally, "toggle 0" means that
595    Junkbuster becomes a non-anonymizing non-blocking proxy. Default: 1
596    (on).
597    
598      toggle 1
599    
600    For content filtering, i.e. the "+filter" and "+deanimate-gif"
601    actions, it is necessary that Junkbuster buffers the entire document
602    body. This can be potentially dangerous, since a server could just
603    keep sending data indefinitely and wait for your RAM to exhaust. With
604    nasty consequences.
605    
606    The buffer-limit option lets you set the maximum size in Kbytes that
607    each buffer may use. When the documents buffer exceeds this size, it
608    is flushed to the client unfiltered and no further attempt to filter
609    the rest of it is made. Remember that there may multiple threads
610    running, which might require increasing the "buffer-limit" Kbytes
611    each, unless you have enabled "single-threaded" above.
612    
613      buffer-limit 4069
614    
615    To enable the web-based ijb.action file editor set enable-edit-actions
616    to 1, or 0 to disable. Note that you must have compiled JunkBuster
617    with support for this feature, otherwise this option has no effect.
618    This internal page can be reached at [46]http://i.j.b.
619    
620    Security note: If this is enabled, anyone who can use the proxy can
621    edit the actions file, and their changes will affect all users. For
622    shared proxies, you probably want to disable this. Default: enabled.
623    
624      enable-edit-actions 1
625    
626    Allow JunkBuster to be toggled on and off remotely, using your web
627    browser. Set "enable-remote-toggle"to 1 to enable, and 0 to disable.
628    Note that you must have compiled JunkBuster with support for this
629    feature, otherwise this option has no effect.
630    
631    Security note: If this is enabled, anyone who can use the proxy can
632    toggle it on or off (see [47]http://i.j.b), and their changes will
633    affect all users. For shared proxies, you probably want to disable
634    this. Default: enabled.
635    
636      enable-remote-toggle 1
637      _________________________________________________________________
638    
639 3.3.3. Access Control List (ACL)
640
641    Access controls are included at the request of some ISPs and systems
642    administrators, and are not usually needed by individual users. Please
643    note the warnings in the FAQ that this proxy is not intended to be a
644    substitute for a firewall or to encourage anyone to defer addressing
645    basic security weaknesses.
646    
647    If no access settings are specified, the proxy talks to anyone that
648    connects. If any access settings file are specified, then the proxy
649    talks only to IP addresses permitted somewhere in this file and not
650    denied later in this file.
651    
652    Summary -- if using an ACL:
653    
654    Client must have permission to receive service.
655    
656    LAST match in ACL wins.
657    
658    Default behavior is to deny service.
659    
660    The syntax for an entry in the Access Control List is:
661    
662      ACTION    SRC_ADDR[/SRC_MASKLEN]    [ DST_ADDR[/DST_MASKLEN] ]
663    
664    Where the individual fields are:
665    
666     ACTION      = "permit-access" or "deny-access"
667     SRC_ADDR    = client hostname or dotted IP address
668     SRC_MASKLEN = number of bits in the subnet mask for the source
669     DST_ADDR    = server or forwarder hostname or dotted IP address
670     DST_MASKLEN = number of bits in the subnet mask for the target
671    
672    The field separator (FS) is whitespace (space or tab).
673    
674    IMPORTANT NOTE: If the junkbuster is using a forwarder (see below) or
675    a gateway for a particular destination URL, the DST_ADDR that is
676    examined is the address of the forwarder or the gateway and NOT the
677    address of the ultimate target. This is necessary because it may be
678    impossible for the local Junkbuster to determine the address of the
679    ultimate target (that's often what gateways are used for).
680    
681    Here are a few examples to show how the ACL features work:
682    
683    "localhost" is OK -- no DST_ADDR implies that ALL destination
684    addresses are OK:
685    
686      permit-access localhost
687    
688    A silly example to illustrate permitting any host on the class-C
689    subnet with Junkbuster to go anywhere:
690    
691      permit-access www.junkbusters.com/24
692    
693    Except deny one particular IP address from using it at all:
694    
695      deny-access ident.junkbusters.com
696    
697    You can also specify an explicit network address and subnet mask.
698    Explicit addresses do not have to be resolved to be used.
699    
700      permit-access 207.153.200.0/24
701    
702    A subnet mask of 0 matches anything, so the next line permits
703    everyone.
704    
705      permit-access 0.0.0.0/0
706    
707    Note, you cannot say:
708    
709      permit-access .org
710    
711    to allow all *.org domains. Every IP address listed must resolve
712    fully.
713    
714    An ISP may want to provide a Junkbuster that is accessible by "the
715    world" and yet restrict use of some of their private content to hosts
716    on its internal network (i.e. its own subscribers). Say, for instance
717    the ISP owns the Class-B IP address block 123.124.0.0 (a 16 bit
718    netmask). This is how they could do it:
719    
720     permit-access 0.0.0.0/0 0.0.0.0/0   # other clients can go anywhere
721                                           # with the following exceptions
722    :
723    
724     deny-access   0.0.0.0/0   123.124.0.0/16 # block all external request
725    s for
726                                              # sites on the ISP's network
727     permit 0.0.0.0/0 www.my_isp.com        # except for the ISP's main
728                                              # web site
729     permit 123.124.0.0/16 0.0.0.0/0          # the ISP's clients can go
730                                              # anywhere
731    
732    Note that if some hostnames are listed with multiple IP addresses, the
733    primary value returned by DNS (via gethostbyname()) is used. Default:
734    Anyone can access the proxy.
735      _________________________________________________________________
736    
737 3.3.4. Forwarding
738
739    This feature allows chaining of HTTP requests via multiple proxies. It
740    can be used to better protect privacy and confidentiality when
741    accessing specific domains by routing requests to those domains to a
742    special purpose filtering proxy such as lpwa.com. Or to use a caching
743    proxy to speed up browsing.
744    
745    It can also be used in an environment with multiple networks to route
746    requests via multiple gateways allowing transparent access to multiple
747    networks without having to modify browser configurations.
748    
749    Also specified here are SOCKS proxies. Junkbuster SOCKS 4 and SOCKS
750    4A. The difference is that SOCKS 4A will resolve the target hostname
751    using DNS on the SOCKS server, not our local DNS client.
752    
753    The syntax of each line is:
754    
755     forward target_domain[:port] http_proxy_host[:port]
756     forward-socks4 target_domain[:port] socks_proxy_host[:port]
757    http_proxy_host[:port]
758     forward-socks4a target_domain[:port] socks_proxy_host[:port]
759    http_proxy_host[:port]
760    
761    If http_proxy_host is ".", then requests are not forwarded to a HTTP
762    proxy but are made directly to the web servers.
763    
764    Lines are checked in sequence, and the last match wins.
765    
766    There is an implicit line equivalent to the following, which specifies
767    that anything not finding a match on the list is to go out without
768    forwarding or gateway protocol, like so:
769    
770      forward .* . # implicit
771    
772    In the following common configuration, everything goes to Lucent's
773    LPWA, except SSL on port 443 (which it doesn't handle):
774    
775     forward .* lpwa.com:8000
776     forward :443 .
777    
778    Some users have reported difficulties related to LPWA's use of "." as
779    the last element of the domain, and have said that this can be fixed
780    with this:
781    
782      forward lpwa. lpwa.com:8000
783    
784    (NOTE: the syntax for specifying target_domain has changed since the
785    previous paragraph was written -- it will not work now. More
786    information is welcome.)
787    
788    In this fictitious example, everything goes via an ISP's caching
789    proxy, except requests to that ISP:
790    
791     forward .* caching.myisp.net:8000
792     forward myisp.net .
793    
794    For the @home network, we're told the forwarding configuration is
795    this:
796    
797      forward .* proxy:8080
798    
799    Also, we're told they insist on getting cookies and JavaScript, so you
800    should allow cookies from home.com. We consider JavaScript a potential
801    security risk. Java need not be enabled.
802    
803    In this example direct connections are made to all "internal" domains,
804    but everything else goes through Lucent's LPWA by way of the company's
805    SOCKS gateway to the Internet.
806    
807     forward-socks4 .* lpwa.com:8000 firewall.my_company.com:1080
808     forward my_company.com .
809    
810    This is how you could set up a site that always uses SOCKS but no
811    forwarders:
812    
813      forward-socks4a .* . firewall.my_company.com:1080
814    
815    An advanced example for network administrators:
816    
817    If you have links to multiple ISPs that provide various special
818    content to their subscribers, you can configure forwarding to pass
819    requests to the specific host that's connected to that ISP so that
820    everybody can see all of the content on all of the ISPs.
821    
822    This is a bit tricky, but here's an example:
823    
824    host-a has a PPP connection to isp-a.com. And host-b has a PPP
825    connection to isp-b.com. host-a can run a Junkbuster proxy with
826    forwarding like this:
827    
828     forward .* .
829     forward isp-b.com host-b:8118
830    
831    host-b can run a Junkbuster proxy with forwarding like this:
832    
833     forward .* .
834     forward isp-a.com host-a:8118
835    
836    Now, anyone on the Internet (including users on host-a and host-b) can
837    set their browser's proxy to either host-a or host-b and be able to
838    browse the content on isp-a or isp-b.
839    
840    Here's another practical example, for University of Kent at Canterbury
841    students with a network connection in their room, who need to use the
842    University's Squid web cache.
843    
844     forward *. ssbcache.ukc.ac.uk:3128  # Use the proxy, except for:
845     forward .ukc.ac.uk .  # Anything on the same domain as us
846     forward * .  # Host with no domain specified
847     forward 129.12.*.* .  # A dotted IP on our /16 network.
848     forward 127.*.*.* .  # Loopback address
849     forward localhost.localdomain .  # Loopback address
850     forward www.ukc.mirror.ac.uk .  # Specific host
851    
852    If you intend to chain Junkbuster and squid locally, then chain as
853    browser -> squid -> junkbuster is the recommended way.
854    
855    Your squid configuration could then look like this:
856    
857      # Define junkbuster as parent cache
858    
859      cache_peer 127.0.0.1 parent 8118 0 no-query
860    
861      # Define ACL for protocol FTP
862      acl FTP proto FTP
863      # Do not forward ACL FTP to junkbuster
864      always_direct allow FTP
865      # Do not forward ACL CONNECT (https) to junkbuster
866      always_direct allow CONNECT
867      # Forward the rest to junkbuster
868      never_direct allow all
869      _________________________________________________________________
870    
871 3.3.5. Windows GUI Options
872
873    Junkbuster has a number of options specific to the Windows GUI
874    interface:
875    
876    If "activity-animation" is set to 1, the Junkbuster icon will animate
877    when "Junkbuster" is active. To turn off, set to 0.
878    
879      activity-animation 1
880    
881    If "log-messages" is set to 1, Junkbuster will log messages to the
882    console window:
883    
884      log-messages 1
885    
886    If "log-buffer-size" is set to 1, the size of the log buffer, i.e. the
887    amount of memory used for the log messages displayed in the console
888    window, will be limited to "log-max-lines" (see below).
889    
890    Warning: Setting this to 0 will result in the buffer to grow
891    infinitely and eat up all your memory!
892    
893      log-buffer-size 1
894    
895    log-max-lines is the maximum number of lines held in the log buffer.
896    See above.
897    
898      log-max-lines 200
899    
900    If "log-highlight-messages" is set to 1, Junkbuster will highlight
901    portions of the log messages with a bold-faced font:
902    
903      log-highlight-messages 1
904    
905    The font used in the console window:
906    
907      log-font-name Comic Sans MS
908    
909    Font size used in the console window:
910    
911      log-font-size 8
912    
913    "show-on-task-bar" controls whether or not Junkbuster will appear as a
914    button on the Task bar when minimized:
915    
916      show-on-task-bar 0
917    
918    If "close-button-minimizes" is set to 1, the Windows close button will
919    minimize Junkbuster instead of closing the program (close with the
920    exit option on the File menu).
921    
922      close-button-minimizes 1
923    
924    The "hide-console" option is specific to the MS-Win console version of
925    JunkBuster. If this option is used, Junkbuster will disconnect from
926    and hide the command console.
927    
928      #hide-console
929      _________________________________________________________________
930    
931 3.4. The Actions File
932
933    The "ijb.action" file (formerly actionsfile) is used to define what
934    actions Junkbuster takes, and thus determines how images, cookies and
935    various other aspects of HTTP content and transactions are handled.
936    Images can be anything you want, including ads, banners, or just some
937    obnoxious URL that you would rather not see. Cookies can be accepted
938    or rejected, or accepted only during the current browser session (i.e.
939    not written to disk). Changes to ijb.action should be immediately
940    visible to Junkbuster without the need to restart.
941    
942    The easiest way to edit "actions" file is with a browser by loading
943    [48]http://i.j.b/, and then select "Edit Actions List". A text editor
944    can also be used.
945    
946    To determine which actions apply to a request, the URL of the request
947    is compared to all patterns in this file. Every time it matches, the
948    list of applicable actions for the URL is incrementally updated. You
949    can trace this process by visiting [49]http://i.j.b/show-url-info.
950    
951    There are four types of lines in this file: comments (begin with a "#"
952    character), actions, aliases and patterns, all of which are explained
953    below, as well as the configuration file syntax that Junkbuster
954    understands.
955      _________________________________________________________________
956    
957 3.4.1. URL Domain and Path Syntax
958
959    Generally, a pattern has the form <domain>/<path>, where both the
960    <domain> and <path> part are optional. If you only specify a domain
961    part, the "/" can be left out:
962    
963    www.example.com - is a domain only pattern and will match any request
964    to "www.example.com".
965    
966    www.example.com/ - means exactly the same.
967    
968    www.example.com/index.html - matches only the single document
969    "/index.html" on "www.example.com".
970    
971    /index.html - matches the document "/index.html", regardless of the
972    domain.
973    
974    index.html - matches nothing, since it would be interpreted as a
975    domain name and there is no top-level domain called ".html".
976    
977    The matching of the domain part offers some flexible options: if the
978    domain starts or ends with a dot, it becomes unanchored at that end.
979    For example:
980    
981    .example.com - matches any domain that ENDS in ".example.com".
982    
983    www. - matches any domain that STARTS with "www".
984    
985    Additionally, there are wild-cards that you can use in the domain
986    names themselves. They work pretty similar to shell wild-cards: "*"
987    stands for zero or more arbitrary characters, "?" stands for any
988    single character. And you can define character classes in square
989    brackets and they can be freely mixed:
990    
991    ad*.example.com - matches "adserver.example.com", "ads.example.com",
992    etc but not "sfads.example.com".
993    
994    *ad*.example.com - matches all of the above, and then some.
995    
996    .?pix.com - matches "www.ipix.com", "pictures.epix.com",
997    "a.b.c.d.e.upix.com", etc.
998    
999    www[1-9a-ez].example.com - matches "www1.example.com",
1000    "www4.example.com", "wwwd.example.com", "wwwz.example.com", etc., but
1001    not "wwww.example.com".
1002    
1003    If Junkbuster was compiled with "pcre" support (default), Perl
1004    compatible regular expressions can be used. See the pcre/docs/
1005    directory or "man perlre" (also available on
1006    [50]http://www.perldoc.com/perl5.6/pod/perlre.html) for details. A
1007    brief discussion of regular expressions is in the [51]Appendix. For
1008    instance:
1009    
1010    /.*/advert[0-9]+\.jpe?g - would match a URL from any domain, with any
1011    path that includes "advert" followed immediately by one or more
1012    digits, then a "." and ending in either "jpeg" or "jpg". So we match
1013    "example.com/ads/advert2.jpg", and
1014    "www.example.com/ads/banners/advert39.jpeg", but not
1015    "www.example.com/ads/banners/advert39.gif" (no gifs in the example
1016    pattern).
1017    
1018    Please note that matching in the path is case INSENSITIVE by default,
1019    but you can switch to case sensitive at any point in the pattern by
1020    using the "(?-i)" switch:
1021    
1022    www.example.com/(?-i)PaTtErN.* - will match only documents whose path
1023    starts with "PaTtErN" in exactly this capitalization.
1024      _________________________________________________________________
1025    
1026 3.4.2. Actions
1027
1028    Actions are enabled if preceded with a "+", and disabled if preceded
1029    with a "-". Actions are invoked by enclosing the action name in curly
1030    braces (e.g. {+some_action}), followed by a list of URLs to which the
1031    action applies. There are three classes of actions:
1032    
1033      * Boolean (e.g. "+/-block"):
1034          {+name}        # enable this action
1035          {-name}        # disable this action
1036        
1037      * parameterized (e.g. "+/-hide-user-agent"):
1038          {+name{param}}  # enable action and set parameter to "param"
1039          {-name}         # disable action
1040        
1041      * Multi-value (e.g. "{+/-add-header{Name: value}}",
1042        "{+/-wafer{name=value}}"):
1043          {+name{param}}   # enable action and add parameter "param"
1044          {-name{param}}   # remove the parameter "param"
1045          {-name}          # disable this action totally
1046        
1047    If nothing is specified in this file, no "actions" are taken. So in
1048    this case JunkBuster would just be a normal, non-blocking,
1049    non-anonymizing proxy. You must specifically enable the privacy and
1050    blocking features you need (although the provided default ijb.action
1051    file will give a good starting point).
1052    
1053    Later defined actions always over-ride earlier ones. For multi-valued
1054    actions, the actions are applied in the order they are specified.
1055    
1056    The list of valid Junkbuster "actions" are:
1057    
1058      * Add the specified HTTP header, which is not checked for validity.
1059        You may specify this many times to specify many different headers:
1060          +add-header{Name: value}
1061        
1062      * Block this URL totally. In a default installation, a "blocked" URL
1063        will result in bright red banner that says "BLOCKED", with a
1064        reason why it is being blocked.
1065          +block
1066        
1067      * De-animate all animated GIF images, i.e. reduce them to their last
1068        frame. This will also shrink the images considerably (in bytes,
1069        not pixels!). If the option "first" is given, the first frame of
1070        the animation is used as the replacement. If "last" is given, the
1071        last frame of the animation is used instead, which probably makes
1072        more sense for most banner animations, but also has the risk of
1073        not showing the entire last frame (if it is only a delta to an
1074        earlier frame).
1075          +deanimate-gifs{last}
1076          +deanimate-gifs{first}
1077        
1078      * "+downgrade" will downgrade HTTP/1.1 client requests to HTTP/1.0
1079        and downgrade the responses as well. Use this action for servers
1080        that use HTTP/1.1 protocol features that Junkbuster doesn't handle
1081        well yet. HTTP/1.1 is only partially implemented. Default is not
1082        to downgrade requests.
1083          +downgrade
1084        
1085      * Many sites, like yahoo.com, don't just link to other sites.
1086        Instead, they will link to some script on their own server, giving
1087        the destination as a parameter, which will then redirect you to
1088        the final target. URLs resulting from this scheme typically look
1089        like: http://some.place/some_script?http://some.where-else.
1090        Sometimes, there are even multiple consecutive redirects encoded
1091        in the URL. These redirections via scripts make your web browsing
1092        more traceable, since the server from which you follow such a link
1093        can see where you go to. Apart from that, valuable bandwidth and
1094        time is wasted, while your browser ask the server for one redirect
1095        after the other. Plus, it feeds the advertisers.
1096        The "+fast-redirects" option enables interception of these
1097        requests by Junkbuster, who will cut off all but the last valid
1098        URL in the request and send a local redirect back to your browser
1099        without contacting the remote site.
1100          +fast-redirects
1101        
1102      * Apply the filters in the section_header section of the
1103        re_filterfile file to the site(s). Re_filterfile sections are
1104        grouped according to like functionality.
1105         +filter{section_header}
1106        
1107        Filter sections that are pre-defined in the supplied re_filterfile
1108        include:
1109        
1110    html-annoyances: Get rid of particularly annoying HTML abuse.
1111    
1112    js-annoyances: Get rid of particularly annoying JavaScript abuse
1113    
1114    no-poups: Kill all popups in JS and HTML
1115    
1116    frameset-borders: Give frames a border
1117    
1118    webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
1119    
1120    no-refresh: Automatic refresh sucks on auto-dialup lines
1121    
1122    fun: Text replacements for subversive browsing fun!
1123    
1124    nimda: Remove (virus) Nimda code.
1125    
1126    banners-by-size: Kill banners by size
1127    
1128    crude-parental: Kill all web pages that contain the words "sex" or
1129    "warez"
1130    
1131      * Block any existing X-Forwarded-for header, and do not add a new
1132        one:
1133          +hide-forwarded
1134        
1135      * If the browser sends a "From:" header containing your e-mail
1136        address, this either completely removes the header ("block"), or
1137        changes it to the specified e-mail address.
1138          +hide-from{block}
1139          +hide-from{spam@sittingduck.xqq}
1140        
1141      * Don't send the "Referer:" (sic) header to the web site. You can
1142        block it, forge a URL to the same server as the request (which is
1143        preferred because some sites will not send images otherwise) or
1144        set it to a constant string of your choice.
1145          +hide-referer{block}
1146          +hide-referer{forge}
1147          +hide-referer{http://nowhere.com}
1148        
1149      * Alternative spelling of "+hide-referer". It has the same
1150        parameters, and can be freely mixed with, "+hide-referer".
1151        ("referrer" is the correct English spelling, however the HTTP
1152        specification has a bug - it requires it to be spelled "referer".)
1153          +hide-referrer{...}
1154        
1155      * Change the "User-Agent:" header so web servers can't tell your
1156        browser type. Warning! This breaks many web sites. Specify the
1157        user-agent value you want. Example, pretend to be using Netscape
1158        on Linux:
1159          +hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}
1160        
1161      * Treat this URL as an image. This only matters if it's also
1162        "+block"ed, in which case a "blocked" image can be sent rather
1163        than a HTML page. See "+image-blocker{}" below for the control
1164        over what is actually sent. If you want invisible ads, they should
1165        be defined as images and blocked. And also, "image-blocker" should
1166        be set to "blank".
1167          +image
1168        
1169      * Decides what to do with URLs that end up tagged with "{+block
1170        +image}", e.g an advertizement. There are five options.
1171        "-image-blocker" will send a HTML "blocked" page, usually
1172        resulting in a "broken image" icon. "+image-blocker{logo}" will
1173        send a "JunkBuster" logo image. "+image-blocker{blank}" will send
1174        a 1x1 transparent GIF image. And finally,
1175        "+image-blocker{http://xyz.com}" will send a HTTP temporary
1176        redirect to the specified image. This has the advantage of the
1177        icon being being cached by the browser, which will speed up the
1178        display. "+image-blocker{pattern}" will send a checkboard type
1179        pattern, which scales better than the logo (which can get blocky
1180        if the browser enlarges it too much).
1181          +image-blocker{logo}
1182          +image-blocker{blank}
1183          +image-blocker{pattern}
1184          +image-blocker{http://i.j.b/send-banner}
1185        
1186      * By default (i.e. in the absence of a "+limit-connect" action),
1187        Junkbuster will only allow CONNECT requests to port 443, which is
1188        the standard port for https as a precaution.
1189        The CONNECT methods exists in HTTP to allow access to secure
1190        websites (https:// URLs) through proxies. It works very simply:
1191        the proxy connects to the server on the specified port, and then
1192        short-circuits its connections to the client and to the remote
1193        proxy. This can be a big security hole, since CONNECT-enabled
1194        proxies can be abused as TCP relays very easily.
1195        If you want to allow CONNECT for more ports than this, or want to
1196        forbid CONNECT altogether, you can specify a comma separated list
1197        of ports and port ranges (the latter using dashes, with the
1198        minimum defaulting to 0 and max to 65K):
1199          +limit-connect{443} # This is the default and need no be
1200        specified.
1201          +limit-connect{80,443} # Ports 80 and 443 are OK.
1202          +limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to
1203        100
1204           #and above 500 are OK.
1205        
1206      * "+no-compression" prevents the website from compressing the data.
1207        Some websites do this, which can be a problem for Junkbuster,
1208        since "+filter", "+no-popup" and "+gif-deanimate" will not work on
1209        compressed data. This will slow down connections to those
1210        websites, though. Default is "nocompression" is turned on.
1211          +nocompression
1212        
1213      * If the website sets cookies, "no-cookies-keep" will make sure they
1214        are erased when you exit and restart your web browser. This makes
1215        profiling cookies useless, but won't break sites which require
1216        cookies so that you can log in for transactions. Default: on.
1217          +no-cookies-keep
1218        
1219      * Prevent the website from reading cookies:
1220          +no-cookies-read
1221        
1222      * Prevent the website from setting cookies:
1223          +no-cookies-set
1224        
1225      * Filter the website through a built-in filter to disable those
1226        obnoxious JavaScript pop-up windows via window.open(), etc. The
1227        two alternative spellings are equivalent.
1228          +no-popup
1229          +no-popups
1230        
1231      * This action only applies if you are using a jarfile for saving
1232        cookies. It sends a cookie to every site stating that you do not
1233        accept any copyright on cookies sent to you, and asking them not
1234        to track you. Of course, this is a (relatively) unique header they
1235        could use to track you.
1236          +vanilla-wafer
1237        
1238      * This allows you to add an arbitrary cookie. It can be specified
1239        multiple times in order to add as many cookies as you like.
1240          +wafer{name=value}
1241        
1242    The meaning of any of the above is reversed by preceding the action
1243    with a "-", in place of the "+".
1244    
1245    Some examples:
1246    
1247    Turn off cookies by default, then allow a few through for specified
1248    sites:
1249    
1250     # Turn off all persistent cookies
1251     { +no-cookies-read }
1252     { +no-cookies-set }
1253     # Allow cookies for this browser session ONLY
1254     { +no-cookies-keep }
1255     # Exceptions to the above, sites that benefit from persistent cookies
1256     { -no-cookies-read }
1257     { -no-cookies-set }
1258     { -no-cookies-keep }
1259     .javasoft.com
1260     .sun.com
1261     .yahoo.com
1262     .msdn.microsoft.com
1263     .redhat.com
1264     # Alternative way of saying the same thing
1265     {-no-cookies-set -no-cookies-read -no-cookies-keep}
1266     .sourceforge.net
1267     .sf.net
1268    
1269    Now turn off "fast redirects", and then we allow two exceptions:
1270    
1271     # Turn them off!
1272     {+fast-redirects}
1273    
1274     # Reverse it for these two sites, which don't work right without it.
1275     {-fast-redirects}
1276     www.ukc.ac.uk/cgi-bin/wac\.cgi\?
1277     login.yahoo.com
1278    
1279    Turn on page filtering according to rules in the defined sections of
1280    refilterfile, and make one exception for sourceforge:
1281    
1282     # Run everything through the filter file, using only the
1283     # specified sections:
1284     +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}\
1285     +filter{webbugs} +filter{nimda} +filter{banners-by-size}
1286    
1287     # Then disable filtering of code from sourceforge!
1288     {-filter}
1289     .cvs.sourceforge.net
1290    
1291    Now some URLs that we want "blocked", ie we won't see them. Many of
1292    these use regular expressions that will expand to match multiple URLs:
1293    
1294      # Blocklist:
1295      {+block}
1296      /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
1297      /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
1298      /.*/(ng)?adclient\.cgi
1299      /.*/(plain|live|rotate)[-_.]?ads?/
1300      /.*/(sponsor)s?[0-9]?/
1301      /.*/_?(plain|live)?ads?(-banners)?/
1302      /.*/abanners/
1303      /.*/ad(sdna_image|gifs?)/
1304      /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
1305      /.*/adbanners/
1306      /.*/adserver
1307      /.*/adstream\.cgi
1308      /.*/adv((er)?ts?|ertis(ing|ements?))?/
1309      /.*/banner_?ads/
1310      /.*/banners?/
1311      /.*/banners?\.cgi/
1312      /.*/cgi-bin/centralad/getimage
1313      /.*/images/addver\.gif
1314      /.*/images/marketing/.*\.(gif|jpe?g)
1315      /.*/popupads/
1316      /.*/siteads/
1317      /.*/sponsor.*\.gif
1318      /.*/sponsors?[0-9]?/
1319      /.*/advert[0-9]+\.jpg
1320      /Media/Images/Adds/
1321      /ad_images/
1322      /adimages/
1323      /.*/ads/
1324      /bannerfarm/
1325      /grafikk/annonse/
1326      /graphics/defaultAd/
1327      /image\.ng/AdType
1328      /image\.ng/transactionID
1329      /images/.*/.*_anim\.gif # alvin brattli
1330      /ip_img/.*\.(gif|jpe?g)
1331      /rotateads/
1332      /rotations/
1333      /worldnet/ad\.cgi
1334      /cgi-bin/nph-adclick.exe/
1335      /.*/Image/BannerAdvertising/
1336      /.*/ad-bin/
1337      /.*/adlib/server\.cgi
1338      /autoads/
1339    
1340    Note that many of these actions have the potential to cause a page to
1341    misbehave, possibly even not to display at all. There are many ways a
1342    site designer may choose to design his site, and what HTTP header
1343    content he may depend on. There is no way to have hard and fast rules
1344    for all sites. See the [52]Appendix for a brief example on
1345    troubleshooting actions.
1346      _________________________________________________________________
1347    
1348 3.4.3. Aliases
1349
1350    Custom "actions", known to Junkbuster as "aliases", can be defined by
1351    combining other "actions". These can in turn be invoked just like the
1352    built-in "actions". Currently, an alias can contain any character
1353    except space, tab, "=", "{" or "}". But please use only "a"- "z",
1354    "0"-"9", "+", and "-". Alias names are not case sensitive, and must be
1355    defined before anything else in the ijb.actionfile ! And there can
1356    only be one set of "aliases" defined.
1357    
1358    Now let's define a few aliases:
1359    
1360     # Useful customer aliases we can use later. These must come first!
1361     {{alias}}
1362     +no-cookies = +no-cookies-set +no-cookies-read
1363     -no-cookies = -no-cookies-set -no-cookies-read
1364     fragile     = -block -no-cookies -filter -fast-redirects -hide-refere
1365    r -no-popups
1366     shop        = -no-cookies -filter -fast-redirects
1367     +imageblock = +block +image
1368     #For people who don't like to type too much:  ;-)
1369     c0 = +no-cookies
1370     c1 = -no-cookies
1371     c2 = -no-cookies-set +no-cookies-read
1372     c3 = +no-cookies-set -no-cookies-read
1373     #... etc.  Customize to your heart's content.
1374    
1375    Some examples using our "shop" and "fragile" aliases from above:
1376    
1377     # These sites are very complex and require
1378     # minimal interference.
1379     {fragile}
1380     .office.microsoft.com
1381     .windowsupdate.microsoft.com
1382     .nytimes.com
1383     # Shopping sites - still want to block ads.
1384     {shop}
1385     .quietpc.com
1386     .worldpay.com   # for quietpc.com
1387     .jungle.com
1388     .scan.co.uk
1389     # These shops require pop-ups
1390     {shop -no-popups}
1391     .dabs.com
1392     .overclockers.co.uk
1393      _________________________________________________________________
1394    
1395 3.5. The Filter File
1396
1397    Any web page can be dynamically modified with the filter file. This
1398    modification can be removal, or re-writing, of any web page content,
1399    including tags and non-visible content. The default filter file is
1400    re_filterfile, located in the config directory.
1401    
1402    The included example file is divided into sections. Each section
1403    begins with the FILTER keyword, followed by the identifier for that
1404    section, e.g. "FILTER: webbugs". Each section performs a similar type
1405    of filtering, such as "html-annoyances".
1406    
1407    This file uses regular expressions to alter or remove any string in
1408    the target page. The expressions can only operate on one line at a
1409    time. Some examples from the included default re_filterfile:
1410    
1411    Stop web pages from displaying annoying messages in the status bar by
1412    deleting such references:
1413    
1414     FILTER: html-annoyances
1415     # New browser windows should be resizeable and have a location and st
1416    atus
1417     # bar. Make it so.
1418     #
1419     s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
1420     s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
1421     s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
1422     s/menubar="?(no|0)"?/menubar=1/ig
1423     # The <BLINK> tag was a crime!
1424     #
1425     s*<blink>|</blink>**ig
1426     # Is this evil?
1427     #
1428     #s/framespacing="?(no|0)"?//ig
1429     #s/margin(height|width)=[0-9]*//gi
1430    
1431    Just for kicks, replace any occurrence of "Microsoft" with
1432    "MicroSuck", and have a little fun with topical buzzwords:
1433    
1434     FILTER: fun
1435     s/microsoft(?!.com)/MicroSuck/ig
1436     # Buzzword Bingo:
1437     #
1438     s/industry-leading|cutting-edge|award-winning/<font color=red><b>BING
1439    O!</b></font>/ig
1440    
1441    Kill those pesky little web-bugs:
1442    
1443     # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
1444     FILTER: webbugs
1445     s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\
1446    s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
1447      _________________________________________________________________
1448    
1449 3.6. Templates
1450
1451    When Junkbuster displays one of its internal pages, such as a 404 Not
1452    Found error page, it uses the appropriate template. On Linux, BSD, and
1453    Unix, these are located in /etc/junkbuster/templates by default. These
1454    may be customized, if desired.
1455      _________________________________________________________________
1456    
1457 4. Quickstart to Using Junkbuster
1458
1459    Install package, then run and enjoy! JunkBuster is typically started
1460    by specifying the main configuration file to be used on the command
1461    line. Example Unix startup command:
1462    
1463
1464  # /usr/sbin/junkbuster /etc/junkbuster/config
1465
1466
1467    An init script is provided for SuSE and Redhat.
1468    
1469    For for SuSE: /etc/rc.d/junkbuster start
1470    
1471    For RedHat: /etc/rc.d/init.d/junkbuster start
1472    
1473    If no configuration file is specified on the command line, Junkbuster
1474    will look for a file named config in the current directory. Except on
1475    Win32 where it will try config.txt. If no file is specified on the
1476    command line and no default configuration file can be found,
1477    Junkbuster will fail to start.
1478    
1479    Be sure your browser is set to use the proxy which is by default at
1480    localhost, port 8118. With Netscape (and Mozilla), this can be set
1481    under Edit -> Preferences -> Advanced -> Proxies -> HTTP Proxy. For
1482    Internet Explorer: Tools > Internet Properties -> Connections -> LAN
1483    Setting. Then, check "Use Proxy" and fill in the appropriate info
1484    (Address: localhost, Port: 8118). Include if HTTPS proxy support too.
1485    
1486    The included default configuration files should give a reasonable
1487    starting point, though may be somewhat aggressive in blocking junk.
1488    You will probably want to keep an eye out for sites that require
1489    persistent cookies, and add these to ijb.action as needed. By default,
1490    most of these will be accepted only during the current browser
1491    session, until you add them to the configuration. If you want the
1492    browser to handle this instead, you will need to edit ijb.action and
1493    disable this feature. If you use more than one browser, it would make
1494    more sense to let Junkbuster handle this. In which case, the
1495    browser(s) should be set to accept all cookies.
1496    
1497    If a particular site shows problems loading properly, try adding it to
1498    the {fragile} section of ijb.action. This will turn off most actions
1499    for this site.
1500    
1501    Junkbuster is HTTP/1.1 compliant, but not all 1.1 features are as yet
1502    implemented. If browsers that support HTTP/1.1 (like Mozilla or recent
1503    versions of I.E.) experience problems, you might try to force HTTP/1.0
1504    compatibility. For Mozilla, look under Edit -> Preferences -> Debug ->
1505    Networking. Or set the "+downgrade" config option in ijb.action.
1506    
1507    After running Junkbuster for a while, you can start to fine tune the
1508    configuration to suit your personal, or site, preferences and
1509    requirements. There are many, many aspects that can be customized.
1510    "Actions" (as specified in ijb.action) can be adjusted by pointing
1511    your browser to [53]http://i.j.b/, and then follow the link to "edit
1512    the actions list". (This is an internal page and does not require
1513    Internet access.)
1514    
1515    In fact, various aspects of Junkbuster configuration can be viewed
1516    from this page, including current configuration parameters, source
1517    code version numbers, the browser's request headers, and "actions"
1518    that apply to a given URL. In addition to the ijb.action file editor
1519    mentioned above, Junkbuster can also be turned "on" and "off" from
1520    this page.
1521    
1522    If you encounter problems, please verify it is a Junkbuster bug, by
1523    disabling Junkbuster, and then trying the same page. Also, try another
1524    browser if possible to eliminate browser or site problems. Before
1525    reporting it as a bug, see if there is not a configuration option that
1526    is enabled that is causing the page not to load. You can then add an
1527    exception for that page or site. If a bug, please report it to the
1528    developers (see below).
1529      _________________________________________________________________
1530    
1531 4.1. Command Line Options
1532
1533    JunkBuster may be invoked with the following command-line options:
1534    
1535      * --version
1536        Print version info and exit, Unix only.
1537      * --help
1538        Print a short usage info and exit, Unix only.
1539      * --no-daemon
1540        Don't become a daemon, i.e. don't fork and become process group
1541        leader, don't detach from controlling tty. Unix only.
1542      * --pidfile FILE
1543        On startup, write the process ID to FILE. Delete the FILE on exit.
1544        Failiure to create or delete the FILE is non-fatal. If no FILE
1545        option is given, no PID file will be used. Unix only.
1546      * --user USER[.GROUP]
1547        After (optionally) writing the PID file, assume the user ID of
1548        USER, and if included the GID of GROUP. Exit if the privileges are
1549        not sufficient to do so. Unix only.
1550      * configfile
1551        If no configfile is included on the command line, JunkBuster will
1552        look for a file named "config" in the current directory (except on
1553        Win32 where it will look for "config.txt" instead). Specify full
1554        path to avoid confusion.
1555      _________________________________________________________________
1556    
1557 5. Contacting the Developers, Bug Reporting and Feature Requests
1558
1559    We value your feedback. However, to provide you with the best support,
1560    please note:
1561    
1562      * Use the [54]Sourceforge support forum to get help.
1563      * Submit bugs only thru our [55]Sourceforge bug forum. Make sure
1564        that the bug has not already been submitted. Please try to verify
1565        that it is a Junkbuster bug, and not a browser or site bug first.
1566        If you are using your own custom configuration, please try the
1567        stock configs to see if the problem is a configuration related
1568        bug. And if not using the latest development snapshot, please try
1569        the latest one. Or even better, CVS sources.
1570      * Submit feature requests only thru our [56]Sourceforge feature
1571        request forum.
1572        
1573    For any other issues, feel free to use the [57]mailing lists.
1574    
1575    Anyone interested in actively participating in development and related
1576    discussions can join the appropriate mailing list [58]here. Archives
1577    are available here too.
1578      _________________________________________________________________
1579    
1580 6. Copyright and History
1581
1582 6.1. License
1583
1584    Internet Junkbuster is free software; you can redistribute it and/or
1585    modify it under the terms of the GNU General Public License as
1586    published by the Free Software Foundation; either version 2 of the
1587    License, or (at your option) any later version.
1588    
1589    This program is distributed in the hope that it will be useful, but
1590    WITHOUT ANY WARRANTY; without even the implied warranty of
1591    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1592    General Public License for more details, which is available from
1593    [59]the Free Software Foundation, Inc, 59 Temple Place - Suite 330,
1594    Boston, MA 02111-1307, USA.
1595      _________________________________________________________________
1596    
1597 6.2. History
1598
1599    Junkbuster was originally written by Anonymous Coders and
1600    [60]Junkbuster's Corporation, and was released as free open-source
1601    software under the GNU GPL. [61]Stefan Waldherr made many
1602    improvements, and started the [62]SourceForge project to rekindle
1603    development. There are now several active developers contributing. The
1604    last stable release was v2.0.2, which has now grown whiskers ;-).
1605      _________________________________________________________________
1606    
1607 7. See also
1608
1609      [63]http://sourceforge.net/projects/ijbswa
1610    
1611      [64]http://ijbswa.sourceforge.net/
1612    
1613      [65]http://i.j.b/
1614    
1615      [66]http://www.junkbusters.com/ht/en/cookies.html
1616    
1617      [67]http://www.waldherr.org/junkbuster/
1618    
1619      [68]http://privacy.net/analyze/
1620    
1621     [69]http://www.squid-cache.org/
1622      _________________________________________________________________
1623    
1624 8. Appendix
1625
1626 8.1. Regular Expressions
1627
1628    Junkbuster can use "regular expressions" in various config files.
1629    Assuming support for "pcre" (Perl Compatible Regular Expressions) is
1630    compiled in, which is the default. Such configuration directives do
1631    not require regular expressions, but they can be used to increase
1632    flexibility by matching a pattern with wild-cards against URLs.
1633    
1634    If you are reading this, you probably don't understand what "regular
1635    expressions" are, or what they can do. So this will be a very brief
1636    introduction only. A full explanation would require a book ;-)
1637    
1638    "Regular expressions" is a way of matching one character expression
1639    against another to see if it matches or not. One of the "expressions"
1640    is a literal string of readable characters (letter, numbers, etc), and
1641    the other is a complex string of literal characters combined with
1642    wild-cards, and other special characters, called meta-characters. The
1643    "meta-characters" have special meanings and are used to build the
1644    complex pattern to be matched against. Perl Compatible Regular
1645    Expressions is an enhanced form of the regular expression language
1646    with backward compatibility.
1647    
1648    To make a simple analogy, we do something similar when we use
1649    wild-card characters when listing files with the dir command in DOS.
1650    *.* matches all filenames. The "special" character here is the
1651    asterisk which matches any and all characters. We can be more specific
1652    and use ? to match just individual characters. So "dir file?.text"
1653    would match "file1.txt", "file2.txt", etc. We are pattern matching,
1654    using a similar technique to "regular expressions"!
1655    
1656    Regular expressions do essentially the same thing, but are much, much
1657    more powerful. There are many more "special characters" and ways of
1658    building complex patterns however. Let's look at a few of the common
1659    ones, and then some examples:
1660    
1661    . - Matches any single character, e.g. "a", "A", "4", ":", or "@".
1662    
1663    ? - The preceding character or expression is matched ZERO or ONE
1664    times. Either/or.
1665    
1666    + - The preceding character or expression is matched ONE or MORE
1667    times.
1668    
1669    * - The preceding character or expression is matched ZERO or MORE
1670    times.
1671    
1672    \ - The "escape" character denotes that the following character should
1673    be taken literally. This is used where one of the special characters
1674    (e.g. ".") needs to be taken literally and not as a special
1675    meta-character.
1676    
1677    [] - Characters enclosed in brackets will be matched if any of the
1678    enclosed characters are encountered.
1679    
1680    () - parentheses are used to group a sub-expression, or multiple
1681    sub-expressions.
1682    
1683    | - The "bar" character works like an "or" conditional statement. A
1684    match is successful if the sub-expression on either side of "|"
1685    matches.
1686    
1687    s/string1/string2/g - This is used to rewrite strings of text.
1688    "string1" is replaced by "string2" in this example.
1689    
1690    These are just some of the ones you are likely to use when matching
1691    URLs with Junkbuster, and is a long way from a definitive list. This
1692    is enough to get us started with a few simple examples which may be
1693    more illuminating:
1694    
1695    /.*/banners/.* - A simple example that uses the common combination of
1696    "." and "*" to denote any character, zero or more times. In other
1697    words, any string at all. So we start with a literal forward slash,
1698    then our regular expression pattern (".*") another literal forward
1699    slash, the string "banners", another forward slash, and lastly another
1700    ".*". We are building a directory path here. This will match any file
1701    with the path that has a directory named "banners" in it. The ".*"
1702    matches any characters, and this could conceivably be more forward
1703    slashes, so it might expand into a much longer looking path. For
1704    example, this could match:
1705    "/eye/hate/spammers/banners/annoy_me_please.gif", or just
1706    "/banners/annoying.html", or almost an infinite number of other
1707    possible combinations, just so it has "banners" in the path somewhere.
1708    
1709    A now something a little more complex:
1710    
1711    /.*/adv((er)?ts?|ertis(ing|ements?))?/ - We have several literal
1712    forward slashes again ("/"), so we are building another expression
1713    that is a file path statement. We have another ".*", so we are
1714    matching against any conceivable sub-path, just so it matches our
1715    expression. The only true literal that must match our pattern is adv,
1716    together with the forward slashes. What comes after the "adv" string
1717    is the interesting part.
1718    
1719    Remember the "?" means the preceding expression (either a literal
1720    character or anything grouped with "(...)" in this case) can exist or
1721    not, since this means either zero or one match. So
1722    "((er)?ts?|ertis(ing|ements?))" is optional, as are the individual
1723    sub-expressions: "(er)", "(ing|ements?)", and the "s". The "|" means
1724    "or". We have two of those. For instance, "(ing|ements?)", can expand
1725    to match either "ing" OR "ements?". What is being done here, is an
1726    attempt at matching as many variations of "advertisement", and
1727    similar, as possible. So this would expand to match just "adv", or
1728    "advert", or "adverts", or "advertising", or "advertisement", or
1729    "advertisements". You get the idea. But it would not match
1730    "advertizements" (with a "z"). We could fix that by changing our
1731    regular expression to: "/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/",
1732    which would then match either spelling.
1733    
1734    /.*/advert[0-9]+\.(gif|jpe?g) - Again another path statement with
1735    forward slashes. Anything in the square brackets "[]" can be matched.
1736    This is using "0-9" as a shorthand expression to mean any digit one
1737    through nine. It is the same as saying "0123456789". So any digit
1738    matches. The "+" means one or more of the preceding expression must be
1739    included. The preceding expression here is what is in the square
1740    brackets -- in this case, any digit one through nine. Then, at the
1741    end, we have a grouping: "(gif|jpe?g)". This includes a "|", so this
1742    needs to match the expression on either side of that bar character
1743    also. A simple "gif" on one side, and the other side will in turn
1744    match either "jpeg" or "jpg", since the "?" means the letter "e" is
1745    optional and can be matched once or not at all. So we are building an
1746    expression here to match image GIF or JPEG type image file. It must
1747    include the literal string "advert", then one or more digits, and a
1748    "." (which is now a literal, and not a special character, since it is
1749    escaped with "\"), and lastly either "gif", or "jpeg", or "jpg". Some
1750    possible matches would include: "//advert1.jpg",
1751    "/nasty/ads/advert1234.gif", "/banners/from/hell/advert99.jpg". It
1752    would not match "advert1.gif" (no leading slash), or "/adverts232.jpg"
1753    (the expression does not include an "s"), or "/advert1.jsp" ("jsp" is
1754    not in the expression anywhere).
1755    
1756    s/microsoft(?!.com)/MicroSuck/i - This is a substitution. "MicroSuck"
1757    will replace any occurrence of "microsoft". The "i" at the end of the
1758    expression means ignore case. The "(?!.com)" means the match should
1759    fail if "microsoft" is followed by ".com". In other words, this acts
1760    like a "NOT" modifier. In case this is a hyperlink, we don't want to
1761    break it ;-).
1762    
1763    We are barely scratching the surface of regular expressions here so
1764    that you can understand the default Junkbuster configuration files,
1765    and maybe use this knowledge to customize your own installation. There
1766    is much, much more that can be done with regular expressions. Now that
1767    you know enough to get started, you can learn more on your own :/
1768    
1769    More reading on Perl Compatible Regular expressions:
1770    [70]http://www.perldoc.com/perl5.6/pod/perlre.html
1771      _________________________________________________________________
1772    
1773 8.2. JunkBuster's Internal Pages
1774
1775    Since JunkBuster proxies each requested web page, it is easy for
1776    JunkBuster to trap certain URLs. In this way, we can talk directly to
1777    JunkBuster, and see how it is configured, see how our rules are being
1778    applied, change these rules and other configuration options, and even
1779    turn JunkBuster's filtering off, all with a web browser.
1780    
1781    The URLs listed below are the special ones that allow direct access to
1782    JunkBuster. Of course, JunkBuster must be running to access these. If
1783    not, you will get a friendly error message. Internet access is not
1784    necessary either.
1785    
1786      * Junkbuster main page:
1787        
1788      [71]http://ijbswa.sourceforge.net/config/
1789        Alternately, this may be reached at [72]http://i.j.b/, but this
1790        variation may not work as reliably as the above in some
1791        configurations.
1792      * Show information about the current configuration:
1793        
1794      [73]http://ijbswa.sourceforge.net/config/show-status
1795      * Show the source code version numbers:
1796        
1797      [74]http://ijbswa.sourceforge.net/config/show-version
1798      * Show the client's request headers:
1799        
1800      [75]http://ijbswa.sourceforge.net/config/show-request
1801      * Show which actions apply to a URL and why:
1802        
1803      [76]http://ijbswa.sourceforge.net/config/show-url-info
1804      * Toggle JunkBuster on or off:
1805        
1806      [77]http://ijbswa.sourceforge.net/config/toggle
1807        Short cuts. Turn off, then on:
1808        
1809      [78]http://ijbswa.sourceforge.net/config/toggle?set=disable
1810        
1811      [79]http://ijbswa.sourceforge.net/config/toggle?set=enable
1812      * Edit the actions list file:
1813        
1814      [80]http://ijbswa.sourceforge.net/config/edit-actions
1815        
1816    These may be bookmarked for quick reference.
1817      _________________________________________________________________
1818    
1819 8.3. Anatomy of an Action
1820
1821    The way Junkbuster applies "actions" to any given URL can be complex,
1822    and not always so easy to understand what is happening. And sometimes
1823    we need to be able to see just what Junkbuster is doing. Especially,
1824    if something Junkbuster is doing is causing us a problem
1825    inadvertantly. It can be a little daunting to look at the actions
1826    files themselves, since they tend to be filled with "regular
1827    expressions" whose consequences are not always so obvious.
1828    
1829    First, you enter one URL (or partial URL), and this page will tell you
1830    how the currently configured Junkbuster "actions" are being applied to
1831    that specific URL. This will not help with filtering effects from the
1832    re_filterfile! It also will not tell you about any other URLs that may
1833    be embedded within the URL you are testing. For instance, images such
1834    as ads are expressed as URLs within the raw page source of HTML pages.
1835    So you will only get info for the actual URL that is pasted into the
1836    prompt area -- not any sub-URLs. If you want to know about embedded
1837    URLs like ads, you will have to dig those out of the HTML source. Use
1838    your browser's "View Page Source" option for this.
1839    
1840    Let's look at an example, [81]google.com, one section at a time:
1841    
1842  System default actions:
1843
1844  { -add-header -block -deanimate-gifs -downgrade -fast-redirects -filter
1845    -hide-forwarded -hide-from -hide-referer -hide-user-agent -image
1846    -image-blocker -limit-connect -no-compression -no-cookies-keep
1847    -no-cookies-read -no-cookies-set -no-popups -vanilla-wafer -wafer }
1848
1849
1850    This is the top section, and only tells us of the compiled in
1851    defaults. This is basically what Junkbuster would do if there were not
1852    any "actions" defined, i.e. it does nothing. Every action is disabled.
1853    This is not particularly informative for our purposes here. OK, next
1854    section:
1855    
1856  Matches for http://google.com:
1857
1858  { -add-header -block +deanimate-gifs -downgrade +fast-redirects
1859    +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
1860    +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
1861    +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
1862    -hide-user-agent -image +image-blocker{blank} +no-compression
1863    +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
1864    -vanilla-wafer -wafer }
1865    /
1866
1867  { -no-cookies-keep -no-cookies-read -no-cookies-set }
1868   .google.com
1869
1870  { -fast-redirects }
1871   .google.com
1872
1873
1874    This is much more informative, and tells us how we have defined our
1875    "actions", and which ones match for our example, "google.com". The
1876    first grouping shows our default settings, which would apply to all
1877    URLs. If you look at your "actions" file, this would be the section
1878    just below the "aliases" section near the top. This applies to all
1879    URLs as signified by the single forward slash -- "/".
1880    
1881    These are the default actions we have enabled. But we can define
1882    additional actions that would be exceptions to these general rules,
1883    and then list specific URLs that these exceptions would apply to. Last
1884    match wins. Just below this then are two explict matches for
1885    ".google.com". The first is negating our various cookie blocking
1886    actions (i.e. we will allow cookies here). The second is allowing
1887    "fast-redirects". Note that there is a leading dot here --
1888    ".google.com". This will match any hosts and sub-domains, in the
1889    google.com domain also, such as "www.google.com". So, apparently, we
1890    have these actions defined somewhere in the lower part of our actions
1891    file, and "google.com" is referenced in these sections.
1892    
1893    And now we pull it altogether in the bottom section and summarize how
1894    Junkbuster is appying all its "actions" to "google.com":
1895    
1896  Final results:
1897
1898  -add-header -block -deanimate-gifs -downgrade -fast-redirects
1899  +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
1900  +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
1901  +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
1902  -hide-user-agent -image +image-blocker{blank} -limit-connect +no-compression
1903  -no-cookies-keep -no-cookies-read -no-cookies-set +no-popups -vanilla-wafer
1904  -wafer
1905
1906
1907    Now another example, "ad.doubleclick.net":
1908    
1909  { +block +image }
1910   .ad.doubleclick.net
1911
1912  { +block +image }
1913   ad*.
1914
1915  { +block +image }
1916   .doubleclick.net
1917
1918
1919    We'll just show the interesting part here, the explicit matches. It is
1920    matched three different times. Each as an "+block +image", which is
1921    the expanded form of one of our aliases that had been defined as:
1922    "+imageblock". ("Aliases" are defined in the first section of the
1923    actions file and typically used to combine more than one action.)
1924    
1925    Any one of these would have done the trick and blocked this as an
1926    unwanted image. This is unnecessarily redundant since the last case
1927    effectively would also cover the first. No point in taking chances
1928    with these guys though ;-) Note that if you want an ad or obnoxious
1929    URL to be invisible, it should be defined as "ad.doubleclick.net" is
1930    done here -- as both a "+block" and an "+image". The custom alias
1931    "+imageblock" does this for us.
1932    
1933    One last example. Let's try "http://www.rhapsodyk.net/adsl/HOWTO/".
1934    This one is giving us problems. We are getting a blank page. Hmmm...
1935    
1936  Matches for http://www.rhapsodyk.net/adsl/HOWTO/:
1937
1938  { -add-header -block +deanimate-gifs -downgrade +fast-redirects
1939    +filter{html-annoyances} +filter{js-annoyances} +filter{no-popups}
1940    +filter{webbugs} +filter{nimda} +filter{banners-by-size} +filter{hal}
1941    +filter{fun} +hide-forwarded +hide-from{block} +hide-referer{forge}
1942    -hide-user-agent -image +image-blocker{blank} +no-compression
1943    +no-cookies-keep -no-cookies-read -no-cookies-set +no-popups
1944    -vanilla-wafer -wafer }
1945    /
1946
1947  { +block +image }
1948   /ads
1949
1950
1951    Ooops, the "/adsl/" is matching "/ads"! But we did not want this at
1952    all! Now we see why we get the blank page. We could now add a new
1953    action below this that explictly does not block (-block) pages with
1954    "adsl". There are various ways to handle such exceptions. Example:
1955    
1956  { -block }
1957   /adsl
1958
1959
1960    Now the page displays ;-)
1961
1962 References
1963
1964    Visible links
1965    1. http://ijbswa.sourceforge.net/user-manual/
1966    2. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INTRODUCTION
1967    3. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN27
1968    4. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION
1969    5. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-SOURCE
1970    6. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-RH
1971    7. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-SUSE
1972    8. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-OS2
1973    9. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-WIN
1974   10. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#INSTALLATION-OTHER
1975   11. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#CONFIGURATION
1976   12. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN144
1977   13. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN161
1978   14. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN192
1979   15. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN225
1980   16. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN317
1981   17. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN454
1982   18. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN542
1983   19. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN651
1984   20. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#ACTIONSFILE
1985   21. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN749
1986   22. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN823
1987   23. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1143
1988   24. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#FILTERFILE
1989   25. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1202
1990   26. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#QUICKSTART
1991   27. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1257
1992   28. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#CONTACT
1993   29. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#COPYRIGHT
1994   30. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1316
1995   31. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1322
1996   32. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#SEEALSO
1997   33. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#APPENDIX
1998   34. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#REGEX
1999   35. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1506
2000   36. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#ACTIONSANAT
2001   37. http://i.j.b/
2002   38. http://sourceforge.net/projects/ijbswa/
2003   39. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/current/
2004   40. http://www.gnu.org/
2005   41. http://i.j.b/
2006   42. http://ijbswa.sourceforge.net/config/
2007   43. http://i.j.b/
2008   44. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#ACTIONSFILE
2009   45. http://i.j.b/
2010   46. http://i.j.b/
2011   47. http://i.j.b/
2012   48. http://i.j.b/
2013   49. http://i.j.b/show-url-info
2014   50. http://www.perldoc.com/perl5.6/pod/perlre.html
2015   51. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#REGEX
2016   52. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#ACTIONSANAT
2017   53. http://i.j.b/
2018   54. http://sourceforge.net/tracker/?group_id=11118&atid=211118
2019   55. http://sourceforge.net/tracker/?group_id=11118&atid=111118
2020   56. http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse
2021   57. http://sourceforge.net/mail/?group_id=11118
2022   58. http://sourceforge.net/mail/?group_id=11118
2023   59. http://www.gnu.org/copyleft/gpl.html
2024   60. http://www.junkbusters.com/ht/en/ijbfaq.html
2025   61. http://www.waldherr.org/junkbuster/
2026   62. http://sourceforge.net/projects/ijbswa/
2027   63. http://sourceforge.net/projects/ijbswa
2028   64. http://ijbswa.sourceforge.net/
2029   65. http://i.j.b/
2030   66. http://www.junkbusters.com/ht/en/cookies.html
2031   67. http://www.waldherr.org/junkbuster/
2032   68. http://privacy.net/analyze/
2033   69. http://www.squid-cache.org/
2034   70. http://www.perldoc.com/perl5.6/pod/perlre.html
2035   71. http://ijbswa.sourceforge.net/config/
2036   72. http://i.j.b/
2037   73. http://ijbswa.sourceforge.net/config/show-status
2038   74. http://ijbswa.sourceforge.net/config/show-version
2039   75. http://ijbswa.sourceforge.net/config/show-request
2040   76. http://ijbswa.sourceforge.net/config/show-url-info
2041   77. http://ijbswa.sourceforge.net/config/toggle
2042   78. http://ijbswa.sourceforge.net/config/toggle?set=disable
2043   79. http://ijbswa.sourceforge.net/config/toggle?set=enable
2044   80. http://ijbswa.sourceforge.net/config/edit-actions
2045   81. http://google.com/
2046
2047    Hidden links:
2048   82. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1378
2049   83. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1386
2050   84. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1389
2051   85. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1392
2052   86. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1395
2053   87. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1400
2054   88. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1403
2055   89. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1406
2056   90. file://localhost/home/swa/sf/current-org/doc/source/tmp.html#AEN1412