80a94f13e0703764cfc9ec14eb482d27012634b7
[privoxy.git] / config
1 #  Sample Configuration file for the Internet Junkbuster 2.9.x
2
3 #
4 # $Id: config,v 1.24 2001/10/23 21:42:41 jongfoster Exp $
5 #
6
7 #  Table of Contents
8 #
9 #       1. INTRODUCTION
10 #       2. FORMAT OF THE CONFIGURATION FILE
11 #       3. OTHER CONFIGURATION FILES
12 #       4. GENERAL OPTIONS
13 #       5. WINDOWS GUI OPTIONS
14 #
15 #  1. INTRODUCTION
16 #
17 #  This file holds the Junkbuster configuration.  If you modify this
18 #  file, you will need to stop & restart Junkbuster, or use the
19 #  "Reload Config" option (Windows) before any changes take effect.
20 #
21 #  When starting Junkbuster on Unix systems, give the name of this
22 #  file as an argument.  On Windows systems, Junkbuster will look for
23 #  this file with the name 'junkbustr.txt' in the same directory where
24 #  Junkbuster is installed.
25 #
26 #  2. FORMAT OF THE CONFIGURATION FILE
27 #
28 #  Configuration lines consist of an initial keyword followed by a list
29 #  of values, all separated by whitespace (any number of spaces or
30 #  tabs).  For example,
31 #
32 #  blockfile blocklist.ini
33 #
34 #  Indicates that the blockfile is named 'blocklist.ini'.
35 #
36 #  The '#' indicates a comment.  Any part of a line following a '#' is
37 #  ignored, except if the '#' is preceded by a '\'.
38 #
39 #  Thus, by placing a # at the start of an existing configuration line,
40 #  you can make it a comment and it will be treated as if it weren't there. 
41 #  This is called "commenting out" an option and can be useful to turn
42 #  off features: If you comment out the "logfile" line, junkbuster will
43 #  not log to a file at all. Watch for the "default:" section in each 
44 #  explanation to see what happens if the option is left unset (or 
45 #  commented out). 
46 #
47 #  Long lines can be continued on the next line by using a `\' as
48 #  the last character.
49 #
50 #  3. OTHER CONFIGURATION FILES
51 #
52 #  Junkbuster uses a number of other files to tell it what ads to
53 #  block, what cookies to accept, etc.  This section of the
54 #  configuration file tells Junkbuster where to find all those other
55 #  files.
56 #
57 #  On Windows, Junkbuster looks for these files in the same
58 #  directory as the executable.  On Unix, Junkbuster looks for these
59 #  files in the current working directory.  In either case, an
60 #  absolute path name can be used to avoid problems.
61
62 #  While we go modular and multiuser, the blocker, filter, and 
63 #  per-user config will be stored in subdirectories of confdir.
64 #  Now, only confdir/templates is used for storing HTML templates
65 #  for CGI results.
66 #
67 #  No trailing /, please.
68 confdir .
69
70 #
71 #  The directory where all logging (i.e. logfile and jarfile) takes place
72 #  No trailing /, please.
73 #
74 logdir .
75
76 #  Note that all file specifications below are relative to 
77 #  the above two directories!!!
78
79 #  The actions file contains patterns to specify the
80 #  actions to apply to requests for each site.
81 #
82 #  Default: Cookies to and from all destinations are filtered.
83 #           Popups are disabled for all sites.
84 #           All sites are filtered if re_filterfile specified.
85 #           No sites are blocked.  Nothing is an image.
86 #
87 actionsfile actionsfile
88
89 #  The re_filterfile contains content modification rules.  These rules
90 #  permit powerful changes on the content of Web pages, e.g., you
91 #  could disable your favourite JavaScript annoyances, rewrite the
92 #  actual content, or just have some fun replacing "Microsoft"
93 #  with "Microsuck" wherever it appears on a Web page.
94 #
95 #  Default: content modification. (see '+-filter' in actionsfile)
96 #
97 re_filterfile   re_filterfile
98
99 #
100 #  The logfile is where all logging and error messages are written.
101 #  The logfile can be useful for tracking down a problem with
102 #  Junkbuster (e.g., it's not blocking an ad you think it should
103 #  block) but in most cases you probably will never look at it.
104 #
105 #  Your logfile will grow indefinitely, and you will probably want to
106 #  periodically remove it.  On Unix systems, you can do this with a
107 #  cron job (see 'man cron').
108 #
109 #  On SuSE Linux systems, you can place a line like
110 #  "/var/log/junkbuster.* +1024k 644 nobody.nogroup" in /etc/logfiles,
111 #  with the effect that cron.daily will automatically archive, gzip,
112 #  and empty the log, when it exceeds 1M size.
113 #
114 #  Default: Log to the standard error channel, not to a file
115 #
116 logfile      logfile
117
118 #
119 #  The jarfile defines where Junkbuster stores the cookies it
120 #  intercepts.  Note that if you use a jarfile, it may grow quite
121 #  large. 
122 #
123 #  Default: Don't store intercepted cookies
124 #
125 #jarfile     jarfile
126
127 #
128 #  If you specify a trustfile, Junkbuster will only allow access
129 #  to sites that are named in the trustfile. You can also mark
130 #  sites as trusted referrers, with the effect that access to
131 #  untrusted sites will be granted, if a link from a trusted
132 #  referrer was used. The link target will then be added to the
133 #  trustfile.
134 #  Note that this is a very restrictive feature that typical users
135 #  most propably want to leave disabled.
136 #
137 #  Default: Don't use the trust mechanism
138 #
139 #trustfile trust
140
141 #
142 #  If you use the trust mechanism, it is a good idea to write up
143 #  some online documentation about your blocking policy and to
144 #  specify the URL(s) here. They will appear on the page that
145 #  your users receive when they try to access untrusted content.
146 #  Use multiple times for multiple URLs.
147 #
148 #  Default: Don't display links on the "untrusted" info page.
149 #
150 trust-info-url http://www.your-site.com/why_we_block.html
151 trust-info-url http://www.your-site.com/what_we_allow.html
152
153 #  4. OPTIONS
154 #
155 #  This part of the configuration file contains options that control
156 #  how Junkbuster operates.
157 #
158
159 #  Admin-address should be set to the email address of the proxy
160 #  administrator. It is used in many of the proxy-generated pages.
161 #
162 #  Default: fill@me.in.please
163 #
164 admin-address fill@me.in.please
165
166 #
167 #  Proxy-info-url can be set to a URL that contains more info about
168 #  this junkbuster installation, it's configuration and policies.
169 #  It is used in many of the proxy-generated pages and its use is
170 #  highly recommended, since your users will want to know why certain
171 #  content is blocked or modified.
172 #
173 #  Default: Don't show a link to online documentation
174 #
175 proxy-info-url http://www.your-site.com/proxy.html
176
177 #
178 #  Listen-address specifies the address and port where Junkbuster will
179 #  listen for connections from your Web browser.  The default is to
180 #  listen on the local host on port 8000, and this is suitable for
181 #  most users.  (In your web browser, under proxy configuration, list
182 #  the proxy server as 'localhost' and the port as '8000').
183
184 #  If you already have another service running on port 8000, or if you
185 #  want to serve requests from other machines (e.g. on your local
186 #  network) as well, you will need to override the default. The syntax
187 #  is "listen-address [<ip-address>]:<port>" If you leave out the ip
188 #  adress, junkbuster will bind to all interfaces (addresses) on your
189 #  machine and may become reachable from the internet. In that case,
190 #  consider using access control lists (acl's) (see "aclfile" above).
191 #
192 #  For example, suppose you are running Junkbuster on a machine which
193 #  has the address 192.168.0.1 on your local private network
194 #  (192.168.0.0) and has another outside connection with a different
195 #  address. You want it to serve requests from inside only:
196 #
197 #     listen-address 192.168.0.1:8000
198 #
199 #  If you want it to listen on all addresses (including the outside
200 #  connection):
201 #
202 #     listen-address :8000
203 #
204 #  If you do this, consider using acls (see "aclfile" above).
205 #
206 #  Note: you will need to point your browser(s) to the address
207 #  and port that you have configured here.
208 #
209 #  Default:  listen-address    localhost:8000 
210 #            listen-address    127.0.0.1:8000
211 #
212
213
214 #
215 #  The debug option sets the level of debugging information to log in
216 #  the logfile (and to the console in the Windows version).  A debug
217 #  level of 1 is informative because it will show you each request as
218 #  it happens.  Higher levels of debug are probably only of interest
219 #  to developers.
220 #
221 #   debug         1 # GPC  = show each GET/POST/CONNECT request
222 #   debug         2 # CONN = show each connection status
223 #   debug         4 # IO   = show I/O status
224 #   debug         8 # HDR  = show header parsing
225 #   debug        16 # LOG  = log all data into the logfile
226 #   debug        32 # FRC  = debug force feature
227 #   debug        64 # REF  = debug regular expression filter 
228 #   debug       128 #      = debug fast redirects
229 #   debug       256 #      = debug GIF deanimation
230 #   debug       512 # CLF  = Common Log Format
231 #   debug     1024 #        = debug kill popups
232 #   debug      4096 # INFO = Startup banner and warnings.
233 #   debug      8192 # ERROR = Non-fatal errors
234 #
235 #  It is *highly recommended* that you enable ERROR
236 #  reporting.  (debug 8192).
237 #
238 #  The reporting of FATAL errors (i.e. ones which crash 
239 #  JunkBuster) is always on and cannot be disabled.
240 #
241 #  If you want to use CLF, you should set "debug 512" ONLY,
242 #  do not enable anything else.
243 #
244 #  Multiple "debug" directives, are OK - they're logical-OR'd
245 #  together. 
246 #
247 #   debug         15 # same as setting the first 4 listed above
248 #
249 #  Default: 0, i.e. log nothing but fatal errors
250 #
251 debug   1    # URLs
252 debug   4096 # Info
253 debug   8192 # Errors - *we highly recommended enabling this*
254
255 #
256 #  Junkbuster normally uses "multi-threading", a software technique
257 #  that permits it to handle many different requests simultaneously.
258 #  In some cases you may wish to disable this -- particularly if
259 #  you're trying to debug a problem.  The 'single-threaded' option
260 #  forces Junkbuster to handle requests sequentially.
261 #
262 #  Default: Multithreaded mode
263 #
264 #single-threaded
265
266 #
267 #    'toggle' allows you to temporarily disable all Junkbuster's 
268 #    filtering.  Just set "toggle 0".
269 #    
270 #    The Windows version of Junkbuster puts an icon in the system
271 #    tray, which allows you to change this option without having
272 #    to edit this file.  If you right-click on that icon (or select
273 #    the 'Options' menu), one choice is "Enable".  Clicking on enable
274 #    toggles Junkbuster on and off.  This is useful if you want to
275 #    temporarily disable Junkbuster, e.g., to access a site that
276 #    requires cookies which you normally have blocked.
277 #
278 #    'toggle 1' means Junkbuster runs normally, 'toggle 0' means
279 #    that Junkbuster becomes a non-anonymizing non-blocking
280 #    proxy.
281 #
282 #  Default: 1
283 #
284 toggle 1
285
286 #
287 #  For content filtering, i.e. the +filter and +deanimate-gif
288 #  actions, it is neccessary that Junkbuster buffers up the
289 #  whole document body. This can be potentially dangerous, since
290 #  a server could just keep sending data indefinitely and wait
291 #  for your RAM to exhaust.
292 #  The buffer-limit option lets you set the size in Kbytes that
293 #  each buffer may use at maximum. When the documents buffer
294 #  exceeds that size, it is flushed to the client unfiltered and 
295 #  no further attempt to filter the rest of it is taken.
296 #  Remember that there may multiple threads running, which might
297 #  require up to buffer-limit Kbytes *each*, unless you have set
298 #  single-threaded below.
299 #
300 #  Default: 4069, i.e. 4 MB
301 #
302 buffer-limit 4069
303
304
305 #
306 #  Enable the web-based actionsfile editor.  Set to 1 to enable,
307 #  0 to disable.  Note that you must have compiled JunkBuster
308 #  with support for this feature, otherwise this option has no
309 #  effect.
310 #
311 #  Security note:  If this is enabled, anyone who can use the proxy
312 #  can edit the actions file, and their changes will affect all users.
313 #  For shared proxies, you probably want to disable this.
314 #
315 #  Default: Disabled
316 #
317 enable-edit-actions 1
318
319
320 #
321 #  Allow JunkBuster to be toggled on and off remotely, using your
322 #  web browser.  Set to 1 to enable, 0 to disable.  Note that you
323 #  must have compiled JunkBuster with support for this feature,
324 #  otherwise this option has no effect.
325 #
326 #  Security note:  If this is enabled, anyone who can use the proxy
327 #  can toggle it on or off, and their changes will affect all users.
328 #  For shared proxies, you probably want to disable this.
329 #
330 #  Default: Disabled
331 #
332 enable-remote-toggle 1
333
334 #############################################################################
335 # Access Control List
336 #############################################################################
337 #
338 # Access controls are included at the request of some ISPs and systems
339 # administrators, and are not usually needed by individual users.
340 # Please note the warnings in the FAQ that this proxy is not
341 # intended to be a substitute for a firewall or to encourage anyone
342 # to defer addressing basic security weaknesses.
343 # For details see the documentation
344 #
345 # If no access settings are specified, the proxy talks to anyone that
346 # connects.  If any access settings file are specified, then the proxy
347 # talks only to IP addresses permitted somewhere in this file and not
348 # denied later in this file.
349 #
350 # Summary -- if using an ACL:
351 #
352 #  Client must have permission to receive service
353 #  LAST match in ACL wins
354 #  Default behavior is to deny service
355 #
356 # Syntax for an entry in the Access Control List is:
357 #
358 # ACTION    SRC_ADDR[/SRC_MASKLEN]    [ DST_ADDR[/DST_MASKLEN] ]
359 #
360 # where the fields are
361 #
362 # ACTION      = "permit-access" | "deny-access"
363 #
364 # SRC_ADDR    = client hostname or dotted IP address
365 # SRC_MASKLEN = number of bits in the subnet mask for the source
366 #
367 # DST_ADDR    = server or forwarder hostname or dotted IP address
368 # DST_MASKLEN = number of bits in the subnet mask for the target
369 #
370 # field separator (FS) is whitespace (space or tab)
371 #
372 # IMPORTANT NOTE
373 # ==============
374 # If the junkbuster is using a forwarder or a gateway for a particular 
375 # destination URL, the DST_ADDRR that is examined is the address of
376 # the forwarder or the gateway and NOT the address of the ultimate target.
377 # This is necessary because it may be impossible for the local
378 # junkbuster to determine the address of the ultimate target
379 # (that's often what gateways are used for).
380 #
381 # Here are a few examples to show how the ACL works:
382 #
383 # localhost is OK --  no DST_ADDR implies that ALL destination addresses are OK
384 # permit-access localhost
385 #
386 # a silly example to illustrate:
387 #
388 # permit any host on the class-C subnet with junkbusters to go anywhere
389 #
390 # permit-access www.junkbusters.com/24
391 #
392 # except deny one particular IP address from using it at all
393 #
394 # deny-access      ident.junkbusters.com
395 #
396 # another example
397 #
398 # You can specify an explicit network address and subnet mask.
399 # Explicit addresses do not have to be resolved to be used.
400 #
401 # permit-access 207.153.200.0/24
402 #
403 # a subnet mask of 0 matches anything, so the next line permits everyone.
404 #
405 # permit-access 0.0.0.0/0
406 #
407 # Note:  you cannot say
408 #
409 # permit-access .org
410 #
411 # to allow all .org domains; every IP-address listed must resolve fully.
412 #
413 # An ISP may want to provide a junkbuster that is accessible by "the world"
414 # and yet restrict use of some of their private content to hosts on its
415 # internal network (i.e. its own subscribers).  Say, for instance the
416 # ISP owns the Class-B IP address block 123.124.0.0 (a 16 bit netmask).
417 # This is how they could do it:
418 #
419 # permit-access 0.0.0.0/0   0.0.0.0/0   # other clients can go anywhere 
420 #                                       # with the following exceptions:
421 #
422 # deny-access   0.0.0.0/0   123.124.0.0/16 # block all external requests for
423 #                                          # sites on the ISP's network
424 #
425 # permit 0.0.0.0/0   www.my_isp.com # except for the ISP's main web site
426 #
427 # permit 123.124.0.0/16 0.0.0.0/0   # the ISP's clients can go anywhere
428 #
429 # Note that some hostnames may be listed with multiple IP addresses;
430 # the primary value returned by gethostbyname() is used.
431 #
432 # Default: Anyone can access the proxy.
433
434
435 #############################################################################
436 # Forwarding
437 #############################################################################
438 #
439 #
440 # This feature allows routing of HTTP requests via multiple proxies.
441 # It can be used to better protect privacy and confidentiality when
442 # accessing specific domains by routing requests to those domains
443 # to a special purpose filtering proxy such as lpwa.com
444 #
445 # It can also be used in an environment with multiple networks to route
446 # requests via multiple gateways allowing transparent access to multiple
447 # networks without having to modify browser configurations.
448 #
449 # Also specified here are SOCKS proxies.  We support SOCKS 4 and SOCKS 4A.
450 # The difference is that SOCKS 4A will resolve the target hostname using
451 # DNS on the SOCKS server, not our local DNS client.
452 #
453 # The syntax of each line is
454 #
455 # forward target_domain[:port] http_proxy_host[:port]
456 # forward-socks4  target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]
457 # forward-socks4a target_domain[:port] socks_proxy_host[:port] http_proxy_host[:port]
458 #
459 # If http_proxy_host is ".", then requests are not forwarded to
460 # a HTTP proxy but are made directly to the web servers.
461 #
462 # Lines are checked in turn, and the last match wins.
463 #
464 # There is an implicit line equivalent to the following, which specifies that
465 # anything not finding a match on the list is to go out without forwarding
466 # or gateway protocol; like so:
467 #    forward .*   .  # implicit
468 #
469 # In the following common configuration, everything goes to Lucent's LPWA,
470 # except SSL on port 443 (which it doesn't handle)
471 #    forward .*    lpwa.com:8000
472 #    forward :443 .
473 #
474 # See the FAQ for instructions on how to automate the login procedure for LPWA.
475 # Some users have reported difficulties related to LPWA's use of . as the
476 # last element of the domain, and have said that this can be fixed with this:
477 #    forward lpwa.  lpwa.com:8000
478 # (NOTE: the syntax for specifiying target_domain has changed since the
479 # previous paragraph weas written - it will not work now.  More information
480 # is welcome.)
481 #
482 # In this fictitious example, everything goes via an ISP's caching proxy,
483 # except requests to that ISP:
484 #
485 # forward .* caching.myisp.net:8000
486 # forward myisp.net .
487 #
488 # For the @home network, we're told the forwarding configuration is this:
489 # forward .* proxy:8080
490 # Also, we're told they insist on getting cookies and Javascript, so you need
491 # to add home.com to the cookie file. We consider Javascript a security risk;
492 # see our page on cookies. Java need not be enabled.
493 #
494 # In this example direct connections are made to all "internal" domains,
495 # but everything else goes through Lucent's LPWA by way of the company's
496 # SOCKS gateway to the Internet.
497 #
498 # forward_socks4 .* lpwa.com:8000 firewall.my_company.com:1080
499 # forward my_company.com .
500 #
501 # This is how you could set up a site that always uses SOCKS but no forwarders
502 #
503 # forward_socks4a .* . firewall.my_company.com:1080
504 #
505 # An advanced example for network administrators:
506 #
507 # If you have links to multiple ISPs that provide various special content to
508 # their subscribers, you can configure forwarding to pass requests to the
509 # specific host that's connected to that ISP so that everybody can see all
510 # of the content on all of the ISPs.
511 #
512 # This is tricky, but here's a sample:
513
514 # host-a has a PPP connection to isp-a.com
515 # host-b has a PPP connection to isp-b.com
516 #
517 # host-a can run an Internet Junkbuster proxy with forwarding like this:
518 #   forward .* .
519 #   forward isp-b.com host-b:8000
520 #
521 # host-b can run an Internet Junkbuster proxy with forwarding like this:
522 #   forward .* .
523 #   forward isp-a.com host-a:8000
524 #
525 # Now, *anyone* on the Internet (including users on host-a and host-b)
526 # can set their browser's proxy to *either* host-a or host-b and
527 # be able to browse the content on isp-a or isp-b.
528 #
529 #
530 # Here's another practical example, for University of Kent at
531 # Canterbury students with a network connection in their room, who
532 # need to use the University's Squid web cache.
533 #
534 #   forward *. ssbcache.ukc.ac.uk:3128 # Use the proxy, except for:
535 #   forward .ukc.ac.uk            . # Anything on the same domain as us
536 #   forward *                     . # Host with no domain specified
537 #   forward 129.12.*.*            . # A dotted IP on our /16 network.
538 #   forward 127.*.*.*             . # Loopback address
539 #   forward localhost.localdomain . # Loopback address
540 #   forward www.ukc.mirror.ac.uk  . # Specific host
541 #
542 #
543 # Note: If you intend to chain junkbuster and squid locally, the chain
544 #       broswer -> squid -> junkbuster is the recommended way.
545 #
546 #       Your squid configuration could then look like this:
547 #
548 #       # Define junkbuster as parent cache 
549 #       cache_peer 127.0.0.1 8000 parent 0 no-query 
550 #
551 #       # Define ACL for protocol FTP 
552 #       acl FTP proto FTP 
553 #
554 #       # Do not forward ACL FTP to junkbuster 
555 #       always_direct allow FTP 
556 #
557 #       # Do not forward ACL CONNECT (https) to junkbuster 
558 #       always_direct allow CONNECT 
559 #
560 #       # Forward the rest to junkbuster 
561 #       never_direct allow all 
562 #
563
564 #############################################################################
565 #  5. WINDOWS GUI OPTIONS
566 #############################################################################
567 #
568 #  Junkbuster has a number of options specific to the Windows GUI
569 #  interface:
570 #
571 #    activity-animation      {1 or 0}
572 #
573 #    If set to 1, the Junkbuster icon will animate when Junkbuster is
574 #    active.
575 #
576 #Win32-only: activity-animation      1
577
578 #    log-messages            {1 or 0}
579 #
580 #    If set to 1, Junkbuster will log messages to the console window.
581 #
582 #Win32-only: log-messages            1
583
584 #    log-buffer-size         {1 or 0}?
585 #
586 #    If log-buffer-size is set to 1, the size of the log buffer, that
587 #    is the amount of memory used for the log messages displayed in
588 #    the console window, will be limited to 'log-max-lines' (see below).
589 #
590 #    Warning: Setting this to 0 will result in the buffer to grow
591 #             infinitely and eat up all your memory!
592 #
593 #Win32-only: log-buffer-size   1
594
595 #    log-max-lines   {number of lines, e.g., '200'}
596 #
597 #    Maximum number of lines held in the log buffer. See above.
598 #
599 #Win32-only: log-max-lines   200
600
601 #    log-highlight-messages  {1 or 0}
602 #
603 #    If set to 1, Junkbuster will highlight portions of the log
604 #    messages with a bold-faced font.
605 #
606 #Win32-only: log-highlight-messages  1
607
608 #    log-font-name           {font name, e.g., 'Comic Sans MS'}
609 #
610 #    The font used in the console window.
611 #
612 #Win32-only: log-font-name           Comic Sans MS
613
614 #    log-font-size           {font size in points, e.g., '8'}
615 #
616 #    Font size used in the console window.
617 #
618 #Win32-only: log-font-size           8
619
620 #    show-on-task-bar        {1 or 0}
621 #
622 #    Controls whether or not Junkbuster will appear as a button on the Task
623 #    bar when minimized.
624 #
625 #Win32-only: show-on-task-bar        0
626
627
628 #    close-button-minimizes  1
629 #
630 #    If set, the Windows close button will minimize Junkbuster instead
631 #    of closing the program (close with the exit option on the File
632 #    menu).
633 #
634 #Win32-only: close-button-minimizes  1
635
636
637 #
638 #  This option is specific to the Win32 console version of JunkBuster:
639 #
640 #    hide-console
641 #
642 #    If this option is used, Junkbuster will disconnect from and hide 
643 #    the command console.
644 #
645 #Win32-only: #hide-console
646
647
648 # Note: Junkbuster is distributed under the GNU General Public License (GPL)
649 #       For details, see http://www.gnu.org/copyleft/gpl.html