1 <!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
3 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 File : $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
8 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
10 $Id: user-manual.sgml,v 1.16 2001/10/21 17:19:21 swa Exp $
12 Written by and Copyright (C) 2001 the SourceForge
13 IJBSWA team. http://ijbswa.sourceforge.net
15 Based on the Internet Junkbuster originally written
16 by and Copyright (C) 1997 Anonymous Coders and
17 Junkbusters Corporation. http://www.junkbusters.com
21 Sun 09/23/01 08:53:31 PM
23 This is an unfinished, rough draft. Anyone reading this, believe let me
24 know errors!!!!! Stefan, especially you!
26 Hal Burgiss <hal@foobox.net>
31 <title>Junkbuster User Manual</title>
33 <pubdate>$Id: user-manual.sgml,v 1.16 2001/10/21 17:19:21 swa Exp $</pubdate>
38 <orgname>By: Junkbuster Developers</orgname>
45 The user manual gives the users information on how to install and configure
46 <application>Internet Junkbuster</application>. <application>Internet
47 Junkbuster</application> is an application that provides privacy and
48 security to users of the World Wide Web.
51 You can find the latest version of the user manual at <ulink url="http://ijbswa.sourceforge.net/user-manual/">http://ijbswa.sourceforge.net/user-manual/</ulink>.
55 Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>.
62 <!-- ~~~~~ New section ~~~~~ -->
64 <sect1 id="introduction"><title>Introduction</title>
66 <application>Internet Junkbuster</application> is a web proxy with advanced
67 filtering capabilities for protecting privacy, filtering web page content,
68 managing cookies, controlling access, and removing ads, banners, pop-ups and
69 other obnoxious Internet Junk. <application>Junkbuster</application> has a
70 very flexible configuration and can be customized to suit individual needs
71 and tastes. <application>Internet Junkbuster</application> has application
72 for both stand-alone systems and multi-user networks.
76 This documentation is included with the current development version of
77 <application>Internet Junkbuster</application> and is incomplete at this
78 point. The most up to date reference for the time being is still the comments
79 in the source files and in the individual configuration files. Development
80 of version 3.0 is currently underway, and includes many significant changes and
81 enhancements over earlier verions. The target release date for stable v3.0 is
86 Since this is a development version, some features are in the process of
87 being implemented. This documentation may be slightly out of sync as a
88 result. And there <emphasis>are</emphasis> bugs, though hopefully not many!
92 <!-- ~~~~~ New section ~~~~~ -->
94 <title>New Features</title>
96 In addition to <application>Junkbuster's</application> traditional features
97 of ad and banner blocking and cookie management, this is a list of new
98 features currently under development:
106 Modularized configuration that will allow for system wide settings, and
107 individual user settings.
113 A browser based GUI configuration utility (not finished).
119 Blocking of annoying pop-up browser windows (previously available as a
126 Partial support for HTTP/1.1.
132 Support for Perl Compatible Regular Expressions in the configuration files, and
133 generally a more sophisticated configuration syntax over previous versions.
139 Web page content filtering.
156 <!-- ~ End section ~ -->
159 <!-- ~~~~~ New section ~~~~~ -->
160 <sect1 id="installation"><title>Installation</title>
162 <application>Junkbuster</application> is available as raw source code, or
163 pre-compiled binaries. See the <ulink
164 url="http://sourceforge.net/projects/ijbswa/">Junkbuster Home Page</ulink>
165 for current release info. <application>Junkbuster</application> is also available
167 url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/current/">CVS</ulink>.
168 This is the recommended approach at this time. But please be aware that CVS
169 is constantly changing, and it may break in mysterious ways.
172 <!-- ~~~~~ New section ~~~~~ -->
173 <sect2 id="installation-source"><title>Source</title>
175 For gzipped tar archives, unpack the source:
180 tar zxvf ijb_source_2.9*
186 For retrieving the current CVS sources, you'll need the CVS
187 package installed first. To download CVS source:
192 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
193 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current
199 This will create a directory named <filename>current/</filename>, which will
200 contain the source tree.
204 Then, in either case, to build from source:
209 autoconf #recommended for CVS source
218 For Redhat and SuSE Linux RPM packages, see below.
224 <!-- ~~~~~ New section ~~~~~ -->
225 <sect2 id="installation-rh"><title>Red Hat</title>
227 To build Redhat RPM packages, install source as above. Then:
232 autoconf #recommended for CVS source
239 This will create both binary and src RPMs in the usual places. Example:
243 /usr/src/redhat/RPMS/i686/junkbuster-2.9.8-1.i686.rpm
246 /usr/src/redhat/SRPMS/junkbuster-2.9.9-1.src.rpm
250 To install, of course:
255 rpm -Uvv /usr/src/redhat/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
260 This will place the <application>Junkbuster</application> configuration
261 files in <filename>/etc/junkbuster/</filename>, and log files in
262 <filename>/var/log/junkbuster/</filename>.
267 <!-- ~~~~~ New section ~~~~~ -->
268 <sect2 id="installation-suse"><title>SuSE</title>
270 To build SuSE RPM packages, install source as above. Then:
275 autoconf #recommended for CVS source
282 This will create both binary and src RPMs in the usual places. Example:
286 /usr/src/suse/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
289 /usr/src/suse/SRPMS/junkbuster-2.9.9-1.src.rpm
293 To install, of course:
298 rpm -Uvv /usr/src/suse/RPMS/i686/junkbuster-2.9.9-1.i686.rpm
303 This will place the <application>Junkbuster</application> configuration
304 files in <filename>/etc/junkbuster/</filename>, and log files in
305 <filename>/var/log/junkbuster/</filename>.
311 <!-- ~~~~~ New section ~~~~~ -->
312 <sect2 id="installation-os2"><title>OS/2</title>
319 The OS/2 version of <application>Junkbuster</application> requires the EMX
320 runtime library to be installed. The EMX runtime library is available on
321 the hobbes OS/2 archive, among many other locations:
322 <ulink url="http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=emxrt.zip&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fdev%2Femx%2Fv0.9d">http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=emxrt.zip&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fdev%2Femx%2Fv0.9d</ulink>
326 <application>Junkbuster</application> is packaged in a WarpIN self-
327 installing archive. The self-installing program will be named depending
328 on the release version, something like:
329 <filename>ijbos123.exe</filename>. In order to install it, simply run
330 this executable or double-click on its icon and follow the WarpIN
331 installation panels. A shadow of the <application>Junkbuster</application>
332 executable will be placed in your startup folder so it will start
333 automatically whenever OS/2 starts.
337 The directory you choose to install <application>Junkbuster</application>
338 into will contain all of the configuration files.
342 If you would like to build binary images on OS/2 yourself, you will need
343 a working EMX/GCC environment, plus several Unix-like tools. The Hobbes
344 OS/2 archive is a good place to start when building such an environment.
345 A set of Unix-like tools named gnupack is located here:
346 <ulink url="http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&key=gnupack&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fapps">http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&key=gnupack&stype=all&sort=type&dir=%2Fpub%2Fos2%2Fapps</ulink>
349 Once you have the source code unpacked as above, you can build the binaries
350 from the <filename>current/</filename> directory:
364 <!-- ~~~~~ New section ~~~~~ -->
365 <sect2 id="installation-win"><title>Windows</title>
366 <para>Click-click. (I need help on this. Not a clue here. Also for
367 configuration section below. HB.)
371 <!-- ~~~~~ New section ~~~~~ -->
372 <sect2 id="installation-other"><title>Other</title>
374 Some quick notes on other Operating Systems.
378 For FreeBSD (and other *BSDs?), the build will need <command>gmake</command>
379 instead of the included <command>make</command>. <command>gmake</command> is
380 available from <ulink url="http://www.gnu.org">http://www.gnu.org</ulink>.
381 The rest should be the same as above for Linux/Unix.
388 <!-- ~ End section ~ -->
391 <!-- ~~~~~ New section ~~~~~ -->
392 <sect1 id="configuration"><title>Junkbuster Configuration</title>
394 For Unix, *BSD and Linux, all configuraton files are located in
395 <filename>/etc/junkbuster/</filename> by default. For MS Windows and OS/2,
396 these are all in the same directory as the
397 <application>Junkbuster</application> executable. The name and number of
398 configuration files has changed from previous versions, and is subject to
399 change as development progresses.
403 The installed defaults provide a reasonable starting point. For the
404 time being, there are only three default configuration files (this will
413 The main configuration file is named <filename>config</filename>
414 on Linux, Unix, BSD, and OS/2, and <filename>junkbustr.txt</filename> on
415 Windows. On Amiga, it is
416 <filename>AmiTCP:db/junkbuster/config</filename>.
422 The <filename>actionsfile</filename> file is used to define various
423 actions relating to images, banners, pop-ups, banners and cookies.
424 There is a CGI based editor for this file that can be accessed
425 via <ulink url="http://ijbswa.sourceforge.net/config/">http://ijbswa.sourceforge.net/config/</ulink>.
426 (Still under active development.)
432 The <filename>re_filterfile</filename> file can be used to rewrite the raw
433 page content, including text as well as embedded HTML and JavaScript.
441 <filename>actionsfile</filename> and <filename>re_filterfile</filename>
442 can use Perl style regular expressions for maximum flexibility. All files use
443 the <quote><literal>#</literal></quote> character to denote a comment. Such
444 lines are not processed by <application>Junkbuster</application>. After
445 making any changes, restart <application>Junkbuster</application> in order
446 for the changes to take effect.
450 <!-- ~~~~~ New section ~~~~~ -->
453 <title>The Main Configuration File</title>
455 Again, the main configuration file is named <filename>config</filename> on
456 Linux/Unix/BSD and OS/2, and <filename>junkbustr.txt</filename> on Windows.
457 Configuration lines consist of an initial keyword followed by a list of
458 values, all separated by whitespace (any number of spaces or tabs). For
466 <emphasis>blockfile blocklist.ini</emphasis>
473 Indicates that the blockfile is named <quote>blocklist.ini</quote>.
477 A <quote><literal>#</literal></quote> indicates a comment. Any part of a
478 line following a <quote><literal>#</literal></quote> is ignored, except if
479 the <quote><literal>#</literal></quote> is preceded by a
480 <quote><literal>\</literal></quote>.
484 Thus, by placing a <quote><literal>#</literal></quote> at the start of an
485 existing configuration line, you can make it a comment and it will be treated
486 as if it weren't there. This is called <quote>commenting out</quote> an
487 option and can be useful to turn off features: If you comment out the
488 <quote>logfile</quote> line, <application>junkbuster</application> will not
489 log to a file at all. Watch for the <quote>default:</quote> section in each
490 explanation to see what happens if the option is left unset (or commented
495 Long lines can be continued on the next line by using a
496 <quote><literal>\</literal></quote> as the very last character.
500 There are various aspects of <application>Junkbuster</application> behavior
505 <!-- ~~~~~ New section ~~~~~ -->
508 <title>Defining Other Configuration Files</title>
511 <application>Junkbuster</application> can use a number of other files to tell it
512 what ads to block, what cookies to accept, etc. This section of the
513 configuration file tells <application>Junkbuster</application> where to find
514 all those other files.
518 On <application>Windows</application>, <application>Junkbuster</application>
519 looks for these files in the same directory as the executable. On Unix and
520 OS/2, <application>Junkbuster</application> looks for these files in the current
521 working directory. In either case, an absolute path name can be used to
526 When development goes modular and multiuser, the blocker, filter, and
527 per-user config will be stored in subdirectories of <quote>confdir</quote>.
528 For now, only <filename>confdir/templates</filename> is used for storing HTML
529 templates for CGI results.
533 The location of the configuration files:
540 <emphasis>confdir /etc/junkbuster</emphasis> # No trailing /, please.
547 The directory where all logging (i.e. <filename>logfile</filename> and
548 <filename>jarfile</filename>) takes place. No trailing
549 <quote><literal>/</literal></quote>, please:
556 <emphasis>logdir /var/log/junkbuster</emphasis>
563 Note that all file specifications below are relative to
564 the above two directories!
568 The <quote>actionsfile</quote> contains patterns to specify the actions to
569 apply to requests for each site. Default: Cookies to and from all
570 destinations are filtered. Popups are disabled for all sites. All sites are
571 filtered if re_filterfile specified. No sites are blocked. An empty image is
572 displayed for filtered ads and other images (formerly
573 <quote>tinygif</quote>). The syntax of this file is explained in detail
574 <link linkend="actionsfile">below</link>.
581 <emphasis>actionsfile actionsfile</emphasis>
588 The <quote>re_filterfile</quote> file contains content modification rules.
589 These rules permit powerful changes on the content of Web pages, e.g., you
590 could disable your favourite JavaScript annoyances, rewrite the actual
591 content, or just have some fun replacing <quote>Microsoft</quote> with
592 <quote>MicroSuck</quote> wherever it appears on a Web page. Default: No
593 content modification, or whatever the developers are playing with :-/
600 <emphasis>re_filterfile re_filterfile</emphasis>
607 The logfile is where all logging and error messages are written. The logfile
608 can be useful for tracking down a problem with
609 <application>Junkbuster</application> (e.g., it's not blocking an ad you
610 think it should block) but in most cases you probably will never look at it.
614 Your logfile will grow indefinitely, and you will probably want to
615 periodically remove it. On Unix systems, you can do this with a cron job
616 (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command>
617 script has been included.
621 On SuSE Linux systems, you can place a line like <quote>/var/log/junkbuster.*
622 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
623 the effect that cron.daily will automatically archive, gzip, and empty the
624 log, when it exceeds 1M size.
628 Default: Log to the a file named <filename>logfile</filename>.
629 Comment out to disable logging.
636 <emphasis>logfile logfile</emphasis>
643 The <quote>jarfile</quote> defines where
644 <application>Junkbuster</application> stores the cookies it intercepts. Note
645 that if you use a <quote>jarfile</quote>, it may grow quite large. Default:
646 Don't store intercepted cookies.
653 <emphasis>#jarfile jarfile</emphasis>
660 If you specify a <quote>trustfile</quote>,
661 <application>Junkbuster</application> will only allow access to sites that
662 are named in the trustfile. You can also mark sites as trusted referrers,
663 with the effect that access to untrusted sites will be granted, if a link
664 from a trusted referrer was used. The link target will then be added to the
665 <quote>trustfile</quote>. This is a very restrictive feature that typical
666 users most propably want to leave disabled. Default: Disabled, don't use the
674 <emphasis>#trustfile trust</emphasis>
681 If you use the trust mechanism, it is a good idea to write up some online
682 documentation about your blocking policy and to specify the URL(s) here. They
683 will appear on the page that your users receive when they try to access
684 untrusted content. Use multiple times for multiple URLs. Default: Don't
685 display links on the <quote>untrusted</quote> info page.
692 <emphasis>trust-info-url http://www.your-site.com/why_we_block.html</emphasis>
693 <emphasis>trust-info-url http://www.your-site.com/what_we_allow.html</emphasis>
701 <!-- ~ End section ~ -->
705 <!-- ~~~~~ New section ~~~~~ -->
708 <title>Other Configuration Options</title>
711 This part of the configuration file contains options that control how
712 <application>Junkbuster</application> operates.
716 <quote>Admin-address</quote> should be set to the email address of the proxy
717 administrator. It is used in many of the proxy-generated pages. Default:
725 <emphasis>#admin-address fill@me.in.please</emphasis>
732 <quote>Proxy-info-url</quote> can be set to a URL that contains more info
733 about this <application>Junkbuster</application> installation, it's
734 configuration and policies. It is used in many of the proxy-generated pages
735 and its use is highly recommended in multi-user installations, since your
736 users will want to know why certain content is blocked or modified. Default:
737 Don't show a link to online documentation.
744 <emphasis>proxy-info-url http://www.your-site.com/proxy.html</emphasis>
751 <quote>Listen-address</quote> specifies the address and port where
752 <application>Junkbuster</application> will listen for connections from your
753 Web browser. The default is to listen on the localhost port 8000, and
754 this is suitable for most users. (In your web browser, under proxy
755 configuration, list the proxy server as <quote>localhost</quote> and the
756 port as <quote>8000</quote>).
760 If you already have another service running on port 8000, or if you want to
761 serve requests from other machines (e.g. on your local network) as well, you
762 will need to override the default. The syntax is
763 <quote>listen-address [<ip-address>]:<port></quote>. If you leave
764 out the IP adress, <application>junkbuster</application> will bind to all
765 interfaces (addresses) on your machine and may become reachable from the
766 internet. In that case, consider using access control lists (acl's) (see
767 <quote>aclfile</quote> above).
771 For example, suppose you are running <application>Junkbuster</application> on
772 a machine which has the address 192.168.0.1 on your local private network
773 (192.168.0.0) and has another outside connection with a different address.
774 You want it to serve requests from inside only:
781 <emphasis>listen-address 192.168.0.1:8000</emphasis>
788 If you want it to listen on all addresses (including the outside
796 <emphasis>listen-address :8000</emphasis>
803 If you do this, consider using ACLs (see <quote>aclfile</quote> above). Note:
804 you will need to point your browser(s) to the address and port that you have
805 configured here. Default: localhost:8000 (127.0.0.1:8000).
809 The debug option sets the level of debugging information to log in the
810 logfile (and to the console in the Windows version). A debug level of 1 is
811 informative because it will show you each request as it happens. Higher
812 levels of debug are probably only of interest to developers.
819 debug 1 # GPC = show each GET/POST/CONNECT request
820 debug 2 # CONN = show each connection status
821 debug 4 # IO = show I/O status
822 debug 8 # HDR = show header parsing
823 debug 16 # LOG = log all data into the logfile
824 debug 32 # FRC = debug force feature
825 debug 64 # REF = debug regular expression filter
826 debug 128 # = debug fast redirects
827 debug 256 # = debug GIF deanimation
828 debug 512 # CLF = Common Log Format
829 debug 1024 # = debug kill popups
830 debug 4096 # INFO = Startup banner and warnings.
831 debug 8192 # ERROR = Non-fatal errors
838 It is <emphasis>highly recommended</emphasis> that you enable ERROR
839 reporting (debug 8192), at least until the next stable release.
843 The reporting of FATAL errors (i.e. ones which crash
844 <application>JunkBuster</application>) is always on and cannot be disabled.
848 If you want to use CLF (Common Log Format), you should set <quote>debug
849 512</quote> ONLY, do not enable anything else.
853 Multiple <quote>debug</quote> directives, are OK - they're logical-OR'd
861 <emphasis>debug 15 # same as setting the first 4 listed above</emphasis>
875 <emphasis>debug 1 # URLs</emphasis>
876 <emphasis>debug 4096 # Info</emphasis>
877 <emphasis>debug 8192 # Errors - *we highly recommended enabling this*</emphasis>
884 <application>Junkbuster</application> normally uses
885 <quote>multi-threading</quote>, a software technique that permits it to
886 handle many different requests simultaneously. In some cases you may wish to
887 disable this -- particularly if you're trying to debug a problem. The
888 <quote>single-threaded</quote> option forces
889 <application>Junkbuster</application> to handle requests sequentially.
890 Default: Multi-threaded mode.
897 <emphasis>#single-threaded</emphasis>
904 <quote>toggle</quote> allows you to temporarily disable all
905 <application>Junkbuster's</application> filtering. Just set <quote>toggle
910 The Windows version of <application>Junkbuster</application> puts an icon in
911 the system tray, which allows you to change this option without having to
912 edit this file. If you right-click on that icon (or select the
913 <quote>Options</quote> menu), one choice is <quote>Enable</quote>. Clicking
914 on enable toggles <application>Junkbuster</application> on and off. This is
915 useful if you want to temporarily disable
916 <application>Junkbuster</application>, e.g., to access a site that requires
917 cookies which you normally have blocked.
921 <quote>toggle 1</quote> means <application>Junkbuster</application> runs
922 normally, <quote>toggle 0</quote> means that
923 <application>Junkbuster</application> becomes a non-anonymizing non-blocking
931 <emphasis>toggle 1</emphasis>
938 For content filtering, i.e. the <quote>+filter</quote> and
939 <quote>+deanimate-gif</quote> actions, it is neccessary that
940 <application>Junkbuster</application> buffers up the entire document body.
941 This can be potentially dangerous, since a server could just keep sending
942 data indefinitely and wait for your RAM to exhaust.
946 The <application>buffer-limit</application> option lets you set the maximum
947 size in Kbytes that each buffer may use. When the documents buffer exceeds
948 this size, it is flushed to the client unfiltered and no further attempt to
949 filter the rest of it is made. Remember that there may multiple threads
950 running, which might require increasing the <quote>buffer-limit</quote>
951 Kbytes <emphasis>each</emphasis>, unless you have enabled
952 <quote>single-threaded</quote> above.
959 <emphasis>buffer-limit 4069</emphasis>
966 To enable the web-based actionsfile editor set
967 <application>enable-edit-actions</application> to 1, or 0 to disable. Note
968 that you must have compiled <application>JunkBuster</application> with
969 support for this feature, otherwise this option has no effect. This
970 internal page can be reached at <ulink
971 url="http://ijbswa.sourceforge.net/config/">http://ijbswa.sourceforge.net/config/</ulink>.
975 Security note: If this is enabled, anyone who can use the proxy
976 can edit the actions file, and their changes will affect all users.
977 For shared proxies, you probably want to disable this. Default: enabled.
984 <emphasis>enable-edit-actions 1</emphasis>
991 Allow <application>JunkBuster</application> to be toggled on and off
992 remotely, using your web browser. Set <quote>enable-remote-toggle</quote>to
993 1 to enable, and 0 to disable. Note that you must have compiled
994 <application>JunkBuster</application> with support for this feature,
995 otherwise this option has no effect.
999 Security note: If this is enabled, anyone who can use the proxy
1000 can toggle it on or off, and their changes will affect all users.
1001 For shared proxies, you probably want to disable this. Default:
1009 <emphasis>enable-remote-toggle 1</emphasis>
1017 <!-- ~ End section ~ -->
1020 <!-- ~~~~~ New section ~~~~~ -->
1023 <title>Access Control List (ACL)</title>
1025 Access controls are included at the request of some ISPs and systems
1026 administrators, and are not usually needed by individual users. Please note
1027 the warnings in the FAQ that this proxy is not intended to be a substitute
1028 for a firewall or to encourage anyone to defer addressing basic security
1033 If no access settings are specified, the proxy talks to anyone that
1034 connects. If any access settings file are specified, then the proxy
1035 talks only to IP addresses permitted somewhere in this file and not
1036 denied later in this file.
1040 Summary -- if using an ACL:
1045 Client must have permission to receive service.
1050 LAST match in ACL wins.
1055 Default behavior is to deny service.
1060 The syntax for an entry in the Access Control List is:
1067 ACTION SRC_ADDR[/SRC_MASKLEN] [ DST_ADDR[/DST_MASKLEN] ]
1074 Where the individual fields are:
1081 <emphasis>ACTION</emphasis> = <quote>permit-access</quote> or <quote>deny-access</quote>
1083 <emphasis>SRC_ADDR</emphasis> = client hostname or dotted IP address
1084 <emphasis>SRC_MASKLEN</emphasis> = number of bits in the subnet mask for the source
1086 <emphasis>DST_ADDR</emphasis> = server or forwarder hostname or dotted IP address
1087 <emphasis>DST_MASKLEN</emphasis> = number of bits in the subnet mask for the target
1095 The field separator (FS) is whitespace (space or tab).
1099 IMPORTANT NOTE: If the <application>junkbuster</application> is using a
1100 forwarder (see below) or a gateway for a particular destination URL, the
1101 <literal>DST_ADDR</literal> that is examined is the address of the forwarder
1102 or the gateway and <emphasis>NOT</emphasis> the address of the ultimate
1103 target. This is necessary because it may be impossible for the local
1104 <application>Junkbuster</application> to determine the address of the
1105 ultimate target (that's often what gateways are used for).
1109 Here are a few examples to show how the ACL features work:
1113 <quote>localhost</quote> is OK -- no DST_ADDR implies that
1114 <emphasis>ALL</emphasis> destination addresses are OK:
1121 <emphasis>permit-access localhost</emphasis>
1128 A silly example to illustrate permitting any host on the class-C subnet with
1129 <application>Junkbuster</application> to go anywhere:
1136 <emphasis>permit-access www.junkbusters.com/24</emphasis>
1143 Except deny one particular IP address from using it at all:
1150 <emphasis>deny-access ident.junkbusters.com</emphasis>
1157 You can also specify an explicit network address and subnet mask.
1158 Explicit addresses do not have to be resolved to be used.
1165 <emphasis>permit-access 207.153.200.0/24</emphasis>
1172 A subnet mask of 0 matches anything, so the next line permits everyone.
1179 <emphasis>permit-access 0.0.0.0/0</emphasis>
1186 Note, you <emphasis>cannot</emphasis> say:
1193 <emphasis>permit-access .org</emphasis>
1200 to allow all *.org domains. Every IP address listed must resolve fully.
1204 An ISP may want to provide a <application>Junkbuster</application> that is
1205 accessible by <quote>the world</quote> and yet restrict use of some of their
1206 private content to hosts on its internal network (i.e. its own subscribers).
1207 Say, for instance the ISP owns the Class-B IP address block 123.124.0.0 (a 16
1208 bit netmask). This is how they could do it:
1215 <emphasis>permit-access 0.0.0.0/0 0.0.0.0/0</emphasis> # other clients can go anywhere
1216 # with the following exceptions:
1218 <emphasis>deny-access</emphasis> 0.0.0.0/0 123.124.0.0/16 # block all external requests for
1219 # sites on the ISP's network
1221 <emphasis>permit 0.0.0.0/0 www.my_isp.com</emphasis> # except for the ISP's main
1224 <emphasis>permit 123.124.0.0/16 0.0.0.0/0</emphasis> # the ISP's clients can go
1232 Note that if some hostnames are listed with multiple IP addresses,
1233 the primary value returned by DNS (via gethostbyname()) is used. Default:
1234 Anyone can access the proxy.
1239 <!-- ~ End section ~ -->
1242 <!-- ~~~~~ New section ~~~~~ -->
1245 <title>Forwarding</title>
1248 This feature allows chaining of HTTP requests via multiple proxies.
1249 It can be used to better protect privacy and confidentiality when
1250 accessing specific domains by routing requests to those domains
1251 to a special purpose filtering proxy such as lpwa.com. Or to use
1252 a caching proxy to speed up browsing.
1256 It can also be used in an environment with multiple networks to route
1257 requests via multiple gateways allowing transparent access to multiple
1258 networks without having to modify browser configurations.
1262 Also specified here are SOCKS proxies. <application>Junkbuster</application>
1263 SOCKS 4 and SOCKS 4A. The difference is that SOCKS 4A will resolve the target
1264 hostname using DNS on the SOCKS server, not our local DNS client.
1268 The syntax of each line is:
1275 <emphasis>forward target_domain[:port] http_proxy_host[:port]</emphasis>
1276 <emphasis>forward-socks4 target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1277 <emphasis>forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1284 If http_proxy_host is <quote>.</quote>, then requests are not forwarded to a
1285 HTTP proxy but are made directly to the web servers.
1289 Lines are checked in sequence, and the last match wins.
1293 There is an implicit line equivalent to the following, which specifies that
1294 anything not finding a match on the list is to go out without forwarding
1295 or gateway protocol, like so:
1302 <emphasis>forward .* . </emphasis># implicit
1309 In the following common configuration, everything goes to Lucent's LPWA,
1310 except SSL on port 443 (which it doesn't handle):
1317 <emphasis>forward .* lpwa.com:8000</emphasis>
1318 <emphasis>forward :443 .</emphasis>
1325 See the FAQ for instructions on how to automate the login procedure for LPWA.
1326 Some users have reported difficulties related to LPWA's use of
1327 <quote>.</quote> as the last element of the domain, and have said that this
1328 can be fixed with this:
1335 <emphasis>forward lpwa. lpwa.com:8000</emphasis>
1342 (NOTE: the syntax for specifiying target_domain has changed since the
1343 previous paragraph was written -- it will not work now. More information
1348 In this fictitious example, everything goes via an ISP's caching proxy,
1349 except requests to that ISP:
1356 <emphasis>forward .* caching.myisp.net:8000</emphasis>
1357 <emphasis>forward myisp.net .</emphasis>
1364 For the @home network, we're told the forwarding configuration is this:
1372 <emphasis>forward .* proxy:8080</emphasis>
1379 Also, we're told they insist on getting cookies and JavaScript, so you need
1380 to add home.com to the cookie file. We consider JavaScript a security risk.
1381 Java need not be enabled.
1385 In this example direct connections are made to all <quote>internal</quote>
1386 domains, but everything else goes through Lucent's LPWA by way of the
1387 company's SOCKS gateway to the Internet.
1394 <emphasis>forward_socks4 .* lpwa.com:8000 firewall.my_company.com:1080</emphasis>
1395 <emphasis>forward my_company.com .</emphasis>
1402 This is how you could set up a site that always uses SOCKS but no forwarders:
1409 <emphasis>forward_socks4a .* . firewall.my_company.com:1080</emphasis>
1416 An advanced example for network administrators:
1420 If you have links to multiple ISPs that provide various special content to
1421 their subscribers, you can configure forwarding to pass requests to the
1422 specific host that's connected to that ISP so that everybody can see all
1423 of the content on all of the ISPs.
1427 This is a bit tricky, but here's an example:
1432 host-a has a PPP connection to isp-a.com. And host-b has a PPP connection to
1433 isp-b.com. host-a can run a <application>Junkbuster</application> proxy with
1434 forwarding like this:
1441 <emphasis>forward .* .</emphasis>
1442 <emphasis>forward isp-b.com host-b:8000</emphasis>
1449 host-b can run a <application>Junkbuster</application> proxy with forwarding
1457 <emphasis>forward .* .</emphasis>
1458 <emphasis>forward isp-a.com host-a:8000</emphasis>
1465 Now, <emphasis>anyone</emphasis> on the Internet (including users on host-a
1466 and host-b) can set their browser's proxy to <emphasis>either</emphasis>
1467 host-a or host-b and be able to browse the content on isp-a or isp-b.
1471 Here's another practical example, for University of Kent at
1472 Canterbury students with a network connection in their room, who
1473 need to use the University's Squid web cache.
1480 <emphasis>forward *. ssbcache.ukc.ac.uk:3128</emphasis> # Use the proxy, except for:
1481 <emphasis>forward .ukc.ac.uk . </emphasis> # Anything on the same domain as us
1482 <emphasis>forward * . </emphasis> # Host with no domain specified
1483 <emphasis>forward 129.12.*.* . </emphasis> # A dotted IP on our /16 network.
1484 <emphasis>forward 127.*.*.* . </emphasis> # Loopback address
1485 <emphasis>forward localhost.localdomain . </emphasis> # Loopback address
1486 <emphasis>forward www.ukc.mirror.ac.uk . </emphasis> # Specific host
1493 If you intend to chain <application>Junkbuster</application> and
1494 <application>squid</application> locally, then chain as
1495 <literal>browser -> squid -> junkbuster</literal> is the recommended way.
1499 Your squid configuration could then look like this:
1506 # Define junkbuster as parent cache
1507 <!-- per feedback from user...
1508 cache_peer 127.0.0.1 8000 parent 0 no-query
1510 cache_peer 127.0.0.1 parent 8000 0 no-query
1512 # Define ACL for protocol FTP
1515 # Do not forward ACL FTP to junkbuster
1516 always_direct allow FTP
1518 # Do not forward ACL CONNECT (https) to junkbuster
1519 always_direct allow CONNECT
1521 # Forward the rest to junkbuster
1522 never_direct allow all
1530 <!-- ~ End section ~ -->
1533 <!-- ~~~~~ New section ~~~~~ -->
1536 <title>Windows GUI Options</title>
1538 Removed references to Win32. HB 09/23/01
1541 <application>Junkbuster</application> has a number of options specific to the
1542 Windows GUI interface:
1546 If <quote>activity-animation</quote> is set to 1, the
1547 <application>Junkbuster</application> icon will animate when
1548 <quote>Junkbuster</quote> is active. To turn off, set to 0.
1555 <emphasis>activity-animation 1</emphasis>
1562 If <quote>log-messages</quote> is set to 1,
1563 <application>Junkbuster</application> will log messages to the console
1571 <emphasis>log-messages 1</emphasis>
1578 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
1579 i.e. the amount of memory used for the log messages displayed in the
1580 console window, will be limited to <quote>log-max-lines</quote> (see below).
1584 Warning: Setting this to 0 will result in the buffer to grow infinitely and
1585 eat up all your memory!
1592 <emphasis>log-buffer-size 1</emphasis>
1599 <application>log-max-lines</application> is the maximum number of lines held
1600 in the log buffer. See above.
1607 <emphasis>log-max-lines 200</emphasis>
1614 If <quote>log-highlight-messages</quote> is set to 1,
1615 <application>Junkbuster</application> will highlight portions of the log
1616 messages with a bold-faced font:
1623 <emphasis>log-highlight-messages 1</emphasis>
1630 The font used in the console window:
1637 <emphasis>log-font-name Comic Sans MS</emphasis>
1644 Font size used in the console window:
1651 <emphasis>log-font-size 8</emphasis>
1658 <quote>show-on-task-bar</quote> controls whether or not
1659 <application>Junkbuster</application> will appear as a button on the Task bar
1667 <emphasis>show-on-task-bar 0</emphasis>
1674 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
1675 button will minimize <application>Junkbuster</application> instead of closing
1676 the program (close with the exit option on the File menu).
1683 <emphasis>close-button-minimizes 1</emphasis>
1690 The <quote>hide-console</quote> option is specific to the MS-Win console
1691 version of <application>JunkBuster</application>. If this option is used,
1692 <application>Junkbuster</application> will disconnect from and hide the
1709 <!-- ~ End section ~ -->
1712 <!-- ~~~~~ New section ~~~~~ -->
1713 <sect2 id="actionsfile">
1714 <title>The Actions File</title>
1717 The <quote>actionsfile</quote> is used to define what actions
1718 <application>Junkbuster</application> takes, and thus determines how images,
1719 cookies and various other aspects of HTTP content and transactions are
1720 handled. Images can be anything you want, including ads, banners, or just
1721 some obnoxious image that you would rather not see. Cookies can be accepted
1722 or rejected. The default file is in fact named <filename>actionsfile</filename>.
1726 To determine which actions apply to a request, the URL of the request is
1727 compared to all patterns in this file. Every time it matches, the list of
1728 applicable actions for the URL is incrementally updated. You can trace
1729 this process by visiting <ulink
1730 url="http://i.j.b/show-url-info">http://i.j.b/show-url-info</ulink>.
1734 There are four types of lines in this file: comments (begin with a
1735 <quote>#</quote> character), actions, aliases and patterns, all of which are
1740 <!-- ~~~~~ New section ~~~~~ -->
1742 <title>URL Domain and Path Syntax</title>
1744 Generally, a pattern has the form <domain>/<path>, where both the
1745 <domain> and <path> part are optional. If you only specify a
1746 domain part, the <quote>/</quote> can be left out:
1750 <emphasis>www.example.com</emphasis> - is a domain only pattern and will match any request to
1751 <quote>www.example.com</quote>.
1755 <emphasis>www.example.com/</emphasis> - means exactly the same.
1759 <emphasis>www.example.com/index.html</emphasis> - matches only the single
1760 document <quote>/index.html</quote> on <quote>www.example.com</quote>.
1764 <emphasis>/index.html</emphasis> - matches the document <quote>/index.html</quote>, regardless of
1769 <emphasis>index.html</emphasis> - matches nothing, since it would be
1770 interpreted as a domain name and there is no top-level domain called
1771 <quote>.html</quote>.
1775 The matching of the domain part offers some flexible options: if the
1776 domain starts or ends with a dot, it becomes unanchored at that end.
1781 <emphasis>.example.com</emphasis> - matches any domain that <emphasis>ENDS</emphasis> in
1782 <quote>.example.com</quote>.
1786 <emphasis>www.</emphasis> - matches any domain that <emphasis>STARTS</emphasis> with
1791 Additionally, there are wildcards that you can use in the domain names
1792 themselves. They work pretty similar to shell wildcards: <quote>*</quote>
1793 stands for zero or more arbitrary characters, <quote>?</quote> stands for
1794 any single character. And you can define charachter classes in square
1795 brackets and they can be freely mixed:
1799 <emphasis>ad*.example.com</emphasis> - matches <quote>adserver.example.com</quote>,
1800 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>.
1804 <emphasis>*ad*.example.com</emphasis> - matches all of the above, and then some.
1808 <emphasis>.?pix.com</emphasis> - matches <quote>www.ipix.com</quote>,
1809 <quote>pictures.epix.com</quote>, <quote>a.b.c.d.e.upix.com</quote>, etc.
1813 <emphasis>www[1-9a-ez].example.com</emphasis> - matches <quote>www1.example.com</quote>,
1814 <quote>www4.example.com</quote>, <quote>wwwd.example.com</quote>,
1815 <quote>wwwz.example.com</quote>, etc., but <emphasis>not</emphasis>
1816 <quote>wwww.example.com</quote>.
1820 If <application>Junkbuster</application> was compiled with
1821 <quote>pcre</quote> support (default), Perl compatible regular expressions
1822 can be used. See the <filename>pcre/docs/</filename> direcory or <quote>man
1823 perlre</quote> (also available on <ulink
1824 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>)
1825 for details. A brief discussion of regular expressions is in the
1826 <link linkend="regex">Appendix</link>. For instance:
1830 <emphasis>/.*/advert[0-9]+\.jpe?g</emphasis> - would match a URL from any
1831 domain, with any path that includes <quote>advert</quote> followed
1832 immediately by one or more digits, then a <quote>.</quote> and ending in
1833 either <quote>jpeg</quote> or <quote>jpg</quote>. So we match
1834 <quote>example.com/ads/advert2.jpg</quote>, and
1835 <quote>www.example.com/ads/banners/advert39.jpeg</quote>, but not
1836 <quote>www.example.com/ads/banners/advert39.gif</quote> (no gifs in the
1841 Please note that matching in the path is case
1842 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
1843 sensitive at any point in the pattern by using the
1844 <quote>(?-i)</quote> switch:
1848 <emphasis>www.example.com/(?-i)PaTtErN.*</emphasis> - will match only
1849 documents whose path starts with <quote>PaTtErN</quote> in
1850 <emphasis>exactly</emphasis> this capitalization.
1855 <!-- ~ End section ~ -->
1859 <!-- ~~~~~ New section ~~~~~ -->
1862 <title>Actions</title>
1864 Actions are enabled if preceded with a <quote>+</quote>, and disabled if
1865 preceded with a <quote>-</quote>. Actions are invoked by enclosing the
1866 action name in curly braces (e.g. {+some_action}), followed by a list of
1867 URLs to which the action applies. There are three classes of actions:
1875 Boolean (e.g. <quote>+/-block</quote>):
1881 <emphasis>{+name}</emphasis> # enable this action
1882 <emphasis>{-name}</emphasis> # disable this action
1892 Parameterized (e.g. <quote>+/-hide-user-agent</quote>):
1898 <emphasis>{+name{param}}</emphasis> # enable action and set parameter to <quote>param</quote>
1899 <emphasis>{-name}</emphasis> # disable action
1908 Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
1914 <emphasis>{+name{param}}</emphasis> # enable action and add parameter <quote>param</quote>
1915 <emphasis>{-name{param}}</emphasis> # remove the parameter <quote>param</quote>
1916 <emphasis>{-name}</emphasis> # disable this action totally
1927 If nothing is specified in this file, no <quote>actions</quote> are taken.
1928 So in this case <application>JunkBuster</application> would just be a
1929 normal, non-blocking, non-anonymizing proxy. You must specifically
1930 enable the privacy and blocking features you need (although the
1931 provided default <filename>actionsfile</filename> file will
1932 give a good starting point).
1936 Later defined actions always over-ride earlier ones. For multi-valued
1937 actions, the actions are applied in the order they are specified.
1941 The list of valid <application>Junkbuster</application> <quote>actions</quote> are:
1949 Add the specified HTTP header, which is not checked for validity.
1950 You may specify this many times to specify many different headers:
1956 <emphasis>+add-header{Name: value}</emphasis>
1966 Block this URL totally.
1972 <emphasis>+block</emphasis>
1982 De-animate all animated GIF images, i.e. reduce them to their last frame.
1983 This will also shrink the images considerably (in bytes, not pixels!). If
1984 the option <quote>first</quote> is given, the first frame of the animation
1985 is used as the replacement. If <quote>last</quote> is given, the last frame
1986 of the animation is used instead, which propably makes more sense for most
1987 banner animations, but also has the risk of not showing the entire last
1988 frame (if it is only a delta to an earlier frame).
1994 <emphasis>+deanimate-gifs{last}</emphasis>
1995 <emphasis>+deanimate-gifs{first}</emphasis>
2004 <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2005 HTTP/1.0 and downgrade the responses as well. Use this action for servers
2006 that use HTTP/1.1 protocol features that
2007 <application>Junkbuster</application> doesn't handle well yet. HTTP/1.1
2008 is only partially implemented. Default is not to downgrade requests.
2014 <emphasis>+downgrade</emphasis>
2023 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2024 will link to some script on their own server, giving the destination as a
2025 parameter, which will then redirect you to the final target. URLs resulting
2026 from this scheme typically look like:
2027 http://some.place/some_script?http://some.where-else.
2030 Sometimes, there are even multiple consecutive redirects encoded in the
2031 URL. These redirections via scripts make your web browing more traceable,
2032 since the server from which you follow such a link can see where you go to.
2033 Apart from that, valuable bandwidth and time is wasted, while your browser
2034 ask the server for one redirect after the other. Plus, it feeds the
2038 The <quote>+fast-redirects</quote> option enables interception of these
2039 requests by <application>Junkbuster</application>, who will cut off all but
2040 the last valid URL in the request and send a local redirect back to your
2041 browser without contacting the remote site.
2047 <emphasis>+fast-redirects</emphasis>
2056 Filter the website through the re_filterfile:
2062 <emphasis>+filter{filename}</emphasis>
2071 Block any existing X-Forwarded-for header, and do not add a new one:
2077 <emphasis>+hide-forwarded</emphasis>
2086 If the browser sends a <quote>From:</quote> header containing your e-mail
2087 address, this either completely removes the header (<quote>block</quote>), or
2088 changes it to the specified e-mail address.
2094 <emphasis>+hide-from{block}</emphasis>
2095 <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2104 Don't send the <quote>Referer:</quote> (sic) header to the web site. You
2105 can block it, forge a URL to the same server as the request (which is
2106 preferred because some sites will not send images otherwise) or set it to a
2107 constant string of your choice.
2113 <emphasis>+hide-referer{block}</emphasis>
2114 <emphasis>+hide-referer{forge}</emphasis>
2115 <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2124 Alternative spelling of <quote>+hide-referer</quote>. It has the same
2125 parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2126 (<quote>referrer</quote> is the correct English spelling, however the HTTP
2127 specification has a bug - it requires it to be spelled <quote>referer</quote>.)
2133 <emphasis>+hide-referrer{...}</emphasis>
2142 Change the <quote>User-Agent:</quote> header so web servers can't tell your
2143 browser type. Warning! This breaks many web sites. Specify the
2144 user-agent value you want. Example, pretend to be using Netscape on
2151 <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
2158 Or to identify yourself explicitly as a <quote>Junkbuster</quote> user:
2164 <emphasis>+hide-user-agent{JunkBuster/1.0}</emphasis>
2169 (Don't change the version number from 1.0 - after all, why tell them?)
2176 <emphasis>+hide-user-agent{browser-type}</emphasis>
2186 Treat this URL as an image. This only matters if it's also <quote>+block</quote>ed,
2187 in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
2188 See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
2194 <emphasis>+image</emphasis>
2203 Decides what to do with URLs that end up tagged with <quote>{+block
2204 +image}</quote>. There are 4 options. <quote>-image-blocker</quote> will
2205 send a HTML <quote>blocked</quote> page, usually resulting in a
2206 <quote>broken image</quote> icon. <quote>+image-blocker{logo}</quote> will
2207 send a <quote>JunkBuster</quote> image.
2208 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF image.
2209 And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a HTTP
2210 temporary redirect to the specified image. This has the advantage of the
2211 icon being being cached by the browser, which will speed up the display.
2217 <emphasis>+image-blocker{logo}</emphasis>
2218 <emphasis>+image-blocker{blank}</emphasis>
2219 <emphasis>+image-blocker{http://i.j.b/send-banner}</emphasis>
2228 By default (i.e. in the absence of a <quote>+limit-connect</quote>
2229 action), <application>Junkbuster</application> will only allow CONNECT
2230 requests to port 443, which is the standard port for https as a
2235 The CONNECT methods exists in HTTP to allow access to secure websites
2236 (https:// URLs) through proxies. It works very simply: the proxy
2237 connects to the server on the specified port, and then short-circuits
2238 its connections to the client <emphasis>and</emphasis> to the remote proxy.
2239 This can be a big security hole, since CONNECT-enabled proxies can
2240 be abused as TCP relays very easily.
2244 If you want to allow CONNECT for more ports than this, or want to forbid
2245 CONNECT altogether, you can specify a comma separated list of ports and
2246 port ranges (the latter using dashes, with the minimum defaulting to 0 and
2254 <emphasis>+limit-connect{443} # This is the default and need no be specified.</emphasis>
2255 <emphasis>+limit-connect{80,443} # Ports 80 and 443 are OK.</emphasis>
2256 <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
2257 <emphasis> #and above 500 are OK.</emphasis>
2267 <quote>+no-compression</quote> prevents the website from compressing the
2268 data. Some websites do this, which can be a problem for
2269 <application>Junkbuster</application>, since <quote>+filter</quote>,
2270 <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
2271 compressed data. This will slow down connections to those websites,
2272 though. Default is <quote>nocompression</quote> is turned on.
2279 <emphasis>+nocompression</emphasis>
2288 Prevent the website from reading cookies:
2294 <emphasis>+no-cookies-read</emphasis>
2303 Prevent the website from setting cookies:
2309 <emphasis>+no-cookies-set</emphasis>
2318 Filter the website through a built-in filter to disable those obnoxious
2319 JavaScript pop-up windows via window.open(), etc. The two alternative
2320 spellings are equivalent.
2326 <emphasis>+no-popup</emphasis>
2327 <emphasis>+no-popups</emphasis>
2336 This action only applies if you are using a <filename>jarfile</filename>
2337 for saving cookies. It sends a cookie to every site stating that you do not
2338 accept any copyright on cookies sent to you, and asking them not to track
2339 you. Of course, this is a (relatively) unique header they could use to
2346 <emphasis>+vanilla-wafer</emphasis>
2355 This allows you to add an arbitrary cookie. It can be specified multiple
2356 times in order to add as many cookies as you like.
2362 <emphasis>+wafer{name=value}</emphasis>
2373 The meaning of any of the above is reversed by preceding the action with a
2374 <quote>-</quote>, in place of the <quote>+</quote>.
2382 Turn off cookies by default, then allow a few through for specified sites:
2389 # Turn off all cookies
2390 { +no-cookies-read }
2393 # Execeptions to the above, sites that need cookies
2394 { -no-cookies-read }
2402 # Alternative way of saying the same thing
2403 {-no-cookies-set -no-cookies-read}
2412 Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
2422 # Reverse it for these two sites, which don't work right without it.
2424 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
2432 Turn on page filtering, with one exception for sourceforge:
2439 # Run everything through the default filter file (<filename>re_filterfile</filename>):
2442 # But please don't re_filter code from sourceforge!
2444 .cvs.sourceforge.net
2451 Now some URLs that we want <quote>blocked</quote>, ie we won't see them.
2452 Many of these use regular expressions that will expand to match multiple
2462 /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
2463 /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
2464 /.*/(ng)?adclient\.cgi
2465 /.*/(plain|live|rotate)[-_.]?ads?/
2466 /.*/(sponsor)s?[0-9]?/
2467 /.*/_?(plain|live)?ads?(-banners)?/
2469 /.*/ad(sdna_image|gifs?)/
2470 /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
2474 /.*/adv((er)?ts?|ertis(ing|ements?))?/
2478 /.*/cgi-bin/centralad/getimage
2479 /.*/images/addver\.gif
2480 /.*/images/marketing/.*\.(gif|jpe?g)
2484 /.*/sponsors?[0-9]?/
2485 /.*/advert[0-9]+\.jpg
2492 /graphics/defaultAd/
2494 /image\.ng/transactionID
2495 /images/.*/.*_anim\.gif # alvin brattli
2496 /ip_img/.*\.(gif|jpe?g)
2500 /cgi-bin/nph-adclick.exe/
2501 /.*/Image/BannerAdvertising/
2503 /.*/adlib/server\.cgi
2512 <!-- ~ End section ~ -->
2515 <!-- ~~~~~ New section ~~~~~ -->
2517 <title>Aliases</title>
2519 Custom <quote>actions</quote>, known to <application>Junkbuster</application>
2520 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
2521 These can in turn be invoked just like the built-in <quote>actions</quote>.
2522 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
2523 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
2524 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
2525 <quote>-</quote>. Alias names are not case sensitive, and
2526 <emphasis>must be defined before anything</emphasis> else in
2527 <filename>actionsfile</filename>! And there can only be one set of
2528 <quote>aliases</quote> defined.
2532 Now let's define a few aliases:
2539 # Useful customer aliases we can use later. These must come first!
2541 +no-cookies = +no-cookies-set +no-cookies-read
2542 -no-cookies = -no-cookies-set -no-cookies-read
2543 fragile = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
2544 shop = -no-cookies -filter -fast-redirects
2545 +imageblock = +block +image
2547 #For people who don't like to type too much: ;-)
2550 c2 = -no-cookies-set +no-cookies-read
2551 c3 = +no-cookies-set -no-cookies-read
2552 #... etc. Customize to your heart's content.
2559 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
2567 # These sites are very complex and require
2568 # minimal interference.
2570 .office.microsoft.com
2571 .windowsupdate.microsoft.com
2574 # Shopping sites - still want to block ads.
2577 .worldpay.com # for quietpc.com
2581 # These shops require pop-ups
2593 <!-- ~ End section ~ -->
2596 <!-- ~~~~~ New section ~~~~~ -->
2597 <sect2 id="filterfile">
2598 <title>The Filter File</title>
2600 The filter file defines what filtering of web pages
2601 <application>Junkbuster</application> does. The default filter file is
2602 <filename>re_filterfile</filename>, located in the config directory. In this
2603 file, <emphasis>any document content</emphasis>, whether viewable text or
2604 embedded non-visible content, can be changed.
2608 This file uses regular expressions to alter or remove any string in the
2609 target page. Some examples from the included default <filename>re_filterfile</filename>:
2613 Stop web pages from displaying annoying messages in the status bar by
2614 deleting such references:
2621 # The status bar is for displaying link targets, not pointless buzzwords.
2622 # Again, check it out on http://www.airport-cgn.de/.
2623 s/status='.*?';*//ig
2630 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
2631 <quote>MicroSuck</quote>:
2638 s/microsoft(?!.com)/MicroSuck/ig
2645 Kill those auto-refresh tags:
2652 # Kill refresh tags. I like to refresh myself. Manually.
2653 # check it out on http://www.airport-cgn.de/ and go to the arrivals page.
2655 s/<meta[^>]*http-equiv[^>]*refresh.*URL=([^>]*?)"?>/<link rev="x-refresh" href=$1>/i
2656 s/<meta[^>]*http-equiv="?page-enter"?[^>]*content=[^>]*>/<!--no page enter for me-->/i
2666 <!-- ~~~~~ New section ~~~~~ -->
2667 <sect1 id="quickstart"><title>Quickstart to Using Junkbuster</title>
2669 Install package, then run and enjoy! <application>Junbuster</application>
2670 accepts only one command line option -- the configuration file to be
2671 used. Example Unix startup command:
2677 # /usr/sbin/junkbuster /etc/junkbuster/config &
2683 If no configuration file is specified on the command line,
2684 <application>Junkbuster</application> will look for a file named
2685 <filename>config</filename> in the current directory. Except on Amiga where
2686 it will look for <filename>AmiTCP:db/junkbuster/config</filename> and Win32
2687 where it will try <filename>junkbstr.txt</filename>. If no file is specified
2688 on the command line and no default configuration file can be found,
2689 <application>Junkbuster</application> will fail to start.
2693 Be sure your browser is set to use the proxy which is by default at
2694 localhost, port 8000. With <application>Netscape</application> (and
2695 <application>Mozilla</application>), this can be set under <literal>Edit
2696 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
2697 For <application>Internet Explorer</application>: <literal>Tools >
2698 Internet Properties -> Connections -> LAN Setting</literal>. Then,
2699 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
2700 localhost, Port: 8000). Include if HTTPS proxy support too.
2704 The included default configuration files should give a reasonable starting
2705 point, though may be somewhat aggressive in blocking junk. You will probably
2706 want to keep an eye out for sites that require cookies, and add these to
2707 <filename>actionsfile</filename> as needed. By default, most of these will
2708 be blocked until you add them to the configuration. If you want the browser
2709 to handle this instead, you will need to edit
2710 <filename>actionsfile</filename> and disable this feature. If you use more
2711 than one browser, it would make more sense to let
2712 <application>Junkbuster</application> handle this. In which case, the
2713 browser(s) should be set to accept all cookies.
2717 If a particular site shows problems loading properly, try adding it
2718 to the <literal>{fragile}</literal> section of
2719 <filename>actionsfile</filename>. This will turn off most actions for
2724 HTTP/1.1 support is not fully implemented. If browsers that
2725 support HTTP/1.1 (like <application>Mozilla</application> or recent versions
2726 of I.E.) experience problems, you might try to force HTTP/1.0 compatiblity.
2727 For Mozilla, look under <literal>Edit -> Preferences -> Debug ->
2728 Networking</literal>. Or set the <quote>+downgrade</quote> config option in
2729 <filename>actionsfile</filename>.
2733 After running <application>Junkbuster</application> for a while, you can
2734 start to fine tune the configuration to suit your personal, or site,
2735 preferences and requirements. There are many, many aspects that can
2736 be customized. <quote>Actions</quote> (from <filename>actionsfile</filename>)
2737 can be adjusted by pointing your browser to
2738 <ulink url="http://ijbswa.sourceforge.net/config/">http://ijbswa.sourceforge.net/config/</ulink>,
2739 and then follow the link to <quote>edit the actions list</quote>.
2740 (This is an internal page and does not require Internet access.)
2744 In fact, various aspects of <application>Junkbuster</application>
2745 configuration can be viewed from this page, including
2746 current configuration parameters, source code version numbers,
2747 the browser's request headers, and <quote>actions</quote> that apply
2748 to a given URL. In addition to the <filename>actionsfile</filename>
2749 editor mentioned above, <application>Junkbuster</application> can also
2750 be turned <quote>on</quote> and <quote>off</quote> from this page.
2754 If you encounter problems, please verify it is a
2755 <application>Junkbuster</application> bug, by disabling
2756 <application>Junkbuster</application>, and then trying the same page.
2757 Also, try another browser if possible to eliminate browser or site
2758 problems. Before reporting it as a bug, see if there is not a configuration
2759 option that is enabled that is causing the page not to load. You can
2760 then add an exception for that page or site. If a bug, please report it to
2761 the developers (see below).
2767 <!-- ~~~~~ New section ~~~~~ -->
2768 <sect1 id="contact"><title>Contact the Developers</title>
2771 To be filled. mention the support forums as the primary channel of
2772 communication (bugs, feature requests, etc.)
2774 Feature requests and other questions should be posted to the <ulink
2775 url="http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse">Feature
2776 request page</ulink> at SourceForge. There is also an archive there.
2780 Anyone interested in actively participating in development and related
2781 discussions can join the appropriate mailing list
2782 <ulink url="http://sourceforge.net/mail/?group_id=11118">here</ulink>.
2783 Archives are available here too.
2787 Please report bugs, using the form at
2788 <ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=111118">Sourceforge</ulink>.
2789 Please try to verify that it is a <application>Junkbuster</application> bug,
2790 and not a browser or site bug first. Also, check to make sure this is not
2791 already a known bug.
2797 <!-- ~~~~~ New section ~~~~~ -->
2798 <sect1 id="copyright"><title>Copyright and History</title>
2801 <title>License</title>
2803 <application>Internet Junkbuster</application> is free software; you can
2804 redistribute it and/or modify it under the terms of the GNU General Public
2805 License as published by the Free Software Foundation; either version 2 of the
2806 License, or (at your option) any later version.
2810 This program is distributed in the hope that it will be useful, but WITHOUT
2811 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2812 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2813 details, which is available from <ulink
2814 url="http://www.gnu.org/copyleft/gpl.html">the Free Software Foundation,
2815 Inc</ulink>, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2820 <!-- ~ End section ~ -->
2823 <!-- ~~~~~ New section ~~~~~ -->
2826 <title>History</title>
2828 <application>Junkbuster</application> was originally written by Anonymous
2830 url="http://www.junkbusters.com/ht/en/ijbfaq.html">JunkBusters
2831 Corporation</ulink>, and was released as free open-source software under the
2832 GNU GPL. <ulink url="http://www.waldherr.org/junkbuster/">Stefan
2833 Waldherr</ulink> made many improvements, and started the <ulink
2834 url="http://sourceforge.net/projects/ijbswa/">SourceForge project</ulink> to
2835 rekindle development. The last stable release was v2.0.2, which has now
2843 <!-- ~~~~~ New section ~~~~~ -->
2844 <sect1 id="seealso"><title>See also</title>
2849 <ulink url="http://sourceforge.net/projects/ijbswa">http://sourceforge.net/projects/ijbswa</ulink>
2854 <ulink url="http://ijbswa.sourceforge.net/">http://ijbswa.sourceforge.net/</ulink>
2859 <ulink url="http://ijbswa.sourceforge.net/config/">http://ijbswa.sourceforge.net/config/</ulink>
2864 <ulink url="http://www.junkbusters.com/ht/en/cookies.html">http://www.junkbusters.com/ht/en/cookies.html</ulink>
2869 <ulink url="http://www.waldherr.org/junkbuster/">http://www.waldherr.org/junkbuster/</ulink>
2874 <ulink url="http://privacy.net/analyze/">http://privacy.net/analyze/</ulink>
2879 <ulink url="http://www.squid-cache.org/">http://www.squid-cache.org/</ulink>
2888 <!-- ~~~~~ New section ~~~~~ -->
2889 <sect1 id="appendix"><title>Appendix</title>
2892 <!-- ~~~~~ New section ~~~~~ -->
2894 <title>Regular Expressions</title>
2896 <application>Junkbuster</application> can use <quote>regular expressions</quote>
2897 in various config files. Assuming support for <quote>pcre</quote> (Perl
2898 Compatible Regular Expressions) is compiled in, which is the default. Such
2899 configuration directives do not require regular expressions, but they can be
2900 used to increase flexibility by matching a pattern with wildcards against
2905 If you are reading this, you probably don't understand what <quote>regular
2906 expressions</quote> are, or what they can do. So this will be a very brief
2907 introduction only. A full explanation would require a book ;-)
2911 <quote>Regular expressions</quote> is a way of matching one character
2912 expression against another to see if it matches or not. One of the
2913 <quote>expressions</quote> is a literal string of readable characters
2914 (letter, numbers, etc), and the other is a complex string of literal
2915 characters combined with wildcards, and other special characters, called
2916 metacharacters. The <quote>metacharacters</quote> have special meanings and
2917 are used to build the complex pattern to be matched against. Perl Compatible
2918 Regular Expressions is an enhanced form of the regular expression language
2919 with backward compatibility.
2923 To make a simple analogy, we do something similar when we use wildcard
2924 characters when listing files with the <command>dir</command> command in DOS.
2925 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
2926 character here is the asterik which matches any and all characters. We can be
2927 more specific and use <literal>?</literal> to match just individual
2928 characters. So <quote>dir file?.text</quote> would match
2929 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
2930 matching, using a similar technique to <quote>regular expressions</quote>!
2934 Regular expressions do essentially the same thing, but are much, much more
2935 powerful. There are many more <quote>special characters</quote> and ways of
2936 building complex patterns however. Let's look at a few of the common ones,
2937 and then some examples:
2942 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
2943 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
2949 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
2956 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
2963 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
2970 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
2971 the following character should be taken literally. This is used where one of the
2972 special characters (e.g. <quote>.</quote>) needs to be taken literally and
2973 not as a special metacharacter.
2979 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
2980 any of the enclosed characters are encountered.
2986 <emphasis>()</emphasis> - Pararentheses are used to group a sub-expression,
2987 or multiple sub-expressions.
2993 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
2994 <quote>or</quote> conditional statement. A match is successful if the
2995 sub-expression on either side of <quote>|</quote> matches.
3001 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
3002 <quote>string1</quote> is replaced by <quote>string2</quote> in this
3008 These are just some of the ones you are likely to use when matching URLs with
3009 <application>Junkbuster</application>, and is a long way from a definitive
3010 list. This is enough to get us started with a few simple examples which may
3011 be more illuminating:
3015 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
3016 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
3017 denote any character, zero or more times. In other words, any string at all.
3018 So we start with a literal forward slash, then our regular expression pattern
3019 (<quote>.*</quote>) another literal forward slash, the string
3020 <quote>banners</quote>, another forward slash, and lastly another
3021 <quote>.*</quote>. We are building
3022 a directory path here. This will match any file with the path that has a
3023 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3024 any characters, and this could conceivably be more forward slashes, so it
3025 might expand into a much longer looking path. For example, this could match:
3026 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3027 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3028 possible combinations, just so it has <quote>banners</quote> in the path
3033 A now something a little more complex:
3037 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
3038 We have several literal forward slashes again (<quote>/</quote>), so we are
3039 building another expression that is a file path statement. We have another
3040 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3041 it matches our expression. The only true literal that <emphasis>must
3042 match</emphasis> our pattern is <application>adv</application>, together with
3043 the forward slashes. What comes after the <quote>adv</quote> string is the
3048 Remember the <quote>?</quote> means the preceding expression (either a
3049 literal character or anything grouped with <quote>(...)</quote> in this case)
3050 can exist or not, since this means either zero or one match. So
3051 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3052 individual sub-expressions: <quote>(er)</quote>,
3053 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3054 means <quote>or</quote>. We have two of those. For instance,
3055 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
3056 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3057 attempt at matching as many variations of <quote>advertisement</quote>, and
3058 similar, as possible. So this would expand to match just <quote>adv</quote>,
3059 or <quote>advert</quote>, or <quote>adverts</quote>, or
3060 <quote>advertising</quote>, or <quote>advertisement</quote>, or
3061 <quote>advertisements</quote>. You get the idea. But it would not match
3062 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3063 changing our regular expression to:
3064 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3069 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
3070 another path statement with forward slashes. Anything in the square brackets
3071 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3072 shorthand expression to mean any digit one through nine. It is the same as
3073 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3074 means one or more of the preceding expression must be included. The preceding
3075 expression here is what is in the square brackets -- in this case, any digit
3076 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
3077 This includes a <quote>|</quote>, so this needs to match the expression on
3078 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3079 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3080 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3081 can be matched once or not at all. So we are building an expression here to
3082 match image GIF or JPEG type image file. It must include the literal
3083 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3084 (which is now a literal, and not a special character, since it is escaped
3085 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3086 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3087 include: <quote>//advert1.jpg</quote>,
3088 <quote>/nasty/ads/advert1234.gif</quote>,
3089 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3090 <quote>advert1.gif</quote> (no leading slash), or
3091 <quote>/adverts232.jpg</quote> (the expression does not include an
3092 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3093 in the expression anywhere).
3097 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
3098 a substitution. <quote>MicroSuck</quote> will replace any occurence of
3099 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
3100 means ignore case. The <quote>(?!.com)</quote> means
3101 the match should fail if <quote>microsoft</quote> is followed by
3102 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3103 modifier. In case this is a hyperlink, we don't want to break it ;-).
3107 We are barely scratching the surface of regular expressions here so that you
3108 can understand the default <application>Junkbuster</application>
3109 configuration files, and maybe use this knowledge to customize your own
3110 installation. There is much, much more that can be done with regular
3111 expressions. Now that you know enough to get started, you can learn more on
3116 More reading on Perl Compatible Regular expressions:
3117 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3126 This program is free software; you can redistribute it
3127 and/or modify it under the terms of the GNU General
3128 Public License as published by the Free Software
3129 Foundation; either version 2 of the License, or (at
3130 your option) any later version.
3132 This program is distributed in the hope that it will
3133 be useful, but WITHOUT ANY WARRANTY; without even the
3134 implied warranty of MERCHANTABILITY or FITNESS FOR A
3135 PARTICULAR PURPOSE. See the GNU General Public
3136 License for more details.
3138 The GNU General Public License should be included with
3139 this file. If not, you can view it at
3140 http://www.gnu.org/copyleft/gpl.html
3141 or write to the Free Software Foundation, Inc., 59
3142 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3144 $Log: user-manual.sgml,v $
3145 Revision 1.16 2001/10/21 17:19:21 swa
3146 wrong url in documentation
3148 Revision 1.15 2001/10/14 23:46:24 hal9
3149 Various minor changes. Fleshed out SEE ALSO section.
3151 Revision 1.13 2001/10/10 17:28:33 hal9
3154 Revision 1.12 2001/09/28 02:57:04 hal9
3157 Revision 1.11 2001/09/28 02:25:20 hal9
3160 Revision 1.9 2001/09/27 23:50:29 hal9
3161 A few changes. A short section on regular expression in appendix.
3163 Revision 1.8 2001/09/25 00:34:59 hal9
3164 Some additions, and re-arranging.
3166 Revision 1.7 2001/09/24 14:31:36 hal9
3169 Revision 1.6 2001/09/24 14:10:32 hal9
3170 Including David's OS/2 installation instructions.
3172 Revision 1.2 2001/09/13 15:27:40 swa
3175 Revision 1.1 2001/09/12 15:36:41 swa
3176 source files for junkbuster documentation
3178 Revision 1.3 2001/09/10 17:43:59 swa
3179 first proposal of a structure.
3181 Revision 1.2 2001/06/13 14:28:31 swa
3182 docs should have an author.
3184 Revision 1.1 2001/06/13 14:20:37 swa
3185 first import of project's documentation for the webserver.