Remove MS Windows references and a few minor adjustments.
[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.7 2006/09/01 15:10:45 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  </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  See the <ulink
234  url="http://www.privoxy.org/user-manual/"><citetitle>User Manual</citetitle></ulink> for a detailed
235  explanation of installation, general usage, all configuration options, new
236  features and notes on upgrading.
237 </para>
238 <para>
239  The actions list (ad blocks, etc) can also be configured with your
240  web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>.
241  <command>Privoxy's</command> configuration parameters  can also  be viewed at
242  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
243  This is an internal page, and does not require Internet access.
244 </para>
245 </refsect1>
246
247
248 <!--   ~~~~~       New section      ~~~~~     -->
249 <refsect1><title>Sample Configuration</title>
250 <para>
251  A brief example of what a simple <filename>default.action</filename>
252  configuration might look like:
253 </para>
254
255 <literallayout>
256  # Define a few useful custom aliases for later use
257  {{alias}}
258
259  # Useful aliases
260  +crunch-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
261  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
262  +imageblock      = +block +handle-as-image
263
264  # Fragile sites should have the minimum changes
265  fragile     = -block -deanimate-gifs -fast-redirects -filter \
266                -hide-referer -prevent-cookies -kill-popups
267
268  ## Turn some actions on ################################
269  ## NOTE: Actions are off by default, unless explictily turned on 
270  ## otherwise with the '+' operator.
271
272 { \
273 -add-header \
274 -block \
275 -content-type-overwrite \
276 -crunch-client-header \
277 -crunch-if-none-match \
278 -crunch-outgoing-cookies \
279 -crunch-incoming-cookies \
280 -crunch-server-header \
281 +deanimate-gifs{last} \
282 -downgrade-http-version \
283 -fast-redirects \
284 +filter{js-annoyances} \
285 -filter{js-events} \
286 +filter{html-annoyances} \
287 -filter{content-cookies} \
288 +filter{refresh-tags} \
289 +filter{unsolicited-popups} \
290 -filter{all-popups} \
291 +filter{img-reorder} \
292 +filter{banners-by-size} \
293 -filter{banners-by-link} \
294 +filter{webbugs} \
295 -filter{tiny-textforms} \
296 +filter{jumping-windows} \
297 -filter{frameset-borders} \
298 -filter{demoronizer} \
299 -filter{shockwave-flash} \
300 -filter{quicktime-kioskmode} \
301 -filter{fun} \
302 -filter{crude-parental} \
303 +filter{ie-exploits} \
304 -filter{site-specifics} \
305 -filter-client-headers \
306 -filter-server-headers \
307 -force-text-mode \
308 -handle-as-empty-document
309 -handle-as-image \
310 -hide-accept-language \
311 -hide-content-disposition \
312 -hide-if-modified-since \
313 +hide-forwarded-for-headers \
314 +hide-from-header{block} \
315 +hide-referrer{forge} \
316 -hide-user-agent \
317 -inspect-jpegs \
318 -kill-popups \
319 -limit-connect \
320 -overwrite-last-modified \
321 -redirect \
322 +prevent-compression \
323 -send-vanilla-wafer \
324 -send-wafer \
325 +session-cookies-only \
326 +set-image-blocker{pattern} \
327 -treat-forbidden-connects-like-blocks \
328 }
329 / # '/' Match *all* URL patterns
330
331  
332  # Block, and treat these URL patterns as if they were 'images'.
333  # We would expect these to be ads.
334  {+imageblock}
335   .ad.doubleclick.net
336   .a[0-9].yimg.com/(?:(?!/i/).)*$
337   ad.*.doubleclick.net
338
339  # Block any URLs that match these patterns
340  {+block}
341   ad*.
342   .*ads.
343   banner?.
344   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
345   .hitbox.com 
346
347  # Make exceptions for these harmless ones that would be 
348  # caught by our +block patterns just above.
349  {-block}
350   adsl.
351   advice.
352   .*downloads.
353
354 </literallayout>
355
356 <para>
357  Then for a <filename>user.action</filename>, we would put local,
358  narrowly defined exceptions:
359 </para>
360
361 <literallayout>
362  # Re-define aliases as needed here
363  {{alias}}
364
365  # Useful aliases
366  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
367  
368  # Set personal exceptions to the policies in default.action #######
369
370  # Sites where we want persistant cookies, so allow *all* cookies
371  {-crunch-cookies -session-cookies-only}
372   .redhat.com
373   .sun.com
374   .msdn.microsoft.com
375  
376  # This site breaks easily.
377  {-block -fast-redirects}
378   .forbes.com
379
380 </literallayout>
381
382 <para>
383  See the comments in the configuration files themselves, or the 
384  <citetitle>User Manual</citetitle>
385  for full explanations of the above syntax, and other <command>Privoxy</command>
386  configuration options.
387 </para>
388
389 </refsect1>
390
391
392 <!--   ~~~~~       New section      ~~~~~     -->
393 <refsect1><title>Files</title>
394 <!-- this is a cheesy way to do this, but WTF. -->
395 <literallayout> 
396  <filename>/usr/sbin/privoxy</filename>
397  <filename>/etc/privoxy/config</filename>
398  <filename>/etc/privoxy/default.action</filename>
399  <filename>/etc/privoxy/standard.action</filename>
400  <filename>/etc/privoxy/user.action</filename>
401  <filename>/etc/privoxy/default.filter</filename>
402  <filename>/etc/privoxy/user.filter</filename>
403  <filename>/etc/privoxy/trust</filename>
404  <filename>/etc/privoxy/templates/*</filename>
405  <filename>/var/log/privoxy/logfile</filename>
406 </literallayout>
407
408 <para>
409  Various other files should be included, but may vary depending on platform
410  and build configuration. Additional documentation should be included in the local
411  documentation directory.
412 </para>
413
414 </refsect1>
415
416
417 <!--   ~~~~~       New section      ~~~~~     -->
418 <refsect1><title>Signals</title>
419 <para>
420  <!-- command tag is used here to get proper looking format  -->
421  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
422  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
423  rotation scripts may cause a re-opening of the logfile by sending a 
424  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
425  other daemons,  <command>Privoxy</command> does not need to be made aware of
426  config file changes by <command>SIGHUP</command> -- it will detect them
427  automatically. 
428 </para>
429
430 </refsect1>
431
432 <!--   ~~~~~       New section      ~~~~~     -->
433 <refsect1><title>Notes</title>
434 <![%p-not-stable;[
435 <para>
436  This is a &p-status; version of <command>Privoxy</command>. Not 
437  all features are well tested.
438 </para>]]>
439 <para>
440  Please see the <citetitle>User Manual</citetitle> on how to contact the
441  developers, for feature requests, reporting problems, and other questions.
442 </para>
443
444 </refsect1>
445
446 <!--   ~~~~~       New section      ~~~~~     -->
447 <refsect1><title>See Also</title>
448 <!-- Include seealso.sgml boilerplate: -->
449  &seealso;
450 <!-- end boilerplate -->
451 </refsect1>
452
453 <!--   ~~~~~       New section      ~~~~~     -->
454 <refsect1><title>Development Team</title>
455 <!-- Include p-authors.sgml boilerplate: -->
456  &authors;
457 <!-- end boilerplate -->
458 </refsect1>
459
460 <!--   ~~~~~       New section      ~~~~~     -->
461 <refsect1><title>Copyright and License</title>
462
463 <refsect2><title>Copyright</title>
464 <!-- Include copyright.sgml boilerplate: -->
465  &copyright;
466 <!-- end boilerplate -->
467 </refsect2>
468
469 <refsect2><title>License</title>
470 <!-- Include license.sgml boilerplate: -->
471  &license;
472 <!-- end boilerplate -->
473 </refsect2>
474 </refsect1>
475
476 </refentry>