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