Sync actions list with default.action.master, +minor_changes.
[privoxy.git] / doc / source / privoxy-man-page.sgml
1 <!--
2  File        :  $Source: /cvsroot/ijbswa/current/doc/source/privoxy-man-page.sgml,v $
3
4  Purpose     :  Manual Page
5                 This file belongs into
6                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
7                 
8  $Id: privoxy-man-page.sgml,v 2.6 2006/08/26 02:37:27 hal9 Exp $
9
10  Copyright (C) 2001-2006 Privoxy Developers <developers@privoxy.org>
11  See LICENSE.
12
13  ========================================================================
14  NOTE: Please read developer-manual/documentation.html before touching 
15  anything in this, or other Privoxy documentation. 
16  ========================================================================
17
18  Doc NOTES: This is some tricky markup! There are some quirks
19  to how this markup is handled. It is not always so co-operative.
20  Please don't change the markup unless you can verify the changes 
21  will improve finished output! 
22  
23  literallayout tags are particularly sensitive to where they are placed.
24  The 'replaceable' and 'command' tags are used here somewhat unconventionally,
25  since it seems to generate the proper formatting (at least for me :).
26
27  Create man page: 'make man'
28
29  Requires docbook2man (short perl script), see CVS
30  http://sources.redhat.com/docbook-tools/. Also requires openjade and SGMLSpm
31  perl module. 
32  
33  For man page references, see:
34  http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/using.html
35  http://docbook.org/tdg/en/html/ch02.html#making-refentry
36
37 -->
38 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[
39 <!entity % dummy "IGNORE"> 
40 <!entity p-intro SYSTEM "privoxy.sgml">
41 <!entity seealso SYSTEM "seealso.sgml">
42 <!entity copyright SYSTEM "copyright.sgml">
43 <!entity license SYSTEM "license.sgml">
44 <!entity authors SYSTEM "p-authors.sgml">
45 <!entity p-version "3.0.4">
46 <!entity p-status "beta">
47 <!entity % p-not-stable "INCLUDE">
48 <!entity % p-stable "IGNORE">
49 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
50 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
51 <!entity my-copy "(C)">               <!-- db2man barfs on copyright symbol  -->
52 ]>
53
54 <refentry id="privoxy">
55 <refentryinfo>
56  <date>2006-08-24</date>
57 </refentryinfo>
58 <refmeta>
59  <refentrytitle>privoxy</refentrytitle> 
60  <manvolnum>1</manvolnum>
61  <refmiscinfo>
62   Privoxy &p-version;<![%p-not-stable;[ &p-status;]]>
63  </refmiscinfo>
64 </refmeta>
65
66 <refnamediv>
67  <refname><application>privoxy</application></refname>
68  <refpurpose>Privacy Enhancing Proxy</refpurpose>
69 </refnamediv>
70
71 <refsynopsisdiv>
72  <cmdsynopsis> 
73   <command>privoxy</command>
74   <arg><option>--help</option></arg>
75   <arg><option>--version</option></arg>
76   <arg><option>--no-daemon</option></arg>
77   <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>  
78   <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg> 
79   <arg><option>--chroot</option></arg>
80   <arg><replaceable class="parameter">configfile</replaceable></arg>        
81   <command>&nbsp;(UNIX)</command>
82  </cmdsynopsis>
83
84  <cmdsynopsis> 
85   <command>privoxy.exe</command>              
86   <arg><replaceable class="parameter">configfile</replaceable></arg>
87   <command>&nbsp;(Windows)</command>
88  </cmdsynopsis>                                      
89 </refsynopsisdiv>
90
91
92 <!--   ~~~~~       New section      ~~~~~     -->
93 <refsect1><title>Options</title>
94  <para>
95   <command>Privoxy</command> may be invoked with the following command line
96   options:
97  </para>
98
99  <variablelist>                                          
100   <varlistentry>
101     <term>--help</term>
102       <listitem>
103        <para>
104          Print brief usage info and exit.
105         </para>
106       </listitem>
107   </varlistentry>
108
109   <varlistentry>
110     <term>--version</term>
111       <listitem>
112        <para>
113          Print version info and exit.
114         </para>
115       </listitem>
116   </varlistentry>
117
118   <varlistentry>
119     <term>--no-daemon</term>
120      <listitem>
121       <para>
122         Don't  become  a daemon, i.e. don't fork and become process group
123         leader, don't detach from controlling tty, and do all logging there.
124       </para>
125     </listitem>
126   </varlistentry>
127
128   <varlistentry>
129     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
130      <listitem>
131       <para>
132         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
133         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
134         Failure to create or delete the <replaceable class="parameter">pidfile</replaceable>
135         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
136       </para>
137     </listitem>
138   </varlistentry>
139
140   <varlistentry>
141     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
142      <listitem>
143       <para>
144        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
145        <!-- correct looking man output.                              -->
146        After (optionally) writing the PID file, assume the user ID of
147        <replaceable class="parameter">user</replaceable> and the GID of
148        <replaceable class="parameter">group</replaceable>, or, if the optional
149        <replaceable class="parameter">group</replaceable> was not given, the default group of
150        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
151        sufficient to do so.
152      </para>
153     </listitem>
154   </varlistentry>
155   <varlistentry>
156     <term>--chroot</term>
157      <listitem>
158       <para>
159        Before changing to the user ID given in the --user option, chroot to
160        that user's home directory, i.e. make the kernel pretend to the
161        <command>Privoxy</command> process that the directory tree starts
162        there. If set up carefully, this can limit the impact of possible
163        vulnerabilities in <command>Privoxy</command> to the files contained in
164        that hierarchy. 
165       </para>
166     </listitem>
167   </varlistentry>
168  </variablelist>
169
170  <para>
171   If the <filename>configfile</filename> is not specified on  the  command  line,
172   <command>Privoxy</command>  will  look for a file named
173   <filename>config</filename> in the current directory (except on Win32 where
174   it will try <filename>config.txt</filename>). If no
175   <filename>configfile</filename> is found, <command>Privoxy</command> will 
176   fail to start.
177  </para>
178
179 </refsect1>
180
181
182 <!--   ~~~~~       New section      ~~~~~     -->
183 <refsect1><title>Description</title>
184 <!-- Include privoxy.sgml boilerplate: -->
185  &p-intro;
186 <!-- end boilerplate -->
187 </refsect1>
188
189
190 <!--   ~~~~~       New section      ~~~~~     -->
191 <refsect1><title>Installation and Usage</title>
192 <para>
193  Browsers must be individually configured to use <command>Privoxy</command> as
194  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
195  (configurable in the main config file).  To set the HTTP proxy in Netscape
196  and Mozilla, go through:  <command>Edit</command>;
197  <command>Preferences</command>;  <command>Advanced</command>;
198  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
199  <command>View</command>. 
200 </para>
201 <para>
202  For Internet Explorer, go through: <command>Tools</command>; 
203  <command>Internet Properties</command>; <command>Connections</command>;
204  <command>LAN Settings</command>. 
205 </para>
206 <para>
207  The Secure (SSL) Proxy should also be set to the same values, otherwise
208  https: URLs will not be proxied. Note: <command>Privoxy</command> can only
209  proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
210  HTTPS presents some limitations, and not all features will work with HTTPS 
211  connections.
212 </para>
213
214 <para>
215  For other browsers, check the documentation.
216 </para>
217 </refsect1>
218
219
220 <!--   ~~~~~       New section      ~~~~~     -->
221 <refsect1><title>Configuration</title>
222 <para>
223  <command>Privoxy</command> can be configured with the various configuration
224  files. The default configuration files are: <filename>config</filename>,
225  <filename>default.filter</filename>, and
226  <filename>default.action</filename>. <filename>user.action</filename> should 
227  be used for locally defined exceptions to the default rules of
228  <filename>default.action</filename>, and <filename>user.filter</filename> for 
229  locally defined filters. These are well commented.  On Unix
230  and Unix-like systems, these are located in
231  <filename>/etc/privoxy/</filename> by default. On Windows, OS/2 and AmigaOS,
232  these files are in the same directory as the <command>Privoxy</command>
233  executable.
234 </para>
235 <para>
236  See the <ulink
237  url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a complete
238  explanation of installation, general usage, all configuration options, new
239  features and notes on upgrading.
240 </para>
241 <para>
242  The actions list (ad blocks, etc) can also be configured with your
243  web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>.
244  <command>Privoxy's</command> configuration parameters  can also  be viewed at
245  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
246  This is an internal page, and does not require Internet access.
247 </para>
248 </refsect1>
249
250
251 <!--   ~~~~~       New section      ~~~~~     -->
252 <refsect1><title>Sample Configuration</title>
253 <para>
254  A brief example of what a simple <filename>default.action</filename>
255  configuration might look like:
256 </para>
257
258 <literallayout>
259  # Define a few useful custom aliases for later use
260  {{alias}}
261
262  # Useful aliases
263  +crunch-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
264  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
265  +imageblock      = +block +handle-as-image
266
267  # Fragile sites should have the minimum changes
268  fragile     = -block -deanimate-gifs -fast-redirects -filter \
269                -hide-referer -prevent-cookies -kill-popups
270
271  ## Turn some actions on ################################
272  ## NOTE: Actions are off by default, unless explictily turned on 
273  ## otherwise with the '+' operator.
274
275 { \
276 -add-header \
277 -block \
278 -content-type-overwrite \
279 -crunch-client-header \
280 -crunch-if-none-match \
281 -crunch-outgoing-cookies \
282 -crunch-incoming-cookies \
283 -crunch-server-header \
284 +deanimate-gifs{last} \
285 -downgrade-http-version \
286 -fast-redirects \
287 +filter{js-annoyances} \
288 -filter{js-events} \
289 +filter{html-annoyances} \
290 -filter{content-cookies} \
291 +filter{refresh-tags} \
292 +filter{unsolicited-popups} \
293 -filter{all-popups} \
294 +filter{img-reorder} \
295 +filter{banners-by-size} \
296 -filter{banners-by-link} \
297 +filter{webbugs} \
298 -filter{tiny-textforms} \
299 +filter{jumping-windows} \
300 -filter{frameset-borders} \
301 -filter{demoronizer} \
302 -filter{shockwave-flash} \
303 -filter{quicktime-kioskmode} \
304 -filter{fun} \
305 -filter{crude-parental} \
306 +filter{ie-exploits} \
307 -filter{site-specifics} \
308 -filter-client-headers \
309 -filter-server-headers \
310 -force-text-mode \
311 -handle-as-empty-document
312 -handle-as-image \
313 -hide-accept-language \
314 -hide-content-disposition \
315 -hide-if-modified-since \
316 +hide-forwarded-for-headers \
317 +hide-from-header{block} \
318 +hide-referrer{forge} \
319 -hide-user-agent \
320 -inspect-jpegs \
321 -kill-popups \
322 -limit-connect \
323 -overwrite-last-modified \
324 -redirect \
325 +prevent-compression \
326 -send-vanilla-wafer \
327 -send-wafer \
328 +session-cookies-only \
329 +set-image-blocker{pattern} \
330 -treat-forbidden-connects-like-blocks \
331 }
332 / # '/' Match *all* URL patterns
333
334  
335  # Block, and treat these URL patterns as if they were 'images'.
336  # We would expect these to be ads.
337  {+imageblock}
338   .ad.doubleclick.net
339   .a[0-9].yimg.com/(?:(?!/i/).)*$
340   ad.*.doubleclick.net
341
342  # Block any URLs that match these patterns
343  {+block}
344   ad*.
345   .*ads.
346   banner?.
347   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
348   .hitbox.com 
349
350  # Make exceptions for these harmless ones that would be 
351  # caught by our +block patterns just above.
352  {-block}
353   adsl.
354   advice.
355   .*downloads.
356
357 </literallayout>
358
359 <para>
360  Then for a <filename>user.action</filename>, we would put local,
361  narrowly defined exceptions:
362 </para>
363
364 <literallayout>
365  # Re-define aliases as needed here
366  {{alias}}
367
368  # Useful aliases
369  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
370  
371  # Set personal exceptions to the policies in default.action #######
372
373  # Sites where we want persistant cookies, so allow *all* cookies
374  {-crunch-cookies -session-cookies-only}
375   .redhat.com
376   .sun.com
377   .msdn.microsoft.com
378  
379  # This site breaks easily.
380  {-block -fast-redirects}
381   .forbes.com
382
383 </literallayout>
384
385 <para>
386  See the comments in the configuration files themselves, or the 
387  <citetitle>user-manual</citetitle>
388  for explanations of the above syntax, and other <command>Privoxy</command>
389  configuration options.
390 </para>
391
392 </refsect1>
393
394
395 <!--   ~~~~~       New section      ~~~~~     -->
396 <refsect1><title>Files</title>
397 <!-- this is a cheesy way to do this, but WTF. -->
398 <literallayout> 
399  <filename>/usr/sbin/privoxy</filename>
400  <filename>/etc/privoxy/config</filename>
401  <filename>/etc/privoxy/default.action</filename>
402  <filename>/etc/privoxy/standard.action</filename>
403  <filename>/etc/privoxy/user.action</filename>
404  <filename>/etc/privoxy/default.filter</filename>
405  <filename>/etc/privoxy/user.filter</filename>
406  <filename>/etc/privoxy/trust</filename>
407  <filename>/etc/privoxy/templates/*</filename>
408  <filename>/var/log/privoxy/logfile</filename>
409 </literallayout>
410
411 <para>
412  Various other files should be included, but may vary depending on platform
413  and build configuration. Additional documentation should be included in the local
414  documentation directory.
415 </para>
416
417 </refsect1>
418
419
420 <!--   ~~~~~       New section      ~~~~~     -->
421 <refsect1><title>Signals</title>
422 <para>
423  <!-- command tag is used here to get proper looking format  -->
424  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
425  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
426  rotation scripts may cause a re-opening of the logfile by sending a 
427  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
428  other daemons,  <command>Privoxy</command> does not need to be made aware of
429  config file changes by <command>SIGHUP</command> -- it will detect them
430  automatically. 
431 </para>
432
433 </refsect1>
434
435 <!--   ~~~~~       New section      ~~~~~     -->
436 <refsect1><title>Notes</title>
437 <![%p-not-stable;[
438 <para>
439  This is a &p-status; version of <command>Privoxy</command>. Not 
440  all features are well tested.
441 </para>]]>
442 <para>
443  Please see the <citetitle>User Manual</citetitle> on how to contact the
444  developers, for feature requests, reporting problems, and other questions.
445 </para>
446
447 </refsect1>
448
449 <!--   ~~~~~       New section      ~~~~~     -->
450 <refsect1><title>See Also</title>
451 <!-- Include seealso.sgml boilerplate: -->
452  &seealso;
453 <!-- end boilerplate -->
454 </refsect1>
455
456 <!--   ~~~~~       New section      ~~~~~     -->
457 <refsect1><title>Development Team</title>
458 <!-- Include p-authors.sgml boilerplate: -->
459  &authors;
460 <!-- end boilerplate -->
461 </refsect1>
462
463 <!--   ~~~~~       New section      ~~~~~     -->
464 <refsect1><title>Copyright and License</title>
465
466 <refsect2><title>Copyright</title>
467 <!-- Include copyright.sgml boilerplate: -->
468  &copyright;
469 <!-- end boilerplate -->
470 </refsect2>
471
472 <refsect2><title>License</title>
473 <!-- Include license.sgml boilerplate: -->
474  &license;
475 <!-- end boilerplate -->
476 </refsect2>
477 </refsect1>
478
479 </refentry>