fbc5321fb302989dc07ba1874c5fad89cfbd7a1f
[privoxy.git] / config
1 #  Sample Configuration file for the Internet Junkbuster 2.0
2
3 #
4 # $Id: config,v 1.2 2001/04/30 03:05:11 rodney 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. 
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 at all. Watch for the "default:" section in each explanation
44 #  to see what happens if the option is left unset (or commented out). 
45 #  
46
47 #
48 #  3. OTHER CONFIGURATION FILES
49 #
50 #  Junkbuster uses a number of other files to tell it what ads to
51 #  block, what cookies to accept, etc.  This section of the
52 #  configuration file tells Junkbuster where to find all those other
53 #  files.
54 #
55 #  On Windows, Junkbuster looks for these files in the same
56 #  directory as the executable.  On Unix, Junkbuster looks for these
57 #  files in the current working directory.  In either case, an
58 #  absolute path name can be used to avoid problems.
59
60 #
61 #  The blockfile contains regular expressions, one per line, of URLs
62 #  to be blocked by Junkbuster.
63 #
64 #  Default: Don't block anything.
65 #
66 blockfile       ./blocklist
67
68 #
69 #  The imagefile contains regular expressions, one per line, of URLs
70 #  to be blocked as images by Junkbuster, regardless of whether they
71 #  look like image URLs or not.
72 #
73 #  Default: Block all URLs as HTML requests.
74 #
75 imagefile       ./imagelist 
76
77 #
78 #  The popfile contains regular expressions, one per line, of sites
79 #  where Junkbuster should disable Javascript popups.
80 #
81 #  Default: No popup filtering.
82 #
83 popupfile       ./popup
84
85 #
86 #  The re_filterfile contains content modification rules.  These rules
87 #  permit powerful changes on the content of Web pages, e.g., you
88 #  could disable your favourite JavaScript annoyances, rewrite the
89 #  actual content, or just have some fun replacing "Microsoft"
90 #  with "Microsuck" wherever it appears on a Web page.
91 #
92 #  Default: No content modification.
93 #
94 re_filterfile   ./re_filterfile
95
96 #
97 #  The cookiefile defines how Junkbuster should treat cookies: filter
98 #  them out; permit them; permit them only one-way from your browser
99 #  to the site, etc.  You can set this on a site-by-site basis, so
100 #  that you can, for example, use cookies at sites you trust while
101 #  filtering them out everywhere else.
102 #
103 #  Default: Cookies to and from all destinations are filtered.
104 #
105 cookiefile      ./cookiefile
106
107 #
108 #  The logfile is where all logging and error messages are written.
109 #  The logfile can be useful for tracking down a problem with
110 #  Junkbuster (e.g., it's not blocking an ad you think it should
111 #  block) but in most cases you probably will never look at it.
112 #
113 #  If you do not use 'log-buffer-size'/'log-max-lines' (see below)
114 #  your logfile will grow indefinitely, and you will probably want to
115 #  periodically remove it.  On Unix systems, you can do this with a
116 #  cron job (see 'man cron').
117 #
118 #  On SuSE Linux systems, you can place a line like
119 #  "/var/log/junkbuster.* +1024k 644 nobody.nogroup" in /etc/logfiles,
120 #  with the effect that cron.daily will automatically archive, gzip,
121 #  and empty the log, when it exceeds 1M size.
122 #
123 #  Default: Log to the standard error channel, not to a file
124 #
125 logfile         ./junkbuster.log
126
127 #
128 #  The jarfile defines where Junkbuster stores the cookies it
129 #  intercepts.  Note that if you use a jarfile, it may grow quite
130 #  large. 
131 #
132 #  Default: Don't store intercepted cookies
133 #
134 #jarfile        ./jarfile       
135
136 #
137 #  The forwardfile defines domain-specific forwarding of HTTP
138 #  requests.  In some cases, you may want Junkbuster to forward your
139 #  request to another proxy instead of trying to fetch the request
140 #  itself.  In those cases, you can use the forwardfile to indicate
141 #  which requests should be forwarded and to where.
142 #
143 #  Default: Make all connections directly.
144 #
145 forwardfile     ./forward
146
147 #
148 #  Generally, Junkbuster is used as a personal proxy.  The default
149 #  behaviour of Junkbuster is to listen on port 8000 on the "loopback"
150 #  interface, so that it will only listen to local requests from the
151 #  same machine.  Using 'listen-address' (see below) you can serve
152 #  requests from other machines as well.
153 #
154 #  In that case, it is a wise thing to define access control lists
155 #  (acls), which state who can connect to your proxy and what service
156 #  they will be given. Note that setting the listen-address to an IP
157 #  address that is only internally reachable from your local network
158 #  might already do the trick.
159 #
160 #  Default: No access control. Everybody that can reach junkbuster
161 #           will be served.
162 #
163 #aclfile        ./aclfile
164
165 #
166 #  4. OPTIONS
167 #
168 #  This part of the configuration file contains options that control
169 #  how Junkbuster operates.
170 #
171
172 #
173 #  If 're_filter_all' is set, (commented in) Junkbuster will attempt
174 #  content modification (see 're_filterfile' above) on all requests.
175 #
176 #  Default: Content modification takes only place if no cookie would
177 #           be sent to the server.
178 #
179 #re_filter_all
180
181 #
182 #  If 'add-forwarded-header' is set, an "X-Forwarded-For:"
183 #  specification will be added to each request header.  Generally,
184 #  this is not needed and will reduce your privacy, as the server
185 #  will not only see which proxy the request came through, but also
186 #  which machine behind that proxy the request originally came from.
187 #
188 #  Default: Don't add the "X-Forwarded-For:" header.
189 #
190 #add-forwarded-header
191
192 #
193 #  Junkbuster can add "wafers", i.e. fake cookies, to each request
194 #  header it sends out.
195 #  These wafers can be seen by Web site operators in their log files,
196 #  so it's a way for you to communicate (very indirectly!) with
197 #  them. Junkbuster will add as many wafers as you like to each
198 #  request, just list them all here.  Here's an example:
199 #
200 #     wafer    NOTE=Like most people, I want my browsing to be anonymous.
201 #     wafer    WARNING=Please do not attempt to track me.
202 #
203 #  Wafers make each request larger and will have a (small) impact on
204 #  your browsing speed, so you probably don't want to do this unless
205 #  you have a particular need.
206 #
207 #  Default: Don't add a wafer
208 #
209 #wafer NOTE=Add your wafer here...
210
211 #
212 # There's also a pre-defined wafer containing a privacy message,
213 # called the vanilla wafer, which is sent by default. Setting
214 # suppress-vanilla-wafer suppresses this. You guessed that, didn't you?
215 #
216 # Default: Send the vanilla wafer
217 #
218 suppress-vanilla-wafer
219
220 #
221 #  In fact, Junkbuster can add anything at all to the request headers.
222 #  You can specify the headers to add with the add-header option.  For
223 #  example: 
224 #
225 #     add-header  Forwarded: by http://stay-out-of-my-backyard.net
226 #
227 #  Generally, random headers will simply be ignored by the Web site,
228 #  so there's little use in adding them.  However, there are some
229 #  cases where you might want to add a header, e.g., if you're
230 #  forwarding Junkbuster requests to another proxy you might want to
231 #  add:
232 #
233 #     add-header    Proxy-Connection: Keep-Alive
234
235 #  to every request.
236 #
237 #add-header My-Header: Whatever you'd like...
238
239 #
240 #  Listen-address specifies the address and port where Junkbuster will
241 #  listen for connections from your Web browser.  The default is to
242 #  listen on the local host on port 8000, and this is suitable for
243 #  most users.  (In your web browser, under proxy configuration, list
244 #  the proxy server as 'localhost' and the port as '8000').
245
246 #  If you already have another service running on port 8000, or if you
247 #  want to serve requests from other machines (e.g. on your local
248 #  network) as well, you will need to override the default. The syntax
249 #  is "listen-address [<ip-address>]:<port>" If you leave out the ip
250 #  adress, junkbuster will bind to all interfaces (addresses) on your
251 #  machine and may become reachable from the internet. In that case,
252 #  consider using access control lists (acl's) (see "aclfile" above).
253 #
254 #  For example, suppose you are running Junkbuster on a machine which
255 #  has the address 192.168.0.1 on your local private network
256 #  (192.168.0.0) and has another outside connection with a different
257 #  address. You want it to serve requests from inside only:
258 #
259 #     listen-address 192.168.0.1:8000
260 #
261 #  If you want it to listen on all addresses (including the outside
262 #  connection):
263 #
264 #     listen-address :8000
265 #
266 #  If you do this, consider using acls (see "aclfile" above).
267 #
268 #  Note: you will need to point your browser(s) to the address
269 #  and port that you have configured here.
270 #
271 #  Default:  listen-address    localhost:8000 
272 #            listen-address    127.0.0.1:8000
273 #
274
275 #
276 #  When your Web browser makes a request from a Web site, it informs
277 #  the Web site what sort of browser it is, e.g., "Internet Explorer
278 #  V2.0" or some such.  In theory, Web sites can use this information
279 #  to tailor themselves for your browser.
280 #
281 #  The 'user-agent' option controls whether Junkbuster will conceal
282 #  your browser type or not.  If user-agent is set to . (period) the
283 #  User-Agent header is passed to the server unchanged, along with any
284 #  UA headers produced by MS-IE (which would otherwise be deleted). If
285 #  user-agent is set to @ (at) these headers are sent unchanged in
286 #  cases where the cookiefile specifies that a cookie would be sent,
287 #  otherwise only a default User-Agent header is sent. That default is
288 #  Mozilla/3.0 (Netscape) with an unremarkable Linux configuration. 
289 #  If left unset, the default header is always sent.
290 #
291 #  Note that if you choose to mislead Web sites about your browser
292 #  type, you may get Web pages that confuse your browser or display
293 #  incorrectly.  In most cases, it's probably fine to send your real
294 #  browser type.
295 #
296 #  Default: Always send the (forged) default user agent header
297 #
298 user-agent    .
299
300 #
301 #  When your Web browser requests a page from a Web site, it also
302 #  informs the Web site where it came from, i.e., when you click
303 #  through to a new web page, your browser tells the new web site the
304 #  URL of the old web page.  This is called the "Referer" header.
305 #
306 #  Junkbuster has the ability to mask the Referer header.  Referer
307 #  headers can be used to track users as they browse around the web,
308 #  and many consider them invasive.  Junkbuster provides several
309 #  options for dealing with referer headers:
310 #
311 #       VALUE       EFFECT
312 #       =====       ======
313 #       default     Kill the referrer-header from the client.
314 #       .           Pass the referrer unchanged.
315 #       @           Pass the referrer if the server is in the cookie file,
316 #                   kill the referrer otherwise.
317 #       L           Pass the referrer if the server is in the cookie file,
318 #                   send a forged referrer that points to the
319 #                   root-directory URL of the current request otherwise.
320 #       'text'      Always send <text> as the referrer.
321 #
322 #  L is probably preferable to @, because it will break fewer Web
323 #  sites while still concealing your browsing path.
324 #
325 #  Default: see above
326 #
327 referer         L
328
329 #
330 #  Some browsers provide a "From:" header that gives Web sites your
331 #  email address.  The only real effect of this is to make you a
332 #  target for unsolicited email (spam).  There are three options
333 #  what to do with the "From:" header if it is present:
334
335 #       VALUE       EFFECT
336 #       =====       ======
337 #       default     Kill every "From:" header
338 #       .           Pass the "From:" header unchanged
339 #       'text'      replace the email address in the "From:" header with 'text'
340 #
341 #  Default: see above
342 #
343 from            spam-me-senseless@sittingduck.xqq
344
345 #
346 #  The 'tinygif' option lets you change how Junkbuster treats blocked
347 #  images.  The default behavior is to send an HTML answer to requests
348 #  for images, resulting in a "broken image icon" in place of the blocked
349 #  image.  That's a little ugly, so several other options are available:
350 #
351 #     VALUE       EFFECT
352 #     =====       ======
353 #       0         Send HTML
354 #       1         Send a GIF of one transparent pixel
355 #       2         Send a GIF with the word "JUNKBUSTER"
356 #       3 <url>   Send a redirect to the image indicated by the <url>
357 #
358 #  As an example of the last option:
359 #
360 #    tinygif 3 http://www.junkbusters.com/images/fb.gif
361 #
362 #  Will replace every blocked image with the "fb.gif" image.
363 #
364 #  There is one non-obvious benefit to using option "3".  If you use
365 #  option 3, your Web browser will likely cache the image you specify
366 #  on your local machine.  That means that after the first use, that
367 #  image will load very quickly (and won't require a request to the
368 #  junkbuster proxy)
369 #
370 #  Default: 0, i.e. send HTML
371 #
372 tinygif         2
373
374 #
375 #  The debug option sets the level of debugging information to log in
376 #  the logfile (and to the console in the Windows version).  A debug
377 #  level of 1 is informative because it will show you each request as
378 #  it happens.  Higher levels of debug are probably only of interest
379 #  to developers.
380 #
381 #   debug         1 # GPC  = show each GET/POST/CONNECT request
382 #   debug         2 # CONN = show each connection status
383 #   debug         4 # IO   = show I/O status
384 #   debug         8 # HDR  = show header parsing
385 #   debug        16 # LOG  = log all data into the logfile
386 #   debug        32 # FRC  = debug force feature
387 #   debug        64 # REF  = debug regular expression filter 
388 #
389 #  Multiple "debug" directives, are OK - they're logical-OR'd
390 #  together. 
391 #
392 #   debug         15 # same as setting the first 4 listed above
393 #
394 #  Default: 0, i.e. log nothing but errors and infos
395 #
396 debug             1
397
398 #
399 #  Junkbuster normally uses "multi-threading", a software technique
400 #  that permits it to handle many different requests simultaneously.
401 #  In some cases you may wish to disable this -- particularly if
402 #  you're trying to debug a problem.  The 'single-threaded' option
403 #  forces Junkbuster to handle requests sequentially.
404 #
405 #  Default: Multithreaded mode
406 #
407 #single-threaded
408
409 #
410 #    'toggle' controls whether Junkbuster can temporarily be toggled on
411 #    and off.
412 #    
413 #    The Windows version of Junkbuster puts an icon in the system
414 #    tray.  If you right-click on that icon (or select the 'Options'
415 #    menu), one choice is "Enable".  Clicking on enable toggles
416 #    Junkbuster on and off.  This is useful if you want to temporarily
417 #    disable Junkbuster, e.g., to access a site that requires cookies
418 #    which you normally have blocked.
419 #
420 #    Unix versions of Junkbuster are toggled on and off by sending a
421 #    SIGHUP to Junkbuster.
422 #
423 #    'toggle 1' means permit toggling of Junkbuster, 'toggle 0' means
424 #    don't.
425 #
426 #  Default: 1
427 #
428 toggle 1
429
430 #
431 #  5. WINDOWS GUI OTPIONS
432 #
433 #  Junkbuster has a number of options specific to the Windows GUI
434 #  interface:
435 #
436 #    activity-animation      {1 or 0}
437 #
438 #    If set to 1, the Junkbuster icon will animate when Junkbuster is
439 #    active.
440 #
441 #Win32-only: activity-animation      1
442
443 #    log-messages            {1 or 0}
444 #
445 #    If set to 1, Junkbuster will log messages to the console window.
446 #
447 #Win32-only: log-messages            1
448
449 #    log-buffer-size         {1 or 0}?
450 #
451 #    If log-buffer-size is set to 1, the size of the log buffer, that
452 #    is the amount of memory used for the log messages displayed in
453 #    the console window, will be limited to 'log-max-lines' (see below).
454 #
455 #    Warning: Setting this to 0 will result in the buffer to grow
456 #             infinitely and eat up all your memory!
457 #
458 #Win32-only: log-buffer-size            1
459
460 #    log-max-lines      {number of lines, e.g., '200'}
461 #
462 #    Maximum number of lines held in the log buffer. See above.
463 #
464 #Win32-only: log-max-lines              200
465
466 #    log-highlight-messages  {1 or 0}
467 #
468 #    If set to 1, Junkbuster will highlight portions of the log
469 #    messages with a bold-faced font.
470 #
471 #Win32-only: log-highlight-messages  1
472
473 #    log-font-name           {font name, e.g., 'Comic Sans MS'}
474 #
475 #    The font used in the console window.
476 #
477 #Win32-only: log-font-name           Comic Sans MS
478
479 #    log-font-size           {font size in points, e.g., '8'}
480 #
481 #    Font size used in the console window.
482 #
483 #Win32-only: log-font-size           8
484
485 #    show-on-task-bar        {1 or 0}
486 #
487 #    Controls whether or not Junkbuster will appear on the Task bar
488 #    when minimized.
489 #
490 #Win32-only: show-on-task-bar        0
491
492
493 #    close-button-minimizes  1
494 #
495 #    If set, the Windows close button will minimize Junkbuster instead
496 #    of closing the program (close with the exit option on the File
497 #    menu).
498 #
499 #Win32-only: close-button-minimizes  1
500
501 #    hide-console
502 #
503 #    If this option is used, Junkbuster will disconnect from and hide 
504 #    the command console.
505 #
506 #Win32-only: #hide-console
507
508 # Note: Junkbuster is distributed under the GNU General Public License (GPL)
509 #       For details, see http://www.gnu.org/copyleft/gpl.html