3ccc46b40746710474e0648c611c33c820de4a08
[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 1.13.2.5 2003/03/17 16:50:58 oes Exp $
9
10  Copyright (C) 2001, 2002 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.1">
46 <!entity p-status "stable">
47 <!entity % p-not-stable "IGNORE">
48 <!entity % p-stable "INCLUDE">
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>2002-05-14</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><replaceable class="parameter">configfile</replaceable></arg>        
80   <command>&nbsp;(UNIX)</command>
81  </cmdsynopsis>
82
83  <cmdsynopsis> 
84   <command>privoxy.exe</command>              
85   <arg><replaceable class="parameter">configfile</replaceable></arg>
86   <command>&nbsp;(Windows)</command>
87  </cmdsynopsis>                                      
88 </refsynopsisdiv>
89
90
91 <!--   ~~~~~       New section      ~~~~~     -->
92 <refsect1><title>Options</title>
93  <para>
94   <command>Privoxy</command> may be invoked with the following command line
95   options:
96  </para>
97
98  <variablelist>                                          
99   <varlistentry>
100     <term>--help</term>
101       <listitem>
102        <para>
103          Print brief usage info and exit.
104         </para>
105       </listitem>
106   </varlistentry>
107
108   <varlistentry>
109     <term>--version</term>
110       <listitem>
111        <para>
112          Print version info and exit.
113         </para>
114       </listitem>
115   </varlistentry>
116
117   <varlistentry>
118     <term>--no-daemon</term>
119      <listitem>
120       <para>
121         Don't  become  a daemon, i.e. don't fork and become process group
122         leader, don't detach from controlling tty, and do all logging there.
123       </para>
124     </listitem>
125   </varlistentry>
126
127   <varlistentry>
128     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
129      <listitem>
130       <para>
131         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
132         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
133         Failure to create or delete the <replaceable class="parameter">pidfile</replaceable>
134         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
135       </para>
136     </listitem>
137   </varlistentry>
138
139   <varlistentry>
140     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
141      <listitem>
142       <para>
143        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
144        <!-- correct looking man output.                              -->
145        After (optionally) writing the PID file, assume the user ID of
146        <replaceable class="parameter">user</replaceable> and the GID of
147        <replaceable class="parameter">group</replaceable>, or, if the optional
148        <replaceable class="parameter">group</replaceable> was not given, the default group of
149        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
150        sufficient to do so.
151      </para>
152     </listitem>
153   </varlistentry>
154   <varlistentry>
155     <term>--chroot</term>
156      <listitem>
157       <para>
158        Before changing to the user ID given in the --user option, chroot to
159        that user's home directory, i.e. make the kernel pretend to the
160        <command>Privoxy</command> process that the directory tree starts
161        there. If set up carefully, this can limit the impact of possible
162        vulnerabilities in <command>Privoxy</command> to the files contained in
163        that hierarchy. 
164       </para>
165     </listitem>
166   </varlistentry>
167  </variablelist>
168
169  <para>
170   If the <filename>configfile</filename> is not specified on  the  command  line,
171   <command>Privoxy</command>  will  look for a file named
172   <filename>config</filename> in the current directory (except on Win32 where
173   it will try <filename>config.txt</filename>). If no
174   <filename>configfile</filename> is found, <command>Privoxy</command> will 
175   fail to start.
176  </para>
177
178 </refsect1>
179
180
181 <!--   ~~~~~       New section      ~~~~~     -->
182 <refsect1><title>Description</title>
183 <!-- Include privoxy.sgml boilerplate: -->
184  &p-intro;
185 <!-- end boilerplate -->
186 </refsect1>
187
188
189 <!--   ~~~~~       New section      ~~~~~     -->
190 <refsect1><title>Installation and Usage</title>
191 <para>
192  Browsers must be individually configured to use <command>Privoxy</command> as
193  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
194  (configurable in the main config file).  To set the HTTP proxy in Netscape
195  and Mozilla, go through:  <command>Edit</command>;
196  <command>Preferences</command>;  <command>Advanced</command>;
197  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
198  <command>View</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 </para>
210
211 <para>
212  For other browsers, check the documentation.
213 </para>
214 </refsect1>
215
216
217 <!--   ~~~~~       New section      ~~~~~     -->
218 <refsect1><title>Configuration</title>
219 <para>
220  <command>Privoxy</command> can be configured with the various configuration
221  files. The default configuration files are: <filename>config</filename>,
222  <filename>default.filter</filename>, and
223  <filename>default.action</filename>. <filename>user.action</filename> should 
224  be used for locally defined exceptions to the default rules of
225  <filename>default.action</filename> These are all well commented.  On Unix
226  and Unix-like systems, these are located in
227  <filename>/etc/privoxy/</filename> by default. On Windows, OS/2 and AmigaOS,
228  these files are in the same directory as the <command>Privoxy</command>
229  executable.
230 </para>
231 <para>
232  The name and number of configuration files has changed from previous
233  versions<![%p-not-stable;[, and is subject to change as development
234  progresses]]>. In fact, the configuration itself is changed  and  much more
235  sophisticated. See the <ulink
236  url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a complete
237  explanation of all configuration options and general usage, and notes for 
238  upgrading from <command>Junkbuster</command> and earlier <command>Privoxy</command>
239  versions.
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  { \
273  -add-header \
274  -block \
275  +deanimate-gifs{last} \
276  -downgrade-http-version \
277  -fast-redirects \
278  +filter{html-annoyances} \
279  +filter{js-annoyances} \
280  +filter{content-cookies} \
281  +filter{webbugs} \
282  +filter{banners-by-size} \
283  +hide-forwarded-for-headers \
284  +hide-from-header{block} \
285  +hide-referrer{forge} \
286  -hide-user-agent \
287  -handle-as-image \
288  +set-image-blocker{pattern} \
289  -limit-connect \
290  +prevent-compression \
291  +session-cookies-only \
292  -crunch-cookies \
293  -kill-popups \
294  }
295  /   # '/' Matches *all* URL patterns
296  
297  # Block, and treat these URL patterns as if they were 'images'.
298  # We would expect these to be ads.
299  {+imageblock}
300   .ad.doubleclick.net
301   .a[0-9].yimg.com/(?:(?!/i/).)*$
302   ad.*.doubleclick.net
303
304  # Block any URLs that match these patterns
305  {+block}
306   ad*.
307   .*ads.
308   banner?.
309   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
310   .hitbox.com 
311
312  # Make exceptions for these harmless ones that would be 
313  # caught by our +block patterns just above.
314  {-block}
315   adsl.
316   advice.
317   .*downloads.
318
319 </literallayout>
320
321 <para>
322  Then for a <filename>user.action</filename>, we would put local,
323  narrowly defined exceptions:
324 </para>
325
326 <literallayout>
327  # Re-define aliases as needed here
328  {{alias}}
329
330  # Useful aliases
331  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
332  
333  # Set personal exceptions to the policies in default.action #######
334
335  # Sites where we want persistant cookies, so allow *all* cookies
336  {-crunch-cookies -session-cookies-only}
337   .redhat.com
338   .sun.com
339   .msdn.microsoft.com
340  
341  # This site breaks easily.
342  {-block -fast-redirects}
343   .forbes.com
344
345 </literallayout>
346
347 <para>
348  See the comments in the configuration files themselves, or the 
349  <citetitle>user-manual</citetitle>
350  for explanations of the above syntax, and other <command>Privoxy</command>
351  configuration options.
352 </para>
353
354 </refsect1>
355
356
357 <!--   ~~~~~       New section      ~~~~~     -->
358 <refsect1><title>Files</title>
359 <!-- this is a cheesy way to do this, but WTF. -->
360 <literallayout> 
361  <filename>/usr/sbin/privoxy</filename>
362  <filename>/etc/privoxy/config</filename>
363  <filename>/etc/privoxy/default.action</filename>
364  <filename>/etc/privoxy/standard.action</filename>
365  <filename>/etc/privoxy/user.action</filename>
366  <filename>/etc/privoxy/default.filter</filename>
367  <filename>/etc/privoxy/trust</filename>
368  <filename>/etc/privoxy/templates/*</filename>
369  <filename>/var/log/privoxy/logfile</filename>
370 </literallayout>
371
372 <para>
373  Various other files should be included, but may vary depending on platform
374  and build configuration. More documentation should be included in the local
375  documentation directory.
376 </para>
377
378 </refsect1>
379
380
381 <!--   ~~~~~       New section      ~~~~~     -->
382 <refsect1><title>Signals</title>
383 <para>
384  <!-- command tag is used here to get proper looking format  -->
385  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
386  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
387  rotation scripts may cause a re-opening of the logfile by sending a 
388  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
389  other daemons,  <command>Privoxy</command> does not need to be made aware of
390  config file changes by <command>SIGHUP</command> -- it will detect them
391  automatically. 
392 </para>
393
394 </refsect1>
395
396 <!--   ~~~~~       New section      ~~~~~     -->
397 <refsect1><title>Notes</title>
398 <![%p-not-stable;[
399 <para>
400  This is a &p-status; version of <command>Privoxy</command>. Not 
401  all features are well tested.
402 </para>]]>
403 <para>
404  Please see the <citetitle>User Manual</citetitle> on how to contact the
405  developers for feature requests, reporting problems, and other questions.
406 </para>
407
408 </refsect1>
409
410 <!--   ~~~~~       New section      ~~~~~     -->
411 <refsect1><title>See Also</title>
412 <!-- Include seealso.sgml boilerplate: -->
413  &seealso;
414 <!-- end boilerplate -->
415 </refsect1>
416
417 <!--   ~~~~~       New section      ~~~~~     -->
418 <refsect1><title>Development Team</title>
419 <!-- Include p-authors.sgml boilerplate: -->
420  &authors;
421 <!-- end boilerplate -->
422 </refsect1>
423
424 <!--   ~~~~~       New section      ~~~~~     -->
425 <refsect1><title>Copyright and License</title>
426
427 <refsect2><title>Copyright</title>
428 <!-- Include copyright.sgml boilerplate: -->
429  &copyright;
430 <!-- end boilerplate -->
431 </refsect2>
432
433 <refsect2><title>License</title>
434 <!-- Include license.sgml boilerplate: -->
435  &license;
436 <!-- end boilerplate -->
437 </refsect2>
438 </refsect1>
439
440 </refentry>