1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
3 File : $Source: /cvsroot/ijbswa/current/doc/source/user-manual.sgml,v $
7 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
9 $Id: user-manual.sgml,v 1.34 2002/03/04 19:32:07 oes Exp $
11 Written by and Copyright (C) 2001 the SourceForge
12 IJBSWA team. http://ijbswa.sourceforge.net
14 Based on the Internet Junkbuster originally written
15 by and Copyright (C) 1997 Anonymous Coders and
16 Junkbusters Corporation. http://www.junkbusters.com
20 Sat 03/02/02 04:53:47 PM
22 This should be ready for BETA release.
24 Hal Burgiss <hal@foobox.net>
29 <title>Junkbuster User Manual</title>
31 <pubdate>$Id: user-manual.sgml,v 1.34 2002/03/04 19:32:07 oes Exp $</pubdate>
36 <orgname>By: Junkbuster Developers</orgname>
43 The user manual gives the users information on how to install and configure
44 <application>Internet Junkbuster</application>. <application>Internet
45 Junkbuster</application> is an application that provides privacy and
46 security to users of the World Wide Web.
49 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>.
53 Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>.
60 <!-- ~~~~~ New section ~~~~~ -->
62 <sect1 id="introduction"><title>Introduction</title>
64 <application>Internet Junkbuster</application> is a web proxy with advanced
65 filtering capabilities for protecting privacy, filtering and modifying web
66 page content, managing cookies, controlling access, and removing ads,
67 banners, pop-ups and other obnoxious Internet Junk.
68 <application>Junkbuster</application> has a very flexible configuration and
69 can be customized to suit individual needs and tastes. <application>Internet
70 Junkbuster</application> has application for both stand-alone systems and
75 This documentation is included with the current BETA version of
76 <application>Internet Junkbuster</application> and mostly complete at this
77 point. The most up to date reference for the time being is still the comments
78 in the source files and in the individual configuration files. Development
79 of version 3.0 is currently nearing completion, and includes many significant
80 changes and enhancements over earlier versions. The target release date for
81 stable v3.0 is <quote>soon</quote> ;-)
85 Since this is a BETA version, not all new features are well tested. This
86 documentation may be slightly out of sync as a result. And there
87 <emphasis>may be</emphasis> bugs, though hopefully not many!
91 <!-- ~~~~~ New section ~~~~~ -->
93 <title>New Features</title>
95 In addition to <application>Junkbuster's</application> traditional features
96 of ad and banner blocking and cookie management, this is a list of new
97 features currently under development:
105 Integrated browser based configuration and control utility (<ulink
106 url="http://i.j.b">http://i.j.b</ulink>). Browser-based tracing of rule
113 Modularized configuration that will allow for system wide settings, and
114 individual user settings. (not implemented yet, probably a 3.1 feature)
120 Blocking of annoying pop-up browser windows.
126 HTTP/1.1 compliant (most, but not all 1.1 features are supported).
132 Support for Perl Compatible Regular Expressions in the configuration files, and
133 generally a more sophisticated and flexible configuration syntax over
146 Web page content filtering (removes banners based on size,
147 invisible <quote>web-bugs</quote>, JavaScript, pop-ups, status bar abuse,
154 Bypass many click-tracking scripts (avoids script redirection).
161 Multi-threaded (POSIX and native threads).
167 Auto-detection and re-reading of config file changes.
173 User-customizable HTML templates (e.g. 404 error page).
179 Improved cookie management features (e.g. session based cookies).
185 Builds from source on most UNIX-like systems. Packages available for: Linux
186 (RedHat, SuSE, or Debian), Windows, Sun Solaris, Mac OSX, OS/2.
193 In addition, the configuration is much more powerful and versatile over-all.
204 <!-- ~ End section ~ -->
207 <!-- ~~~~~ New section ~~~~~ -->
208 <sect1 id="installation"><title>Installation</title>
210 <application>Junkbuster</application> is available as raw source code, or
211 pre-compiled binaries. See the <ulink
212 url="http://sourceforge.net/projects/ijbswa/">Junkbuster Home Page</ulink>
213 for current release info. <application>Junkbuster</application> is also available
215 url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/current/">CVS</ulink>.
216 This is the recommended approach at this time. But please be aware that CVS
217 is constantly changing, and it may break in mysterious ways.
220 <!-- ~~~~~ New section ~~~~~ -->
221 <sect2 id="installation-source"><title>Source</title>
223 For gzipped tar archives, unpack the source:
228 tar xzvf ijb_source_* [.tgz or .tar.gz]
229 cd ijb_source_2.9.10_beta
234 For retrieving the current CVS sources, you'll need the CVS
235 package installed first. To download CVS source:
240 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
241 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current
247 This will create a directory named <filename>current/</filename>, which will
248 contain the source tree.
252 Then, in either case, to build from tarball/CVS source:
257 ./configure (--help to see options)
258 make (the make from gnu, gmake for *BSD)
260 make -n install (to see where all the files will go)
261 make install (to really install)
266 For Redhat and SuSE Linux RPM packages, see below.
272 <!-- ~~~~~ New section ~~~~~ -->
273 <sect2 id="installation-rh"><title>Red Hat</title>
275 To build Redhat RPM packages, install source as above. Then:
280 autoheader [suggested for CVS source]
281 autoconf [suggested for CVS source]
288 This will create both binary and src RPMs in the usual places. Example:
292 /usr/src/redhat/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
295 /usr/src/redhat/SRPMS/junkbuster-2.9.11-1.src.rpm
299 To install, of course:
304 rpm -Uvv /usr/src/redhat/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
309 This will place the <application>Junkbuster</application> configuration
310 files in <filename>/etc/junkbuster/</filename>, and log files in
311 <filename>/var/log/junkbuster/</filename>.
316 <!-- ~~~~~ New section ~~~~~ -->
317 <sect2 id="installation-suse"><title>SuSE</title>
319 To build SuSE RPM packages, install source as above. Then:
324 autoheader [suggested for CVS source]
325 autoconf [suggested for CVS source]
332 This will create both binary and src RPMs in the usual places. Example:
336 /usr/src/packages/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
339 /usr/src/packages/SRPMS/junkbuster-2.9.11-1.src.rpm
343 To install, of course:
348 rpm -Uvv /usr/src/packages/RPMS/i686/junkbuster-2.9.11-1.i686.rpm
353 This will place the <application>Junkbuster</application> configuration
354 files in <filename>/etc/junkbuster/</filename>, and log files in
355 <filename>/var/log/junkbuster/</filename>.
361 <!-- ~~~~~ New section ~~~~~ -->
362 <sect2 id="installation-os2"><title>OS/2</title>
369 <application>Junkbuster</application> is packaged in a WarpIN self-
370 installing archive. The self-installing program will be named depending
371 on the release version, something like:
372 <filename>ijbos2_setup_1.2.3.exe</filename>. In order to install it, simply
373 run this executable or double-click on its icon and follow the WarpIN
374 installation panels. A shadow of the <application>Junkbuster</application>
375 executable will be placed in your startup folder so it will start
376 automatically whenever OS/2 starts.
380 The directory you choose to install <application>Junkbuster</application>
381 into will contain all of the configuration files.
385 If you would like to build binary images on OS/2 yourself, you will need
386 a few Unix-like tools: autoconf, autoheader and sh. These tools will be
387 used to create the required config.h file, which is not part of the
388 source distribution because it differs based on platform. You will also
390 The distribution has been created using IBM VisualAge compilers, but you
391 can use any compiler you like. GCC/EMX has the disadvantage of needing
392 to be single-threaded due to a limitation of EMX's implementation of the
393 select() socket call.
397 In addition to needing the source code distribution as outlined earlier,
398 you will want to extract the <filename>os2seutp</filename> directory from CVS:
400 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
401 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co os2setup
403 This will create a directory named os2setup/, which will contain the
404 <filename>Makefile.vac</filename> makefile and <filename>os2build.cmd</filename>
405 which is used to completely create the binary distribution. The sequence
406 of events for building the executable for yourself goes something like this:
413 nmake -f Makefile.vac
415 You will see this sequence laid out in <filename>os2build.cmd</filename>.
421 <!-- ~~~~~ New section ~~~~~ -->
422 <sect2 id="installation-win"><title>Windows</title>
423 <para>Click-click. (I need help on this. Not a clue here. Also for
424 configuration section below. HB.)
428 <!-- ~~~~~ New section ~~~~~ -->
429 <sect2 id="installation-other"><title>Other</title>
431 Some quick notes on other Operating Systems.
435 For FreeBSD (and other *BSDs?), the build will require <command>gmake</command>
436 instead of the included <command>make</command>. <command>gmake</command> is
437 available from <ulink url="http://www.gnu.org">http://www.gnu.org</ulink>.
438 The rest should be the same as above for Linux/Unix.
445 <!-- ~ End section ~ -->
448 <!-- ~~~~~ New section ~~~~~ -->
449 <sect1 id="configuration"><title>Invoking and Configuring Junkbuster</title>
451 For Unix, *BSD and Linux, all configuration files are located in
452 <filename>/etc/junkbuster/</filename> by default. For MS Windows, OS/2, and
453 AmigaOS these are all in the same directory as the
454 <application>Junkbuster</application> executable. The name and number of
455 configuration files has changed from previous versions, and is subject to
456 change as development progresses.
460 The installed defaults provide a reasonable starting point, though possibly
461 aggressive by some standards. For the time being, there are only three
462 default configuration files (this will change in time):
470 The main configuration file is named <filename>config</filename>
471 on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
478 The <filename>ijb.action</filename> file is used to define various
479 <quote>actions</quote> relating to images, banners, pop-ups, access
480 restrictions, banners and cookies. There is a CGI based editor for this
481 file that can be accessed via <ulink
482 url="http://i.j.b">http://i.j.b</ulink>. This is the easiest method of
483 configuring actions. (Other actions
484 files are included as well with differing levels of filtering
485 and blocking, e.g. <filename>ijb-basic.action</filename>.)
491 The <filename>re_filterfile</filename> file can be used to rewrite the raw
492 page content, including text as well as embedded HTML and JavaScript.
500 <filename>ijb.action</filename> and <filename>re_filterfile</filename>
501 can use Perl style regular expressions for maximum flexibility. All files use
502 the <quote><literal>#</literal></quote> character to denote a comment. Such
503 lines are not processed by <application>Junkbuster</application>. After
504 making any changes, there is no need to restart
505 <application>Junkbuster</application> in order for the changes to take
506 effect. <application>Junkbuster</application> should detect such changes
511 While under development, the configuration content is subject to change.
512 The below documentation may not be accurate by the time you read this.
513 Also, what constitutes a <quote>default</quote> setting, may change, so
514 please check all your configuration files on important issues.
519 <!-- ~~~~~ New section ~~~~~ -->
522 <title>Command Line Options</title>
524 <application>JunkBuster</application> may be invoked with the following
525 command-line options:
533 <emphasis>--version</emphasis>
536 Print version info and exit, Unix only.
541 <emphasis>--help</emphasis>
544 Print a short usage info and exit, Unix only.
549 <emphasis>--no-daemon</emphasis>
552 Don't become a daemon, i.e. don't fork and become process group
553 leader, don't detach from controlling tty. Unix only.
558 <emphasis>--pidfile FILE</emphasis>
562 On startup, write the process ID to <emphasis>FILE</emphasis>. Delete the
563 <emphasis>FILE</emphasis> on exit. Failiure to create or delete the
564 <emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
565 option is given, no PID file will be used. Unix only.
570 <emphasis>configfile</emphasis>
573 If no <emphasis>configfile</emphasis> is included on the command line,
574 <application>JunkBuster</application> will look for a file named
575 <quote>config</quote> in the current directory (except on Win32
576 where it will look for <quote>config.txt</quote> instead). Specify
577 full path to avoid confusion.
587 <!-- ~ End section ~ -->
590 <!-- ~~~~~ New section ~~~~~ -->
593 <title>The Main Configuration File</title>
595 Again, the main configuration file is named <filename>config</filename> on
596 Linux/Unix/BSD and OS/2, and <filename>config.txt</filename> on Windows.
597 Configuration lines consist of an initial keyword followed by a list of
598 values, all separated by whitespace (any number of spaces or tabs). For
606 <emphasis>blockfile blocklist.ini</emphasis>
613 Indicates that the blockfile is named <quote>blocklist.ini</quote>.
617 A <quote><literal>#</literal></quote> indicates a comment. Any part of a
618 line following a <quote><literal>#</literal></quote> is ignored, except if
619 the <quote><literal>#</literal></quote> is preceded by a
620 <quote><literal>\</literal></quote>.
624 Thus, by placing a <quote><literal>#</literal></quote> at the start of an
625 existing configuration line, you can make it a comment and it will be treated
626 as if it weren't there. This is called <quote>commenting out</quote> an
627 option and can be useful to turn off features: If you comment out the
628 <quote>logfile</quote> line, <application>junkbuster</application> will not
629 log to a file at all. Watch for the <quote>default:</quote> section in each
630 explanation to see what happens if the option is left unset (or commented
635 Long lines can be continued on the next line by using a
636 <quote><literal>\</literal></quote> as the very last character.
640 There are various aspects of <application>Junkbuster</application> behavior
645 <!-- ~~~~~ New section ~~~~~ -->
648 <title>Defining Other Configuration Files</title>
651 <application>Junkbuster</application> can use a number of other files to tell it
652 what ads to block, what cookies to accept, etc. This section of the
653 configuration file tells <application>Junkbuster</application> where to find
654 all those other files.
658 On <application>Windows</application> and <application>AmigaOS</application>,
659 <application>Junkbuster</application> looks for these files in the same
660 directory as the executable. On Unix and OS/2,
661 <application>Junkbuster</application> looks for these files in the current
662 working directory. In either case, an absolute path name can be used to
667 When development goes modular and multi-user, the blocker, filter, and
668 per-user config will be stored in subdirectories of <quote>confdir</quote>.
669 For now, only <filename>confdir/templates</filename> is used for storing HTML
670 templates for CGI results.
674 The location of the configuration files:
681 <emphasis>confdir /etc/junkbuster</emphasis> # No trailing /, please.
688 The directory where all logging (i.e. <filename>logfile</filename> and
689 <filename>jarfile</filename>) takes place. No trailing
690 <quote><literal>/</literal></quote>, please:
697 <emphasis>logdir /var/log/junkbuster</emphasis>
704 Note that all file specifications below are relative to
705 the above two directories!
709 The <quote>ijb.action</quote> file contains patterns to specify the actions to
710 apply to requests for each site. Default: Cookies to and from all
711 destinations are kept only during the current browser session (i.e. they
712 are not saved to disk). Pop-ups are disabled for all sites. All sites are
713 filtered if <quote>re_filterfile</quote> specified. No sites are blocked. An
714 empty image is displayed for filtered ads and other images (formerly
715 <quote>tinygif</quote>). The syntax of this file is explained in detail <link
716 linkend="actionsfile">below</link>.
723 <emphasis>actionsfile ijb.action</emphasis>
730 The <quote>re_filterfile</quote> file contains content modification rules.
731 These rules permit powerful changes on the content of Web pages, e.g., you
732 could disable your favorite JavaScript annoyances, rewrite the actual
733 content, or just have some fun replacing <quote>Microsoft</quote> with
734 <quote>MicroSuck</quote> wherever it appears on a Web page. Default: No
735 content modification, or whatever the developers are playing with :-/
742 <emphasis>re_filterfile re_filterfile</emphasis>
749 The logfile is where all logging and error messages are written. The logfile
750 can be useful for tracking down a problem with
751 <application>Junkbuster</application> (e.g., it's not blocking an ad you
752 think it should block) but in most cases you probably will never look at it.
756 Your logfile will grow indefinitely, and you will probably want to
757 periodically remove it. On Unix systems, you can do this with a cron job
758 (see <quote>man cron</quote>). For Redhat, a <command>logrotate</command>
759 script has been included.
763 On SuSE Linux systems, you can place a line like <quote>/var/log/junkbuster.*
764 +1024k 644 nobody.nogroup</quote> in <filename>/etc/logfiles</filename>, with
765 the effect that cron.daily will automatically archive, gzip, and empty the
766 log, when it exceeds 1M size.
770 Default: Log to the a file named <filename>logfile</filename>.
771 Comment out to disable logging.
778 <emphasis>logfile logfile</emphasis>
785 The <quote>jarfile</quote> defines where
786 <application>Junkbuster</application> stores the cookies it intercepts. Note
787 that if you use a <quote>jarfile</quote>, it may grow quite large. Default:
788 Don't store intercepted cookies.
795 <emphasis>#jarfile jarfile</emphasis>
802 If you specify a <quote>trustfile</quote>,
803 <application>Junkbuster</application> will only allow access to sites that
804 are named in the trustfile. You can also mark sites as trusted referrers,
805 with the effect that access to untrusted sites will be granted, if a link
806 from a trusted referrer was used. The link target will then be added to the
807 <quote>trustfile</quote>. This is a very restrictive feature that typical
808 users most probably want to leave disabled. Default: Disabled, don't use the
816 <emphasis>#trustfile trust</emphasis>
823 If you use the trust mechanism, it is a good idea to write up some on-line
824 documentation about your blocking policy and to specify the URL(s) here. They
825 will appear on the page that your users receive when they try to access
826 untrusted content. Use multiple times for multiple URLs. Default: Don't
827 display links on the <quote>untrusted</quote> info page.
834 <emphasis>trust-info-url http://www.your-site.com/why_we_block.html</emphasis>
835 <emphasis>trust-info-url http://www.your-site.com/what_we_allow.html</emphasis>
843 <!-- ~ End section ~ -->
847 <!-- ~~~~~ New section ~~~~~ -->
850 <title>Other Configuration Options</title>
853 This part of the configuration file contains options that control how
854 <application>Junkbuster</application> operates.
858 <quote>Admin-address</quote> should be set to the email address of the proxy
859 administrator. It is used in many of the proxy-generated pages. Default:
867 <emphasis>#admin-address fill@me.in.please</emphasis>
874 <quote>Proxy-info-url</quote> can be set to a URL that contains more info
875 about this <application>Junkbuster</application> installation, it's
876 configuration and policies. It is used in many of the proxy-generated pages
877 and its use is highly recommended in multi-user installations, since your
878 users will want to know why certain content is blocked or modified. Default:
879 Don't show a link to on-line documentation.
886 <emphasis>proxy-info-url http://www.your-site.com/proxy.html</emphasis>
893 <quote>Listen-address</quote> specifies the address and port where
894 <application>Junkbuster</application> will listen for connections from your
895 Web browser. The default is to listen on the localhost port 8118, and
896 this is suitable for most users. (In your web browser, under proxy
897 configuration, list the proxy server as <quote>localhost</quote> and the
898 port as <quote>8118</quote>).
902 If you already have another service running on port 8118, or if you want to
903 serve requests from other machines (e.g. on your local network) as well, you
904 will need to override the default. The syntax is
905 <quote>listen-address [<ip-address>]:<port></quote>. If you leave
906 out the IP address, <application>junkbuster</application> will bind to all
907 interfaces (addresses) on your machine and may become reachable from the
908 Internet. In that case, consider using access control lists (acl's) (see
909 <quote>aclfile</quote> above), or a firewall.
913 For example, suppose you are running <application>Junkbuster</application> on
914 a machine which has the address 192.168.0.1 on your local private network
915 (192.168.0.0) and has another outside connection with a different address.
916 You want it to serve requests from inside only:
923 <emphasis>listen-address 192.168.0.1:8118</emphasis>
930 If you want it to listen on all addresses (including the outside
938 <emphasis>listen-address :8118</emphasis>
945 If you do this, consider using ACLs (see <quote>aclfile</quote> above). Note:
946 you will need to point your browser(s) to the address and port that you have
947 configured here. Default: localhost:8118 (127.0.0.1:8118).
951 The debug option sets the level of debugging information to log in the
952 logfile (and to the console in the Windows version). A debug level of 1 is
953 informative because it will show you each request as it happens. Higher
954 levels of debug are probably only of interest to developers.
961 debug 1 # GPC = show each GET/POST/CONNECT request
962 debug 2 # CONN = show each connection status
963 debug 4 # IO = show I/O status
964 debug 8 # HDR = show header parsing
965 debug 16 # LOG = log all data into the logfile
966 debug 32 # FRC = debug force feature
967 debug 64 # REF = debug regular expression filter
968 debug 128 # = debug fast redirects
969 debug 256 # = debug GIF de-animation
970 debug 512 # CLF = Common Log Format
971 debug 1024 # = debug kill pop-ups
972 debug 4096 # INFO = Startup banner and warnings.
973 debug 8192 # ERROR = Non-fatal errors
980 It is <emphasis>highly recommended</emphasis> that you enable ERROR
981 reporting (debug 8192), at least until the next stable release.
985 The reporting of FATAL errors (i.e. ones which crash
986 <application>JunkBuster</application>) is always on and cannot be disabled.
990 If you want to use CLF (Common Log Format), you should set <quote>debug
991 512</quote> ONLY, do not enable anything else.
995 Multiple <quote>debug</quote> directives, are OK - they're logical-OR'd
1003 <emphasis>debug 15 # same as setting the first 4 listed above</emphasis>
1017 <emphasis>debug 1 # URLs</emphasis>
1018 <emphasis>debug 4096 # Info</emphasis>
1019 <emphasis>debug 8192 # Errors - *we highly recommended enabling this*</emphasis>
1026 <application>Junkbuster</application> normally uses
1027 <quote>multi-threading</quote>, a software technique that permits it to
1028 handle many different requests simultaneously. In some cases you may wish to
1029 disable this -- particularly if you're trying to debug a problem. The
1030 <quote>single-threaded</quote> option forces
1031 <application>Junkbuster</application> to handle requests sequentially.
1032 Default: Multi-threaded mode.
1039 <emphasis>#single-threaded</emphasis>
1046 <quote>toggle</quote> allows you to temporarily disable all
1047 <application>Junkbuster's</application> filtering. Just set <quote>toggle
1052 The Windows version of <application>Junkbuster</application> puts an icon in
1053 the system tray, which also allows you to change this option. If you
1054 right-click on that icon (or select the <quote>Options</quote> menu), one
1055 choice is <quote>Enable</quote>. Clicking on enable toggles
1056 <application>Junkbuster</application> on and off. This is useful if you want
1057 to temporarily disable <application>Junkbuster</application>, e.g., to access
1058 a site that requires cookies which you would otherwise have blocked. This can also
1059 be toggled via a web browser at the <application>Junkbuster</application>
1060 internal address of <ulink url="http://i.j.b">http://i.j.b</ulink> on
1065 <quote>toggle 1</quote> means <application>Junkbuster</application> runs
1066 normally, <quote>toggle 0</quote> means that
1067 <application>Junkbuster</application> becomes a non-anonymizing non-blocking
1068 proxy. Default: 1 (on).
1075 <emphasis>toggle 1</emphasis>
1082 For content filtering, i.e. the <quote>+filter</quote> and
1083 <quote>+deanimate-gif</quote> actions, it is necessary that
1084 <application>Junkbuster</application> buffers the entire document body.
1085 This can be potentially dangerous, since a server could just keep sending
1086 data indefinitely and wait for your RAM to exhaust. With nasty consequences.
1090 The <application>buffer-limit</application> option lets you set the maximum
1091 size in Kbytes that each buffer may use. When the documents buffer exceeds
1092 this size, it is flushed to the client unfiltered and no further attempt to
1093 filter the rest of it is made. Remember that there may multiple threads
1094 running, which might require increasing the <quote>buffer-limit</quote>
1095 Kbytes <emphasis>each</emphasis>, unless you have enabled
1096 <quote>single-threaded</quote> above.
1103 <emphasis>buffer-limit 4069</emphasis>
1110 To enable the web-based <filename>ijb.action</filename> file editor set
1111 <application>enable-edit-actions</application> to 1, or 0 to disable. Note
1112 that you must have compiled <application>JunkBuster</application> with
1113 support for this feature, otherwise this option has no effect. This
1114 internal page can be reached at <ulink
1115 url="http://i.j.b">http://i.j.b</ulink>.
1119 Security note: If this is enabled, anyone who can use the proxy
1120 can edit the actions file, and their changes will affect all users.
1121 For shared proxies, you probably want to disable this. Default: enabled.
1128 <emphasis>enable-edit-actions 1</emphasis>
1135 Allow <application>JunkBuster</application> to be toggled on and off
1136 remotely, using your web browser. Set <quote>enable-remote-toggle</quote>to
1137 1 to enable, and 0 to disable. Note that you must have compiled
1138 <application>JunkBuster</application> with support for this feature,
1139 otherwise this option has no effect.
1143 Security note: If this is enabled, anyone who can use the proxy can toggle
1144 it on or off (see <ulink url="http://i.j.b">http://i.j.b</ulink>), and
1145 their changes will affect all users. For shared proxies, you probably want to
1146 disable this. Default: enabled.
1153 <emphasis>enable-remote-toggle 1</emphasis>
1161 <!-- ~ End section ~ -->
1164 <!-- ~~~~~ New section ~~~~~ -->
1167 <title>Access Control List (ACL)</title>
1169 Access controls are included at the request of some ISPs and systems
1170 administrators, and are not usually needed by individual users. Please note
1171 the warnings in the FAQ that this proxy is not intended to be a substitute
1172 for a firewall or to encourage anyone to defer addressing basic security
1177 If no access settings are specified, the proxy talks to anyone that
1178 connects. If any access settings file are specified, then the proxy
1179 talks only to IP addresses permitted somewhere in this file and not
1180 denied later in this file.
1184 Summary -- if using an ACL:
1189 Client must have permission to receive service.
1194 LAST match in ACL wins.
1199 Default behavior is to deny service.
1204 The syntax for an entry in the Access Control List is:
1211 ACTION SRC_ADDR[/SRC_MASKLEN] [ DST_ADDR[/DST_MASKLEN] ]
1218 Where the individual fields are:
1225 <emphasis>ACTION</emphasis> = <quote>permit-access</quote> or <quote>deny-access</quote>
1227 <emphasis>SRC_ADDR</emphasis> = client hostname or dotted IP address
1228 <emphasis>SRC_MASKLEN</emphasis> = number of bits in the subnet mask for the source
1230 <emphasis>DST_ADDR</emphasis> = server or forwarder hostname or dotted IP address
1231 <emphasis>DST_MASKLEN</emphasis> = number of bits in the subnet mask for the target
1239 The field separator (FS) is whitespace (space or tab).
1243 IMPORTANT NOTE: If the <application>junkbuster</application> is using a
1244 forwarder (see below) or a gateway for a particular destination URL, the
1245 <literal>DST_ADDR</literal> that is examined is the address of the forwarder
1246 or the gateway and <emphasis>NOT</emphasis> the address of the ultimate
1247 target. This is necessary because it may be impossible for the local
1248 <application>Junkbuster</application> to determine the address of the
1249 ultimate target (that's often what gateways are used for).
1253 Here are a few examples to show how the ACL features work:
1257 <quote>localhost</quote> is OK -- no DST_ADDR implies that
1258 <emphasis>ALL</emphasis> destination addresses are OK:
1265 <emphasis>permit-access localhost</emphasis>
1272 A silly example to illustrate permitting any host on the class-C subnet with
1273 <application>Junkbuster</application> to go anywhere:
1280 <emphasis>permit-access www.junkbusters.com/24</emphasis>
1287 Except deny one particular IP address from using it at all:
1294 <emphasis>deny-access ident.junkbusters.com</emphasis>
1301 You can also specify an explicit network address and subnet mask.
1302 Explicit addresses do not have to be resolved to be used.
1309 <emphasis>permit-access 207.153.200.0/24</emphasis>
1316 A subnet mask of 0 matches anything, so the next line permits everyone.
1323 <emphasis>permit-access 0.0.0.0/0</emphasis>
1330 Note, you <emphasis>cannot</emphasis> say:
1337 <emphasis>permit-access .org</emphasis>
1344 to allow all *.org domains. Every IP address listed must resolve fully.
1348 An ISP may want to provide a <application>Junkbuster</application> that is
1349 accessible by <quote>the world</quote> and yet restrict use of some of their
1350 private content to hosts on its internal network (i.e. its own subscribers).
1351 Say, for instance the ISP owns the Class-B IP address block 123.124.0.0 (a 16
1352 bit netmask). This is how they could do it:
1359 <emphasis>permit-access 0.0.0.0/0 0.0.0.0/0</emphasis> # other clients can go anywhere
1360 # with the following exceptions:
1362 <emphasis>deny-access</emphasis> 0.0.0.0/0 123.124.0.0/16 # block all external requests for
1363 # sites on the ISP's network
1365 <emphasis>permit 0.0.0.0/0 www.my_isp.com</emphasis> # except for the ISP's main
1368 <emphasis>permit 123.124.0.0/16 0.0.0.0/0</emphasis> # the ISP's clients can go
1376 Note that if some hostnames are listed with multiple IP addresses,
1377 the primary value returned by DNS (via gethostbyname()) is used. Default:
1378 Anyone can access the proxy.
1383 <!-- ~ End section ~ -->
1386 <!-- ~~~~~ New section ~~~~~ -->
1389 <title>Forwarding</title>
1392 This feature allows chaining of HTTP requests via multiple proxies.
1393 It can be used to better protect privacy and confidentiality when
1394 accessing specific domains by routing requests to those domains
1395 to a special purpose filtering proxy such as lpwa.com. Or to use
1396 a caching proxy to speed up browsing.
1400 It can also be used in an environment with multiple networks to route
1401 requests via multiple gateways allowing transparent access to multiple
1402 networks without having to modify browser configurations.
1406 Also specified here are SOCKS proxies. <application>Junkbuster</application>
1407 SOCKS 4 and SOCKS 4A. The difference is that SOCKS 4A will resolve the target
1408 hostname using DNS on the SOCKS server, not our local DNS client.
1412 The syntax of each line is:
1419 <emphasis>forward target_domain[:port] http_proxy_host[:port]</emphasis>
1420 <emphasis>forward-socks4 target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1421 <emphasis>forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]</emphasis>
1428 If http_proxy_host is <quote>.</quote>, then requests are not forwarded to a
1429 HTTP proxy but are made directly to the web servers.
1433 Lines are checked in sequence, and the last match wins.
1437 There is an implicit line equivalent to the following, which specifies that
1438 anything not finding a match on the list is to go out without forwarding
1439 or gateway protocol, like so:
1446 <emphasis>forward .* . </emphasis># implicit
1453 In the following common configuration, everything goes to Lucent's LPWA,
1454 except SSL on port 443 (which it doesn't handle):
1461 <emphasis>forward .* lpwa.com:8000</emphasis>
1462 <emphasis>forward :443 .</emphasis>
1469 See the FAQ for instructions on how to automate the login procedure for LPWA.
1470 Some users have reported difficulties related to LPWA's use of
1471 <quote>.</quote> as the last element of the domain, and have said that this
1472 can be fixed with this:
1479 <emphasis>forward lpwa. lpwa.com:8000</emphasis>
1486 (NOTE: the syntax for specifying target_domain has changed since the
1487 previous paragraph was written -- it will not work now. More information
1492 In this fictitious example, everything goes via an ISP's caching proxy,
1493 except requests to that ISP:
1500 <emphasis>forward .* caching.myisp.net:8000</emphasis>
1501 <emphasis>forward myisp.net .</emphasis>
1508 For the @home network, we're told the forwarding configuration is this:
1516 <emphasis>forward .* proxy:8080</emphasis>
1523 Also, we're told they insist on getting cookies and JavaScript, so you should
1524 add home.com to the cookie file. We consider JavaScript a security risk.
1525 Java need not be enabled.
1529 In this example direct connections are made to all <quote>internal</quote>
1530 domains, but everything else goes through Lucent's LPWA by way of the
1531 company's SOCKS gateway to the Internet.
1538 <emphasis>forward-socks4 .* lpwa.com:8000 firewall.my_company.com:1080</emphasis>
1539 <emphasis>forward my_company.com .</emphasis>
1546 This is how you could set up a site that always uses SOCKS but no forwarders:
1553 <emphasis>forward-socks4a .* . firewall.my_company.com:1080</emphasis>
1560 An advanced example for network administrators:
1564 If you have links to multiple ISPs that provide various special content to
1565 their subscribers, you can configure forwarding to pass requests to the
1566 specific host that's connected to that ISP so that everybody can see all
1567 of the content on all of the ISPs.
1571 This is a bit tricky, but here's an example:
1576 host-a has a PPP connection to isp-a.com. And host-b has a PPP connection to
1577 isp-b.com. host-a can run a <application>Junkbuster</application> proxy with
1578 forwarding like this:
1585 <emphasis>forward .* .</emphasis>
1586 <emphasis>forward isp-b.com host-b:8118</emphasis>
1593 host-b can run a <application>Junkbuster</application> proxy with forwarding
1601 <emphasis>forward .* .</emphasis>
1602 <emphasis>forward isp-a.com host-a:8118</emphasis>
1609 Now, <emphasis>anyone</emphasis> on the Internet (including users on host-a
1610 and host-b) can set their browser's proxy to <emphasis>either</emphasis>
1611 host-a or host-b and be able to browse the content on isp-a or isp-b.
1615 Here's another practical example, for University of Kent at
1616 Canterbury students with a network connection in their room, who
1617 need to use the University's Squid web cache.
1624 <emphasis>forward *. ssbcache.ukc.ac.uk:3128</emphasis> # Use the proxy, except for:
1625 <emphasis>forward .ukc.ac.uk . </emphasis> # Anything on the same domain as us
1626 <emphasis>forward * . </emphasis> # Host with no domain specified
1627 <emphasis>forward 129.12.*.* . </emphasis> # A dotted IP on our /16 network.
1628 <emphasis>forward 127.*.*.* . </emphasis> # Loopback address
1629 <emphasis>forward localhost.localdomain . </emphasis> # Loopback address
1630 <emphasis>forward www.ukc.mirror.ac.uk . </emphasis> # Specific host
1637 If you intend to chain <application>Junkbuster</application> and
1638 <application>squid</application> locally, then chain as
1639 <literal>browser -> squid -> junkbuster</literal> is the recommended way.
1643 Your squid configuration could then look like this:
1650 # Define junkbuster as parent cache
1651 <!-- per feedback from user...
1652 cache_peer 127.0.0.1 8118 parent 0 no-query
1654 cache_peer 127.0.0.1 parent 8118 0 no-query
1656 # Define ACL for protocol FTP
1659 # Do not forward ACL FTP to junkbuster
1660 always_direct allow FTP
1662 # Do not forward ACL CONNECT (https) to junkbuster
1663 always_direct allow CONNECT
1665 # Forward the rest to junkbuster
1666 never_direct allow all
1674 <!-- ~ End section ~ -->
1677 <!-- ~~~~~ New section ~~~~~ -->
1680 <title>Windows GUI Options</title>
1682 Removed references to Win32. HB 09/23/01
1685 <application>Junkbuster</application> has a number of options specific to the
1686 Windows GUI interface:
1690 If <quote>activity-animation</quote> is set to 1, the
1691 <application>Junkbuster</application> icon will animate when
1692 <quote>Junkbuster</quote> is active. To turn off, set to 0.
1699 <emphasis>activity-animation 1</emphasis>
1706 If <quote>log-messages</quote> is set to 1,
1707 <application>Junkbuster</application> will log messages to the console
1715 <emphasis>log-messages 1</emphasis>
1722 If <quote>log-buffer-size</quote> is set to 1, the size of the log buffer,
1723 i.e. the amount of memory used for the log messages displayed in the
1724 console window, will be limited to <quote>log-max-lines</quote> (see below).
1728 Warning: Setting this to 0 will result in the buffer to grow infinitely and
1729 eat up all your memory!
1736 <emphasis>log-buffer-size 1</emphasis>
1743 <application>log-max-lines</application> is the maximum number of lines held
1744 in the log buffer. See above.
1751 <emphasis>log-max-lines 200</emphasis>
1758 If <quote>log-highlight-messages</quote> is set to 1,
1759 <application>Junkbuster</application> will highlight portions of the log
1760 messages with a bold-faced font:
1767 <emphasis>log-highlight-messages 1</emphasis>
1774 The font used in the console window:
1781 <emphasis>log-font-name Comic Sans MS</emphasis>
1788 Font size used in the console window:
1795 <emphasis>log-font-size 8</emphasis>
1802 <quote>show-on-task-bar</quote> controls whether or not
1803 <application>Junkbuster</application> will appear as a button on the Task bar
1811 <emphasis>show-on-task-bar 0</emphasis>
1818 If <quote>close-button-minimizes</quote> is set to 1, the Windows close
1819 button will minimize <application>Junkbuster</application> instead of closing
1820 the program (close with the exit option on the File menu).
1827 <emphasis>close-button-minimizes 1</emphasis>
1834 The <quote>hide-console</quote> option is specific to the MS-Win console
1835 version of <application>JunkBuster</application>. If this option is used,
1836 <application>Junkbuster</application> will disconnect from and hide the
1853 <!-- ~ End section ~ -->
1856 <!-- ~~~~~ New section ~~~~~ -->
1857 <sect2 id="actionsfile">
1858 <title>The Actions File</title>
1861 The <quote>ijb.action</quote> file (formerly
1862 <filename>actionsfile</filename>) is used to define what actions
1863 <application>Junkbuster</application> takes, and thus determines how images,
1864 cookies and various other aspects of HTTP content and transactions are
1865 handled. Images can be anything you want, including ads, banners, or just
1866 some obnoxious image that you would rather not see. Cookies can be accepted
1867 or rejected, or accepted only during the current browser session (i.e.
1868 not written to disk). Changes to <filename>ijb.action</filename> should
1869 be immediately visible to <application>Junkbuster</application> without
1870 the need to restart.
1874 To determine which actions apply to a request, the URL of the request is
1875 compared to all patterns in this file. Every time it matches, the list of
1876 applicable actions for the URL is incrementally updated. You can trace
1877 this process by visiting <ulink
1878 url="http://i.j.b/show-url-info">http://i.j.b/show-url-info</ulink>.
1882 The actions file can be edited with a browser by loading
1883 <ulink url="http://i.j.b/">http://i.j.b/</ulink>, and then select
1884 <quote>Edit Actions</quote>.
1888 There are four types of lines in this file: comments (begin with a
1889 <quote>#</quote> character), actions, aliases and patterns, all of which are
1890 explained below, as well as the configuration file syntax that
1891 <application>Junkbuster</application> understands.
1896 <!-- ~~~~~ New section ~~~~~ -->
1898 <title>URL Domain and Path Syntax</title>
1900 Generally, a pattern has the form <domain>/<path>, where both the
1901 <domain> and <path> part are optional. If you only specify a
1902 domain part, the <quote>/</quote> can be left out:
1906 <emphasis>www.example.com</emphasis> - is a domain only pattern and will match any request to
1907 <quote>www.example.com</quote>.
1911 <emphasis>www.example.com/</emphasis> - means exactly the same.
1915 <emphasis>www.example.com/index.html</emphasis> - matches only the single
1916 document <quote>/index.html</quote> on <quote>www.example.com</quote>.
1920 <emphasis>/index.html</emphasis> - matches the document <quote>/index.html</quote>, regardless of
1925 <emphasis>index.html</emphasis> - matches nothing, since it would be
1926 interpreted as a domain name and there is no top-level domain called
1927 <quote>.html</quote>.
1931 The matching of the domain part offers some flexible options: if the
1932 domain starts or ends with a dot, it becomes unanchored at that end.
1937 <emphasis>.example.com</emphasis> - matches any domain that <emphasis>ENDS</emphasis> in
1938 <quote>.example.com</quote>.
1942 <emphasis>www.</emphasis> - matches any domain that <emphasis>STARTS</emphasis> with
1947 Additionally, there are wild-cards that you can use in the domain names
1948 themselves. They work pretty similar to shell wild-cards: <quote>*</quote>
1949 stands for zero or more arbitrary characters, <quote>?</quote> stands for
1950 any single character. And you can define character classes in square
1951 brackets and they can be freely mixed:
1955 <emphasis>ad*.example.com</emphasis> - matches <quote>adserver.example.com</quote>,
1956 <quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>.
1960 <emphasis>*ad*.example.com</emphasis> - matches all of the above, and then some.
1964 <emphasis>.?pix.com</emphasis> - matches <quote>www.ipix.com</quote>,
1965 <quote>pictures.epix.com</quote>, <quote>a.b.c.d.e.upix.com</quote>, etc.
1969 <emphasis>www[1-9a-ez].example.com</emphasis> - matches <quote>www1.example.com</quote>,
1970 <quote>www4.example.com</quote>, <quote>wwwd.example.com</quote>,
1971 <quote>wwwz.example.com</quote>, etc., but <emphasis>not</emphasis>
1972 <quote>wwww.example.com</quote>.
1976 If <application>Junkbuster</application> was compiled with
1977 <quote>pcre</quote> support (default), Perl compatible regular expressions
1978 can be used. See the <filename>pcre/docs/</filename> directory or <quote>man
1979 perlre</quote> (also available on <ulink
1980 url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>)
1981 for details. A brief discussion of regular expressions is in the
1982 <link linkend="regex">Appendix</link>. For instance:
1986 <emphasis>/.*/advert[0-9]+\.jpe?g</emphasis> - would match a URL from any
1987 domain, with any path that includes <quote>advert</quote> followed
1988 immediately by one or more digits, then a <quote>.</quote> and ending in
1989 either <quote>jpeg</quote> or <quote>jpg</quote>. So we match
1990 <quote>example.com/ads/advert2.jpg</quote>, and
1991 <quote>www.example.com/ads/banners/advert39.jpeg</quote>, but not
1992 <quote>www.example.com/ads/banners/advert39.gif</quote> (no gifs in the
1997 Please note that matching in the path is case
1998 <emphasis>INSENSITIVE</emphasis> by default, but you can switch to case
1999 sensitive at any point in the pattern by using the
2000 <quote>(?-i)</quote> switch:
2004 <emphasis>www.example.com/(?-i)PaTtErN.*</emphasis> - will match only
2005 documents whose path starts with <quote>PaTtErN</quote> in
2006 <emphasis>exactly</emphasis> this capitalization.
2011 <!-- ~ End section ~ -->
2015 <!-- ~~~~~ New section ~~~~~ -->
2018 <title>Actions</title>
2020 Actions are enabled if preceded with a <quote>+</quote>, and disabled if
2021 preceded with a <quote>-</quote>. Actions are invoked by enclosing the
2022 action name in curly braces (e.g. {+some_action}), followed by a list of
2023 URLs to which the action applies. There are three classes of actions:
2031 Boolean (e.g. <quote>+/-block</quote>):
2037 <emphasis>{+name}</emphasis> # enable this action
2038 <emphasis>{-name}</emphasis> # disable this action
2048 parameterized (e.g. <quote>+/-hide-user-agent</quote>):
2054 <emphasis>{+name{param}}</emphasis> # enable action and set parameter to <quote>param</quote>
2055 <emphasis>{-name}</emphasis> # disable action
2064 Multi-value (e.g. <quote>{+/-add-header{Name: value}}</quote>, <quote>{+/-wafer{name=value}}</quote>):
2070 <emphasis>{+name{param}}</emphasis> # enable action and add parameter <quote>param</quote>
2071 <emphasis>{-name{param}}</emphasis> # remove the parameter <quote>param</quote>
2072 <emphasis>{-name}</emphasis> # disable this action totally
2083 If nothing is specified in this file, no <quote>actions</quote> are taken.
2084 So in this case <application>JunkBuster</application> would just be a
2085 normal, non-blocking, non-anonymizing proxy. You must specifically
2086 enable the privacy and blocking features you need (although the
2087 provided default <filename>ijb.action</filename> file will
2088 give a good starting point).
2092 Later defined actions always over-ride earlier ones. For multi-valued
2093 actions, the actions are applied in the order they are specified.
2097 The list of valid <application>Junkbuster</application> <quote>actions</quote> are:
2105 Add the specified HTTP header, which is not checked for validity.
2106 You may specify this many times to specify many different headers:
2112 <emphasis>+add-header{Name: value}</emphasis>
2122 Block this URL totally.
2128 <emphasis>+block</emphasis>
2138 De-animate all animated GIF images, i.e. reduce them to their last frame.
2139 This will also shrink the images considerably (in bytes, not pixels!). If
2140 the option <quote>first</quote> is given, the first frame of the animation
2141 is used as the replacement. If <quote>last</quote> is given, the last frame
2142 of the animation is used instead, which probably makes more sense for most
2143 banner animations, but also has the risk of not showing the entire last
2144 frame (if it is only a delta to an earlier frame).
2150 <emphasis>+deanimate-gifs{last}</emphasis>
2151 <emphasis>+deanimate-gifs{first}</emphasis>
2160 <quote>+downgrade</quote> will downgrade HTTP/1.1 client requests to
2161 HTTP/1.0 and downgrade the responses as well. Use this action for servers
2162 that use HTTP/1.1 protocol features that
2163 <application>Junkbuster</application> doesn't handle well yet. HTTP/1.1
2164 is only partially implemented. Default is not to downgrade requests.
2170 <emphasis>+downgrade</emphasis>
2179 Many sites, like yahoo.com, don't just link to other sites. Instead, they
2180 will link to some script on their own server, giving the destination as a
2181 parameter, which will then redirect you to the final target. URLs resulting
2182 from this scheme typically look like:
2183 http://some.place/some_script?http://some.where-else.
2186 Sometimes, there are even multiple consecutive redirects encoded in the
2187 URL. These redirections via scripts make your web browsing more traceable,
2188 since the server from which you follow such a link can see where you go to.
2189 Apart from that, valuable bandwidth and time is wasted, while your browser
2190 ask the server for one redirect after the other. Plus, it feeds the
2194 The <quote>+fast-redirects</quote> option enables interception of these
2195 requests by <application>Junkbuster</application>, who will cut off all but
2196 the last valid URL in the request and send a local redirect back to your
2197 browser without contacting the remote site.
2203 <emphasis>+fast-redirects</emphasis>
2212 Filter the website through the re_filterfile:
2218 <emphasis>+filter{filename}</emphasis>
2227 Block any existing X-Forwarded-for header, and do not add a new one:
2233 <emphasis>+hide-forwarded</emphasis>
2242 If the browser sends a <quote>From:</quote> header containing your e-mail
2243 address, this either completely removes the header (<quote>block</quote>), or
2244 changes it to the specified e-mail address.
2250 <emphasis>+hide-from{block}</emphasis>
2251 <emphasis>+hide-from{spam@sittingduck.xqq}</emphasis>
2260 Don't send the <quote>Referer:</quote> (sic) header to the web site. You
2261 can block it, forge a URL to the same server as the request (which is
2262 preferred because some sites will not send images otherwise) or set it to a
2263 constant string of your choice.
2269 <emphasis>+hide-referer{block}</emphasis>
2270 <emphasis>+hide-referer{forge}</emphasis>
2271 <emphasis>+hide-referer{http://nowhere.com}</emphasis>
2280 Alternative spelling of <quote>+hide-referer</quote>. It has the same
2281 parameters, and can be freely mixed with, <quote>+hide-referer</quote>.
2282 (<quote>referrer</quote> is the correct English spelling, however the HTTP
2283 specification has a bug - it requires it to be spelled <quote>referer</quote>.)
2289 <emphasis>+hide-referrer{...}</emphasis>
2298 Change the <quote>User-Agent:</quote> header so web servers can't tell your
2299 browser type. Warning! This breaks many web sites. Specify the
2300 user-agent value you want. Example, pretend to be using Netscape on
2307 <emphasis>+hide-user-agent{Mozilla (X11; I; Linux 2.0.32 i586)}</emphasis>
2314 Or to identify yourself explicitly as a <quote>Junkbuster</quote> user:
2320 <emphasis>+hide-user-agent{JunkBuster/1.0}</emphasis>
2325 (Don't change the version number from 1.0 - after all, why tell them?)
2332 <emphasis>+hide-user-agent{browser-type}</emphasis>
2342 Treat this URL as an image. This only matters if it's also <quote>+block</quote>ed,
2343 in which case a <quote>blocked</quote> image can be sent rather than a HTML page.
2344 See <quote>+image-blocker{}</quote> below for the control over what is actually sent.
2350 <emphasis>+image</emphasis>
2359 Decides what to do with URLs that end up tagged with <quote>{+block
2360 +image}</quote>. There are 4 options. <quote>-image-blocker</quote> will
2361 send a HTML <quote>blocked</quote> page, usually resulting in a
2362 <quote>broken image</quote> icon. <quote>+image-blocker{logo}</quote> will
2363 send a <quote>JunkBuster</quote> image.
2364 <quote>+image-blocker{blank}</quote> will send a 1x1 transparent GIF image.
2365 And finally, <quote>+image-blocker{http://xyz.com}</quote> will send a HTTP
2366 temporary redirect to the specified image. This has the advantage of the
2367 icon being being cached by the browser, which will speed up the display.
2373 <emphasis>+image-blocker{logo}</emphasis>
2374 <emphasis>+image-blocker{blank}</emphasis>
2375 <emphasis>+image-blocker{http://i.j.b/send-banner}</emphasis>
2384 By default (i.e. in the absence of a <quote>+limit-connect</quote>
2385 action), <application>Junkbuster</application> will only allow CONNECT
2386 requests to port 443, which is the standard port for https as a
2391 The CONNECT methods exists in HTTP to allow access to secure websites
2392 (https:// URLs) through proxies. It works very simply: the proxy
2393 connects to the server on the specified port, and then short-circuits
2394 its connections to the client <emphasis>and</emphasis> to the remote proxy.
2395 This can be a big security hole, since CONNECT-enabled proxies can
2396 be abused as TCP relays very easily.
2400 If you want to allow CONNECT for more ports than this, or want to forbid
2401 CONNECT altogether, you can specify a comma separated list of ports and
2402 port ranges (the latter using dashes, with the minimum defaulting to 0 and
2410 <emphasis>+limit-connect{443} # This is the default and need no be specified.</emphasis>
2411 <emphasis>+limit-connect{80,443} # Ports 80 and 443 are OK.</emphasis>
2412 <emphasis>+limit-connect{-3, 7, 20-100, 500-} # Port less than 3, 7, 20 to 100</emphasis>
2413 <emphasis> #and above 500 are OK.</emphasis>
2423 <quote>+no-compression</quote> prevents the website from compressing the
2424 data. Some websites do this, which can be a problem for
2425 <application>Junkbuster</application>, since <quote>+filter</quote>,
2426 <quote>+no-popup</quote> and <quote>+gif-deanimate</quote> will not work on
2427 compressed data. This will slow down connections to those websites,
2428 though. Default is <quote>nocompression</quote> is turned on.
2435 <emphasis>+nocompression</emphasis>
2444 If the website sets cookies, <quote>no-cookies-keep</quote> will make sure
2445 they are erased when you exit and restart your web browser. This makes
2446 profiling cookies useless, but won't break sites which require cookies so
2447 that you can log in for transactions. Default: on.
2453 <emphasis>+no-cookies-keep</emphasis>
2462 Prevent the website from reading cookies:
2468 <emphasis>+no-cookies-read</emphasis>
2477 Prevent the website from setting cookies:
2483 <emphasis>+no-cookies-set</emphasis>
2492 Filter the website through a built-in filter to disable those obnoxious
2493 JavaScript pop-up windows via window.open(), etc. The two alternative
2494 spellings are equivalent.
2500 <emphasis>+no-popup</emphasis>
2501 <emphasis>+no-popups</emphasis>
2510 This action only applies if you are using a <filename>jarfile</filename>
2511 for saving cookies. It sends a cookie to every site stating that you do not
2512 accept any copyright on cookies sent to you, and asking them not to track
2513 you. Of course, this is a (relatively) unique header they could use to
2520 <emphasis>+vanilla-wafer</emphasis>
2529 This allows you to add an arbitrary cookie. It can be specified multiple
2530 times in order to add as many cookies as you like.
2536 <emphasis>+wafer{name=value}</emphasis>
2547 The meaning of any of the above is reversed by preceding the action with a
2548 <quote>-</quote>, in place of the <quote>+</quote>.
2556 Turn off cookies by default, then allow a few through for specified sites:
2563 # Turn off all persistent cookies
2564 { +no-cookies-read }
2566 # Allow cookies for this browser session ONLY
2567 { +no-cookies-keep }
2569 # Exceptions to the above, sites that benefit from persistent cookies
2570 { -no-cookies-read }
2572 { -no-cookies-keep }
2579 # Alternative way of saying the same thing
2580 {-no-cookies-set -no-cookies-read -no-cookies-keep}
2589 Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
2599 # Reverse it for these two sites, which don't work right without it.
2601 www.ukc.ac.uk/cgi-bin/wac\.cgi\?
2609 Turn on page filtering, with one exception for sourceforge:
2616 # Run everything through the default filter file (<filename>re_filterfile</filename>):
2619 # But please don't re_filter code from sourceforge!
2621 .cvs.sourceforge.net
2628 Now some URLs that we want <quote>blocked</quote>, ie we won't see them.
2629 Many of these use regular expressions that will expand to match multiple
2639 /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
2640 /.*/(.*[-_.])?count(er)?(\.cgi|\.dll|\.exe|[?/])
2641 /.*/(ng)?adclient\.cgi
2642 /.*/(plain|live|rotate)[-_.]?ads?/
2643 /.*/(sponsor)s?[0-9]?/
2644 /.*/_?(plain|live)?ads?(-banners)?/
2646 /.*/ad(sdna_image|gifs?)/
2647 /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
2651 /.*/adv((er)?ts?|ertis(ing|ements?))?/
2655 /.*/cgi-bin/centralad/getimage
2656 /.*/images/addver\.gif
2657 /.*/images/marketing/.*\.(gif|jpe?g)
2661 /.*/sponsors?[0-9]?/
2662 /.*/advert[0-9]+\.jpg
2669 /graphics/defaultAd/
2671 /image\.ng/transactionID
2672 /images/.*/.*_anim\.gif # alvin brattli
2673 /ip_img/.*\.(gif|jpe?g)
2677 /cgi-bin/nph-adclick.exe/
2678 /.*/Image/BannerAdvertising/
2680 /.*/adlib/server\.cgi
2689 <!-- ~ End section ~ -->
2692 <!-- ~~~~~ New section ~~~~~ -->
2694 <title>Aliases</title>
2696 Custom <quote>actions</quote>, known to <application>Junkbuster</application>
2697 as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
2698 These can in turn be invoked just like the built-in <quote>actions</quote>.
2699 Currently, an alias can contain any character except space, tab, <quote>=</quote>,
2700 <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
2701 <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
2702 <quote>-</quote>. Alias names are not case sensitive, and
2703 <emphasis>must be defined before anything</emphasis> else in the
2704 <filename>ijb.action</filename>file ! And there can only be one set of
2705 <quote>aliases</quote> defined.
2709 Now let's define a few aliases:
2716 # Useful customer aliases we can use later. These must come first!
2718 +no-cookies = +no-cookies-set +no-cookies-read
2719 -no-cookies = -no-cookies-set -no-cookies-read
2720 fragile = -block -no-cookies -filter -fast-redirects -hide-referer -no-popups
2721 shop = -no-cookies -filter -fast-redirects
2722 +imageblock = +block +image
2724 #For people who don't like to type too much: ;-)
2727 c2 = -no-cookies-set +no-cookies-read
2728 c3 = +no-cookies-set -no-cookies-read
2729 #... etc. Customize to your heart's content.
2736 Some examples using our <quote>shop</quote> and <quote>fragile</quote>
2744 # These sites are very complex and require
2745 # minimal interference.
2747 .office.microsoft.com
2748 .windowsupdate.microsoft.com
2751 # Shopping sites - still want to block ads.
2754 .worldpay.com # for quietpc.com
2758 # These shops require pop-ups
2770 <!-- ~ End section ~ -->
2773 <!-- ~~~~~ New section ~~~~~ -->
2774 <sect2 id="filterfile">
2775 <title>The Filter File</title>
2777 The filter file defines what filtering of web pages
2778 <application>Junkbuster</application> does. The default filter file is
2779 <filename>re_filterfile</filename>, located in the config directory. In this
2780 file, <emphasis>any document content</emphasis>, whether viewable text or
2781 embedded non-visible content, can be changed.
2785 This file uses regular expressions to alter or remove any string in the
2786 target page. Some examples from the included default <filename>re_filterfile</filename>:
2790 Stop web pages from displaying annoying messages in the status bar by
2791 deleting such references:
2798 # The status bar is for displaying link targets, not pointless buzzwords.
2799 # Again, check it out on http://www.airport-cgn.de/.
2800 s/status='.*?';*//ig
2807 Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
2808 <quote>MicroSuck</quote>:
2815 s/microsoft(?!.com)/MicroSuck/ig
2822 Kill those auto-refresh tags:
2829 # Kill refresh tags. I like to refresh myself. Manually.
2830 # check it out on http://www.airport-cgn.de/ and go to the arrivals page.
2832 s/<meta[^>]*http-equiv[^>]*refresh.*URL=([^>]*?)"?>/<link rev="x-refresh" href=$1>/i
2833 s/<meta[^>]*http-equiv="?page-enter"?[^>]*content=[^>]*>/<!--no page enter for me-->/i
2841 <!-- ~ End section ~ -->
2845 <!-- ~~~~~ New section ~~~~~ -->
2848 <title>Templates</title>
2850 When <application>Junkbuster</application> displays one of its internal
2851 pages, such as a 404 Not Found error page, it uses the appropriate template.
2852 On Linux, BSD, and Unix, these are locate in
2853 <filename>/etc/junkbuster/templates</filename> by default. These may be
2854 customized, if desired.
2861 <!-- ~ End section ~ -->
2865 <!-- ~~~~~ New section ~~~~~ -->
2866 <sect1 id="quickstart"><title>Quickstart to Using Junkbuster</title>
2868 Install package, then run and enjoy! <application>JunkBuster</application>
2869 accepts only one command line option -- the configuration file to be
2870 used. Example Unix startup command:
2876 # /usr/sbin/junkbuster /etc/junkbuster/config
2882 An init script is provided for SuSE and Redhat.
2886 For for SuSE: /etc/rc.d/junkbuster start
2890 For RedHat: /etc/rc.d/init.d/junkbuster start
2895 If no configuration file is specified on the command line,
2896 <application>Junkbuster</application> will look for a file named
2897 <filename>config</filename> in the current directory. Except on Win32 where
2898 it will try <filename>config.txt</filename>. If no file is specified on the
2899 command line and no default configuration file can be found,
2900 <application>Junkbuster</application> will fail to start.
2904 Be sure your browser is set to use the proxy which is by default at
2905 localhost, port 8118. With <application>Netscape</application> (and
2906 <application>Mozilla</application>), this can be set under <literal>Edit
2907 -> Preferences -> Advanced -> Proxies -> HTTP Proxy</literal>.
2908 For <application>Internet Explorer</application>: <literal>Tools >
2909 Internet Properties -> Connections -> LAN Setting</literal>. Then,
2910 check <quote>Use Proxy</quote> and fill in the appropriate info (Address:
2911 localhost, Port: 8118). Include if HTTPS proxy support too.
2915 The included default configuration files should give a reasonable starting
2916 point, though may be somewhat aggressive in blocking junk. You will probably
2917 want to keep an eye out for sites that require persistent cookies, and add these to
2918 <filename>ijb.action</filename> as needed. By default, most of these will
2919 be accepted only during the current browser session, until you add them to
2920 the configuration. If you want the browser to handle this instead, you will
2921 need to edit <filename>ijb.action</filename> and disable this feature. If you
2922 use more than one browser, it would make more sense to let
2923 <application>Junkbuster</application> handle this. In which case, the
2924 browser(s) should be set to accept all cookies.
2928 If a particular site shows problems loading properly, try adding it
2929 to the <literal>{fragile}</literal> section of
2930 <filename>ijb.action</filename>. This will turn off most actions for
2935 <application>Junkbuster</application> is HTTP/1.1 compliant, but not all 1.1
2936 features are as yet implemented. If browsers that support HTTP/1.1 (like
2937 <application>Mozilla</application> or recent versions of I.E.) experience
2938 problems, you might try to force HTTP/1.0 compatibility. For Mozilla, look
2939 under <literal>Edit -> Preferences -> Debug -> Networking</literal>.
2940 Or set the <quote>+downgrade</quote> config option in
2941 <filename>ijb.action</filename>.
2945 After running <application>Junkbuster</application> for a while, you can
2946 start to fine tune the configuration to suit your personal, or site,
2947 preferences and requirements. There are many, many aspects that can
2948 be customized. <quote>Actions</quote> (as specified in <filename>ijb.action</filename>)
2949 can be adjusted by pointing your browser to
2950 <ulink url="http://i.j.b/">http://i.j.b/</ulink>,
2951 and then follow the link to <quote>edit the actions list</quote>.
2952 (This is an internal page and does not require Internet access.)
2956 In fact, various aspects of <application>Junkbuster</application>
2957 configuration can be viewed from this page, including
2958 current configuration parameters, source code version numbers,
2959 the browser's request headers, and <quote>actions</quote> that apply
2960 to a given URL. In addition to the <filename>ijb.action</filename> file
2961 editor mentioned above, <application>Junkbuster</application> can also
2962 be turned <quote>on</quote> and <quote>off</quote> from this page.
2966 If you encounter problems, please verify it is a
2967 <application>Junkbuster</application> bug, by disabling
2968 <application>Junkbuster</application>, and then trying the same page.
2969 Also, try another browser if possible to eliminate browser or site
2970 problems. Before reporting it as a bug, see if there is not a configuration
2971 option that is enabled that is causing the page not to load. You can
2972 then add an exception for that page or site. If a bug, please report it to
2973 the developers (see below).
2979 <!-- ~~~~~ New section ~~~~~ -->
2980 <sect1 id="contact"><title>Contacting the Developers, Bug Reporting and Feature
2983 Please do not use the mailing lists for feature requests or
2984 bug reports. They are not as easily tracked this way!
2990 To be filled. mention the support forums as the primary channel of
2991 communication (bugs, feature requests, etc.)
2993 Feature requests and other questions should be posted to the <ulink
2994 url="http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse">Feature
2995 request page</ulink> at SourceForge. There is also an archive there.
2999 Anyone interested in actively participating in development and related
3000 discussions can join the appropriate mailing list
3001 <ulink url="http://sourceforge.net/mail/?group_id=11118">here</ulink>.
3002 Archives are available here too.
3006 Please report bugs, using the form at
3007 <ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=111118">Sourceforge</ulink>.
3008 Please try to verify that it is a <application>Junkbuster</application> bug,
3009 and not a browser or site bug first. Also, check to make sure this is not
3010 already a known bug. If you are using your own custom configuration, please
3011 try the stock configs to see if the problem is a configuration related bug.
3017 <!-- ~~~~~ New section ~~~~~ -->
3018 <sect1 id="copyright"><title>Copyright and History</title>
3021 <title>License</title>
3023 <application>Internet Junkbuster</application> is free software; you can
3024 redistribute it and/or modify it under the terms of the GNU General Public
3025 License as published by the Free Software Foundation; either version 2 of the
3026 License, or (at your option) any later version.
3030 This program is distributed in the hope that it will be useful, but WITHOUT
3031 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3032 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3033 details, which is available from <ulink
3034 url="http://www.gnu.org/copyleft/gpl.html">the Free Software Foundation,
3035 Inc</ulink>, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3040 <!-- ~ End section ~ -->
3043 <!-- ~~~~~ New section ~~~~~ -->
3046 <title>History</title>
3048 <application>Junkbuster</application> was originally written by Anonymous
3050 url="http://www.junkbusters.com/ht/en/ijbfaq.html">Junkbuster's
3051 Corporation</ulink>, and was released as free open-source software under the
3052 GNU GPL. <ulink url="http://www.waldherr.org/junkbuster/">Stefan
3053 Waldherr</ulink> made many improvements, and started the <ulink
3054 url="http://sourceforge.net/projects/ijbswa/">SourceForge project</ulink> to
3055 rekindle development. There are now several active developers contributing.
3056 The last stable release was v2.0.2, which has now grown whiskers ;-).
3063 <!-- ~~~~~ New section ~~~~~ -->
3064 <sect1 id="seealso"><title>See also</title>
3069 <ulink url="http://sourceforge.net/projects/ijbswa">http://sourceforge.net/projects/ijbswa</ulink>
3074 <ulink url="http://ijbswa.sourceforge.net/">http://ijbswa.sourceforge.net/</ulink>
3079 <ulink url="http://i.j.b/">http://i.j.b/</ulink>
3084 <ulink url="http://www.junkbusters.com/ht/en/cookies.html">http://www.junkbusters.com/ht/en/cookies.html</ulink>
3089 <ulink url="http://www.waldherr.org/junkbuster/">http://www.waldherr.org/junkbuster/</ulink>
3094 <ulink url="http://privacy.net/analyze/">http://privacy.net/analyze/</ulink>
3099 <ulink url="http://www.squid-cache.org/">http://www.squid-cache.org/</ulink>
3108 <!-- ~~~~~ New section ~~~~~ -->
3109 <sect1 id="appendix"><title>Appendix</title>
3112 <!-- ~~~~~ New section ~~~~~ -->
3114 <title>Regular Expressions</title>
3116 <application>Junkbuster</application> can use <quote>regular expressions</quote>
3117 in various config files. Assuming support for <quote>pcre</quote> (Perl
3118 Compatible Regular Expressions) is compiled in, which is the default. Such
3119 configuration directives do not require regular expressions, but they can be
3120 used to increase flexibility by matching a pattern with wild-cards against
3125 If you are reading this, you probably don't understand what <quote>regular
3126 expressions</quote> are, or what they can do. So this will be a very brief
3127 introduction only. A full explanation would require a book ;-)
3131 <quote>Regular expressions</quote> is a way of matching one character
3132 expression against another to see if it matches or not. One of the
3133 <quote>expressions</quote> is a literal string of readable characters
3134 (letter, numbers, etc), and the other is a complex string of literal
3135 characters combined with wild-cards, and other special characters, called
3136 meta-characters. The <quote>meta-characters</quote> have special meanings and
3137 are used to build the complex pattern to be matched against. Perl Compatible
3138 Regular Expressions is an enhanced form of the regular expression language
3139 with backward compatibility.
3143 To make a simple analogy, we do something similar when we use wild-card
3144 characters when listing files with the <command>dir</command> command in DOS.
3145 <literal>*.*</literal> matches all filenames. The <quote>special</quote>
3146 character here is the asterisk which matches any and all characters. We can be
3147 more specific and use <literal>?</literal> to match just individual
3148 characters. So <quote>dir file?.text</quote> would match
3149 <quote>file1.txt</quote>, <quote>file2.txt</quote>, etc. We are pattern
3150 matching, using a similar technique to <quote>regular expressions</quote>!
3154 Regular expressions do essentially the same thing, but are much, much more
3155 powerful. There are many more <quote>special characters</quote> and ways of
3156 building complex patterns however. Let's look at a few of the common ones,
3157 and then some examples:
3162 <emphasis>.</emphasis> - Matches any single character, e.g. <quote>a</quote>,
3163 <quote>A</quote>, <quote>4</quote>, <quote>:</quote>, or <quote>@</quote>.
3169 <emphasis>?</emphasis> - The preceding character or expression is matched ZERO or ONE
3176 <emphasis>+</emphasis> - The preceding character or expression is matched ONE or MORE
3183 <emphasis>*</emphasis> - The preceding character or expression is matched ZERO or MORE
3190 <emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
3191 the following character should be taken literally. This is used where one of the
3192 special characters (e.g. <quote>.</quote>) needs to be taken literally and
3193 not as a special meta-character.
3199 <emphasis>[]</emphasis> - Characters enclosed in brackets will be matched if
3200 any of the enclosed characters are encountered.
3206 <emphasis>()</emphasis> - parentheses are used to group a sub-expression,
3207 or multiple sub-expressions.
3213 <emphasis>|</emphasis> - The <quote>bar</quote> character works like an
3214 <quote>or</quote> conditional statement. A match is successful if the
3215 sub-expression on either side of <quote>|</quote> matches.
3221 <emphasis>s/string1/string2/g</emphasis> - This is used to rewrite strings of text.
3222 <quote>string1</quote> is replaced by <quote>string2</quote> in this
3228 These are just some of the ones you are likely to use when matching URLs with
3229 <application>Junkbuster</application>, and is a long way from a definitive
3230 list. This is enough to get us started with a few simple examples which may
3231 be more illuminating:
3235 <emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
3236 that uses the common combination of <quote>.</quote> and <quote>*</quote> to
3237 denote any character, zero or more times. In other words, any string at all.
3238 So we start with a literal forward slash, then our regular expression pattern
3239 (<quote>.*</quote>) another literal forward slash, the string
3240 <quote>banners</quote>, another forward slash, and lastly another
3241 <quote>.*</quote>. We are building
3242 a directory path here. This will match any file with the path that has a
3243 directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
3244 any characters, and this could conceivably be more forward slashes, so it
3245 might expand into a much longer looking path. For example, this could match:
3246 <quote>/eye/hate/spammers/banners/annoy_me_please.gif</quote>, or just
3247 <quote>/banners/annoying.html</quote>, or almost an infinite number of other
3248 possible combinations, just so it has <quote>banners</quote> in the path
3253 A now something a little more complex:
3257 <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
3258 We have several literal forward slashes again (<quote>/</quote>), so we are
3259 building another expression that is a file path statement. We have another
3260 <quote>.*</quote>, so we are matching against any conceivable sub-path, just so
3261 it matches our expression. The only true literal that <emphasis>must
3262 match</emphasis> our pattern is <application>adv</application>, together with
3263 the forward slashes. What comes after the <quote>adv</quote> string is the
3268 Remember the <quote>?</quote> means the preceding expression (either a
3269 literal character or anything grouped with <quote>(...)</quote> in this case)
3270 can exist or not, since this means either zero or one match. So
3271 <quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
3272 individual sub-expressions: <quote>(er)</quote>,
3273 <quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
3274 means <quote>or</quote>. We have two of those. For instance,
3275 <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
3276 <emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
3277 attempt at matching as many variations of <quote>advertisement</quote>, and
3278 similar, as possible. So this would expand to match just <quote>adv</quote>,
3279 or <quote>advert</quote>, or <quote>adverts</quote>, or
3280 <quote>advertising</quote>, or <quote>advertisement</quote>, or
3281 <quote>advertisements</quote>. You get the idea. But it would not match
3282 <quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
3283 changing our regular expression to:
3284 <quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
3289 <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
3290 another path statement with forward slashes. Anything in the square brackets
3291 <quote>[]</quote> can be matched. This is using <quote>0-9</quote> as a
3292 shorthand expression to mean any digit one through nine. It is the same as
3293 saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
3294 means one or more of the preceding expression must be included. The preceding
3295 expression here is what is in the square brackets -- in this case, any digit
3296 one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
3297 This includes a <quote>|</quote>, so this needs to match the expression on
3298 either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
3299 side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
3300 since the <quote>?</quote> means the letter <quote>e</quote> is optional and
3301 can be matched once or not at all. So we are building an expression here to
3302 match image GIF or JPEG type image file. It must include the literal
3303 string <quote>advert</quote>, then one or more digits, and a <quote>.</quote>
3304 (which is now a literal, and not a special character, since it is escaped
3305 with <quote>\</quote>), and lastly either <quote>gif</quote>, or
3306 <quote>jpeg</quote>, or <quote>jpg</quote>. Some possible matches would
3307 include: <quote>//advert1.jpg</quote>,
3308 <quote>/nasty/ads/advert1234.gif</quote>,
3309 <quote>/banners/from/hell/advert99.jpg</quote>. It would not match
3310 <quote>advert1.gif</quote> (no leading slash), or
3311 <quote>/adverts232.jpg</quote> (the expression does not include an
3312 <quote>s</quote>), or <quote>/advert1.jsp</quote> (<quote>jsp</quote> is not
3313 in the expression anywhere).
3317 <emphasis><literal>s/microsoft(?!.com)/MicroSuck/i</literal></emphasis> - This is
3318 a substitution. <quote>MicroSuck</quote> will replace any occurrence of
3319 <quote>microsoft</quote>. The <quote>i</quote> at the end of the expression
3320 means ignore case. The <quote>(?!.com)</quote> means
3321 the match should fail if <quote>microsoft</quote> is followed by
3322 <quote>.com</quote>. In other words, this acts like a <quote>NOT</quote>
3323 modifier. In case this is a hyperlink, we don't want to break it ;-).
3327 We are barely scratching the surface of regular expressions here so that you
3328 can understand the default <application>Junkbuster</application>
3329 configuration files, and maybe use this knowledge to customize your own
3330 installation. There is much, much more that can be done with regular
3331 expressions. Now that you know enough to get started, you can learn more on
3336 More reading on Perl Compatible Regular expressions:
3337 <ulink url="http://www.perldoc.com/perl5.6/pod/perlre.html">http://www.perldoc.com/perl5.6/pod/perlre.html</ulink>
3346 This program is free software; you can redistribute it
3347 and/or modify it under the terms of the GNU General
3348 Public License as published by the Free Software
3349 Foundation; either version 2 of the License, or (at
3350 your option) any later version.
3352 This program is distributed in the hope that it will
3353 be useful, but WITHOUT ANY WARRANTY; without even the
3354 implied warranty of MERCHANTABILITY or FITNESS FOR A
3355 PARTICULAR PURPOSE. See the GNU General Public
3356 License for more details.
3358 The GNU General Public License should be included with
3359 this file. If not, you can view it at
3360 http://www.gnu.org/copyleft/gpl.html
3361 or write to the Free Software Foundation, Inc., 59
3362 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3364 $Log: user-manual.sgml,v $
3365 Revision 1.34 2002/03/04 19:32:07 oes
3366 Changed default port to 8118
3368 Revision 1.33 2002/03/03 19:46:13 hal9
3369 Emphasis on where/how to report bugs, etc
3371 Revision 1.32 2002/03/03 09:26:06 joergs
3372 AmigaOS changes, config is now loaded from PROGDIR: instead of
3373 AmiTCP:db/junkbuster/ if no configuration file is specified on the
3376 Revision 1.31 2002/03/02 22:45:52 david__schmidt
3379 Revision 1.30 2002/03/02 22:00:14 hal9
3380 Updated 'New Features' list. Ran through spell-checker.
3382 Revision 1.29 2002/03/02 20:34:07 david__schmidt
3383 Update OS/2 build section
3385 Revision 1.28 2002/02/24 14:34:24 jongfoster
3386 Formatting changes. Now changing the doctype to DocBook XML 4.1
3387 will work - no other changes are needed.
3389 Revision 1.27 2002/01/11 14:14:32 hal9
3390 Added a very short section on Templates
3392 Revision 1.26 2002/01/09 20:02:50 hal9
3393 Fix bug re: auto-detect config file changes.
3395 Revision 1.25 2002/01/09 18:20:30 hal9
3396 Touch ups for *.action files.
3398 Revision 1.24 2001/12/02 01:13:42 hal9
3401 Revision 1.23 2001/12/02 00:20:41 hal9
3402 Updates for recent changes.
3404 Revision 1.22 2001/11/05 23:57:51 hal9
3405 Minor update for startup now daemon mode.
3407 Revision 1.21 2001/10/31 21:11:03 hal9
3408 Correct 2 minor errors
3410 Revision 1.18 2001/10/24 18:45:26 hal9
3411 *** empty log message ***
3413 Revision 1.17 2001/10/24 17:10:55 hal9
3414 Catching up with Jon's recent work, and a few other things.
3416 Revision 1.16 2001/10/21 17:19:21 swa
3417 wrong url in documentation
3419 Revision 1.15 2001/10/14 23:46:24 hal9
3420 Various minor changes. Fleshed out SEE ALSO section.
3422 Revision 1.13 2001/10/10 17:28:33 hal9
3425 Revision 1.12 2001/09/28 02:57:04 hal9
3428 Revision 1.11 2001/09/28 02:25:20 hal9
3431 Revision 1.9 2001/09/27 23:50:29 hal9
3432 A few changes. A short section on regular expression in appendix.
3434 Revision 1.8 2001/09/25 00:34:59 hal9
3435 Some additions, and re-arranging.
3437 Revision 1.7 2001/09/24 14:31:36 hal9
3440 Revision 1.6 2001/09/24 14:10:32 hal9
3441 Including David's OS/2 installation instructions.
3443 Revision 1.2 2001/09/13 15:27:40 swa
3446 Revision 1.1 2001/09/12 15:36:41 swa
3447 source files for junkbuster documentation
3449 Revision 1.3 2001/09/10 17:43:59 swa
3450 first proposal of a structure.
3452 Revision 1.2 2001/06/13 14:28:31 swa
3453 docs should have an author.
3455 Revision 1.1 2001/06/13 14:20:37 swa
3456 first import of project's documentation for the webserver.