More updates primarily for the six new filters.
[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.9 2006/09/22 01:27:55 hal9 Exp $
9
10  Copyright (C) 2001-2006 Privoxy Developers http://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.6">
46 <!entity p-status "UNRELEASED">
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  </cmdsynopsis>
82
83 </refsynopsisdiv>
84
85
86 <!--   ~~~~~       New section      ~~~~~     -->
87 <refsect1><title>Options</title>
88  <para>
89   <command>Privoxy</command> may be invoked with the following command line
90   options:
91  </para>
92
93  <variablelist>                                          
94   <varlistentry>
95     <term>--help</term>
96       <listitem>
97        <para>
98          Print brief usage info and exit.
99         </para>
100       </listitem>
101   </varlistentry>
102
103   <varlistentry>
104     <term>--version</term>
105       <listitem>
106        <para>
107          Print version info and exit.
108         </para>
109       </listitem>
110   </varlistentry>
111
112   <varlistentry>
113     <term>--no-daemon</term>
114      <listitem>
115       <para>
116         Don't  become  a daemon, i.e. don't fork and become process group
117         leader, don't detach from controlling tty, and do all logging there.
118       </para>
119     </listitem>
120   </varlistentry>
121
122   <varlistentry>
123     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
124      <listitem>
125       <para>
126         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
127         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
128         Failure to create or delete the <replaceable class="parameter">pidfile</replaceable>
129         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
130       </para>
131     </listitem>
132   </varlistentry>
133
134   <varlistentry>
135     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
136      <listitem>
137       <para>
138        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
139        <!-- correct looking man output.                              -->
140        After (optionally) writing the PID file, assume the user ID of
141        <replaceable class="parameter">user</replaceable> and the GID of
142        <replaceable class="parameter">group</replaceable>, or, if the optional
143        <replaceable class="parameter">group</replaceable> was not given, the default group of
144        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
145        sufficient to do so.
146      </para>
147     </listitem>
148   </varlistentry>
149   <varlistentry>
150     <term>--chroot</term>
151      <listitem>
152       <para>
153        Before changing to the user ID given in the --user option, chroot to
154        that user's home directory, i.e. make the kernel pretend to the
155        <command>Privoxy</command> process that the directory tree starts
156        there. If set up carefully, this can limit the impact of possible
157        vulnerabilities in <command>Privoxy</command> to the files contained in
158        that hierarchy. 
159       </para>
160     </listitem>
161   </varlistentry>
162  </variablelist>
163
164  <para>
165   If the <filename>configfile</filename> is not specified on  the  command  line,
166   <command>Privoxy</command>  will  look for a file named
167   <filename>config</filename> in the current directory . If no
168   <filename>configfile</filename> is found, <command>Privoxy</command> will 
169   fail to start.
170  </para>
171
172 </refsect1>
173
174
175 <!--   ~~~~~       New section      ~~~~~     -->
176 <refsect1><title>Description</title>
177 <!-- Include privoxy.sgml boilerplate: -->
178  &p-intro;
179 <!-- end boilerplate -->
180 </refsect1>
181
182
183 <!--   ~~~~~       New section      ~~~~~     -->
184 <refsect1><title>Installation and Usage</title>
185 <para>
186  Browsers must be individually configured to use <command>Privoxy</command> as
187  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
188  (configurable in the main config file).  To set the HTTP proxy in Netscape
189  and Mozilla, go through:  <command>Edit</command>;
190  <command>Preferences</command>;  <command>Advanced</command>;
191  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
192  <command>View</command>. 
193 </para>
194 <para>
195  For Firefox, go through: <command>Tools</command>; 
196  <command>Options</command>; <command>General</command>;
197  <command>Connection Settings</command>;
198  <command>Manual Proxy Configuration</command>. 
199 </para>
200 <para>
201  For Internet Explorer, go through: <command>Tools</command>; 
202  <command>Internet Properties</command>; <command>Connections</command>;
203  <command>LAN Settings</command>. 
204 </para>
205 <para>
206  The Secure (SSL) Proxy should also be set to the same values, otherwise
207  https: URLs will not be proxied. Note: <command>Privoxy</command> can only
208  proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
209  HTTPS presents some limitations, and not all features will work with HTTPS 
210  connections.
211 </para>
212
213 <para>
214  For other browsers, check the documentation.
215 </para>
216 </refsect1>
217
218
219 <!--   ~~~~~       New section      ~~~~~     -->
220 <refsect1><title>Configuration</title>
221 <para>
222  <command>Privoxy</command> can be configured with the various configuration
223  files. The default configuration files are: <filename>config</filename>,
224  <filename>default.filter</filename>, and
225  <filename>default.action</filename>. <filename>user.action</filename> should 
226  be used for locally defined exceptions to the default rules of
227  <filename>default.action</filename>, and <filename>user.filter</filename> for 
228  locally defined filters. These are well commented.  On Unix
229  and Unix-like systems, these are located in
230  <filename>/etc/privoxy/</filename> by default. 
231 </para>
232 <para> 
233  <command>Privoxy</command> uses the concept of <command>actions</command> 
234  in order to manipulate the data stream between the browser and remote sites.
235  There are various actions available with specific functions for such things 
236  as blocking web sites, managing cookies, etc. These actions can be invoked
237  individually or combined, and used against individual URLs, or groups of URLs 
238  that can be defined using wildcards and regular expressions. The result is
239  that the user has greatly enhanced control and freedom.
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 <para>
249  See the <ulink
250  url="http://www.privoxy.org/user-manual/"><citetitle>User Manual</citetitle></ulink> for a detailed
251  explanation of installation, general usage, all configuration options, new
252  features and notes on upgrading.
253 </para>
254 </refsect1>
255
256
257 <!--   ~~~~~       New section      ~~~~~     -->
258 <refsect1><title>Sample Configuration</title>
259 <para>
260  A brief example of what a simple <filename>default.action</filename>
261  configuration might look like:
262 </para>
263
264 <literallayout>
265  # Define a few useful custom aliases for later use
266  {{alias}}
267
268  # Useful aliases that combine more than one action
269  +crunch-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
270  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
271  +block-as-image = +block +handle-as-image
272
273  # Fragile sites should have the minimum changes
274  fragile     = -block -deanimate-gifs -fast-redirects -filter \
275                -hide-referer -prevent-cookies -kill-popups
276
277  ## Turn some actions on ################################
278  ## NOTE: Actions are off by default, unless explictily turned on 
279  ## otherwise with the '+' operator.
280
281 { \
282 -add-header \
283 -block \
284 -content-type-overwrite \
285 -crunch-client-header \
286 -crunch-if-none-match \
287 -crunch-outgoing-cookies \
288 -crunch-incoming-cookies \
289 -crunch-server-header \
290 +deanimate-gifs{last} \
291 -downgrade-http-version \
292 -fast-redirects \
293 -filter{js-annoyances} \
294 -filter{js-events} \
295 -filter{html-annoyances} \
296 -filter{content-cookies} \
297 +filter{refresh-tags} \
298 -filter{unsolicited-popups} \
299 -filter{all-popups} \
300 -filter{img-reorder} \
301 -filter{banners-by-size} \
302 -filter{banners-by-link} \
303 +filter{webbugs} \
304 -filter{tiny-textforms} \
305 +filter{jumping-windows} \
306 -filter{frameset-borders} \
307 -filter{demoronizer} \
308 -filter{shockwave-flash} \
309 -filter{quicktime-kioskmode} \
310 -filter{fun} \
311 -filter{crude-parental} \
312 +filter{ie-exploits} \
313 -filter{site-specifics} \
314 -filter{google} \
315 -filter{yahoo} \
316 -filter{msn} \
317 -filter{blogspot} \
318 -filter{xml-to-html} \
319 -filter{html-to-xml} \
320 -filter-client-headers \
321 -filter-server-headers \
322 -force-text-mode \
323 -handle-as-empty-document
324 -handle-as-image \
325 -hide-accept-language \
326 -hide-content-disposition \
327 -hide-if-modified-since \
328 +hide-forwarded-for-headers \
329 +hide-from-header{block} \
330 +hide-referrer{forge} \
331 -hide-user-agent \
332 -inspect-jpegs \
333 -kill-popups \
334 -limit-connect \
335 -overwrite-last-modified \
336 -redirect \
337 +prevent-compression \
338 -send-vanilla-wafer \
339 -send-wafer \
340 +session-cookies-only \
341 +set-image-blocker{pattern} \
342 -treat-forbidden-connects-like-blocks \
343 }
344 / # '/' Match *all* URL patterns
345
346  
347  # Block all URLs that match these patterns
348  { +block }
349   ad.
350   ad[sv].
351   .*ads.
352   banner?.
353   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
354   .hitbox.com 
355   media./.*(ads|banner)
356
357  # Block, and treat these URL patterns as if they were 'images'.
358  # We would expect these to be ads.
359  { +block-as-image }
360   .ad.doubleclick.net
361   .a[0-9].yimg.com/(?:(?!/i/).)*$
362   ad.*.doubleclick.net
363
364  # Make exceptions for these harmless ones that would be 
365  # caught by our +block patterns just above.
366  { -block }
367   adsl.
368   adobe.
369   advice.
370   .*downloads.
371   # uploads or downloads
372   /.*loads
373 </literallayout>
374
375 <para>
376  Then for a <filename>user.action</filename>, we would put local,
377  narrowly defined exceptions:
378 </para>
379
380 <literallayout>
381  # Re-define aliases as needed here
382  {{alias}}
383
384  # Useful aliases
385  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
386  
387  # Set personal exceptions to the policies in default.action #######
388
389  # Sites where we want persistent cookies, so allow *all* cookies
390  { -crunch-cookies -session-cookies-only }
391   .redhat.com
392   .sun.com
393   .msdn.microsoft.com
394  
395  # These sites breaks easily. Use our "fragile" alias here.
396  { fragile }
397   .forbes.com
398   mybank.example.com
399
400  # Replace example.com's style sheet with one of my choosing
401  { +redirect{http://localhost/css-replacements/example.com.css} }
402   example.com/stylesheet.css
403
404 </literallayout>
405
406 <para>
407  See the comments in the configuration files themselves, or the 
408  <citetitle>User Manual</citetitle>
409  for full explanations of the above syntax, and other <command>Privoxy</command>
410  configuration options.
411 </para>
412
413 </refsect1>
414
415
416 <!--   ~~~~~       New section      ~~~~~     -->
417 <refsect1><title>Files</title>
418 <!-- this is a cheesy way to do this, but WTF. -->
419 <literallayout> 
420  <filename>/usr/sbin/privoxy</filename>
421  <filename>/etc/privoxy/config</filename>
422  <filename>/etc/privoxy/default.action</filename>
423  <filename>/etc/privoxy/standard.action</filename>
424  <filename>/etc/privoxy/user.action</filename>
425  <filename>/etc/privoxy/default.filter</filename>
426  <filename>/etc/privoxy/user.filter</filename>
427  <filename>/etc/privoxy/trust</filename>
428  <filename>/etc/privoxy/templates/*</filename>
429  <filename>/var/log/privoxy/logfile</filename>
430 </literallayout>
431
432 <para>
433  Various other files should be included, but may vary depending on platform
434  and build configuration. Additional documentation should be included in the local
435  documentation directory.
436 </para>
437
438 </refsect1>
439
440
441 <!--   ~~~~~       New section      ~~~~~     -->
442 <refsect1><title>Signals</title>
443 <para>
444  <!-- command tag is used here to get proper looking format  -->
445  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
446  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
447  rotation scripts may cause a re-opening of the logfile by sending a 
448  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
449  other daemons,  <command>Privoxy</command> does not need to be made aware of
450  config file changes by <command>SIGHUP</command> -- it will detect them
451  automatically. 
452 </para>
453
454 </refsect1>
455
456 <!--   ~~~~~       New section      ~~~~~     -->
457 <refsect1><title>Notes</title>
458 <![%p-not-stable;[
459 <para>
460  This is a &p-status; version of <command>Privoxy</command>. Not 
461  all features are well tested.
462 </para>]]>
463 <para>
464  Please see the <citetitle>User Manual</citetitle> on how to contact the
465  developers, for feature requests, reporting problems, and other questions.
466 </para>
467
468 </refsect1>
469
470 <!--   ~~~~~       New section      ~~~~~     -->
471 <refsect1><title>See Also</title>
472 <!-- Include seealso.sgml boilerplate: -->
473  &seealso;
474 <!-- end boilerplate -->
475 </refsect1>
476
477 <!--   ~~~~~       New section      ~~~~~     -->
478 <refsect1><title>Development Team</title>
479 <!-- Include p-authors.sgml boilerplate: -->
480  &authors;
481 <!-- end boilerplate -->
482 </refsect1>
483
484 <!--   ~~~~~       New section      ~~~~~     -->
485 <refsect1><title>Copyright and License</title>
486
487 <refsect2><title>Copyright</title>
488 <!-- Include copyright.sgml boilerplate: -->
489  &copyright;
490 <!-- end boilerplate -->
491 </refsect2>
492
493 <refsect2><title>License</title>
494 <!-- Include license.sgml boilerplate: -->
495  &license;
496 <!-- end boilerplate -->
497 </refsect2>
498 </refsect1>
499
500 </refentry>