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