Fix typo.
[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.3 2002/08/26 00:20:18 hal9 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.0">
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  </variablelist>
155  
156  <para>
157   If the <filename>configfile</filename> is not specified on  the  command  line,
158   <command>Privoxy</command>  will  look for a file named
159   <filename>config</filename> in the current directory (except on Win32 where
160   it will try <filename>config.txt</filename>). If no
161   <filename>configfile</filename> is found, <command>Privoxy</command> will 
162   fail to start.
163  </para>
164
165 </refsect1>
166
167
168 <!--   ~~~~~       New section      ~~~~~     -->
169 <refsect1><title>Description</title>
170 <!-- Include privoxy.sgml boilerplate: -->
171  &p-intro;
172 <!-- end boilerplate -->
173 </refsect1>
174
175
176 <!--   ~~~~~       New section      ~~~~~     -->
177 <refsect1><title>Installation and Usage</title>
178 <para>
179  Browsers must be individually configured to use <command>Privoxy</command> as
180  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
181  (configurable in the main config file).  To set the HTTP proxy in Netscape
182  and Mozilla, go through:  <command>Edit</command>;
183  <command>Preferences</command>;  <command>Advanced</command>;
184  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
185  <command>View</command>. 
186 </para>
187 <para>
188  For Internet Explorer, go through: <command>Tools</command>; 
189  <command>Internet Properties</command>; <command>Connections</command>;
190  <command>LAN Settings</command>. 
191 </para>
192 <para>
193  The Secure (SSL) Proxy should also be set to the same values, otherwise
194  https: URLs will not be proxied. Note: <command>Privoxy</command> can only
195  proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
196 </para>
197
198 <para>
199  For other browsers, check the documentation.
200 </para>
201 </refsect1>
202
203
204 <!--   ~~~~~       New section      ~~~~~     -->
205 <refsect1><title>Configuration</title>
206 <para>
207  <command>Privoxy</command> can be configured with the various configuration
208  files. The default configuration files are: <filename>config</filename>,
209  <filename>default.filter</filename>, and
210  <filename>default.action</filename>. <filename>user.action</filename> should 
211  be used for locally defined exceptions to the default rules of
212  <filename>default.action</filename> These are all well commented.  On Unix
213  and Unix-like systems, these are located in
214  <filename>/etc/privoxy/</filename> by default. On Windows, OS/2 and AmigaOS,
215  these files are in the same directory as the <command>Privoxy</command>
216  executable.
217 </para>
218 <para>
219  The name and number of configuration files has changed from previous
220  versions<![%p-not-stable;[, and is subject to change as development
221  progresses]]>. In fact, the configuration itself is changed  and  much more
222  sophisticated. See the <ulink
223  url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a complete
224  explanation of all configuration options and general usage, and notes for 
225  upgrading from <command>Junkbuster</command> and earlier <command>Privoxy</command>
226  versions.
227 </para>
228 <para>
229  The actions list (ad blocks, etc) can also be configured with your
230  web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>.
231  <command>Privoxy's</command> configuration parameters  can also  be viewed at
232  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
233  This is an internal page, and does not require Internet access.
234 </para>
235 </refsect1>
236
237
238 <!--   ~~~~~       New section      ~~~~~     -->
239 <refsect1><title>Sample Configuration</title>
240 <para>
241  A brief example of what a simple <filename>default.action</filename>
242  configuration might look like:
243 </para>
244
245 <literallayout>
246  # Define a few useful custom aliases for later use
247  {{alias}}
248
249  # Useful aliases
250  +crunch-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
251  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
252  +imageblock      = +block +handle-as-image
253
254  # Fragile sites should have the minimum changes
255  fragile     = -block -deanimate-gifs -fast-redirects -filter \
256                -hide-referer -prevent-cookies -kill-popups
257
258  ## Turn some actions on ################################
259  { \
260  -add-header \
261  -block \
262  +deanimate-gifs{last} \
263  -downgrade-http-version \
264  -fast-redirects \
265  +filter{html-annoyances} \
266  +filter{js-annoyances} \
267  +filter{content-cookies} \
268  +filter{webbugs} \
269  +filter{banners-by-size} \
270  +hide-forwarded-for-headers \
271  +hide-from-header{block} \
272  +hide-referrer{forge} \
273  -hide-user-agent \
274  -handle-as-image \
275  +set-image-blocker{pattern} \
276  -limit-connect \
277  +prevent-compression \
278  +session-cookies-only \
279  -crunch-cookies \
280  -kill-popups \
281  }
282  /   # '/' Matches *all* URL patterns
283  
284  # Block, and treat these URL patterns as if they were 'images'.
285  # We would expect these to be ads.
286  {+imageblock}
287   .ad.doubleclick.net
288   .a[0-9].yimg.com/(?:(?!/i/).)*$
289   ad.*.doubleclick.net
290
291  # Block any URLs that match these patterns
292  {+block}
293   ad*.
294   .*ads.
295   banner?.
296   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
297   .hitbox.com 
298
299  # Make exceptions for these harmless ones that would be 
300  # caught by our +block patterns just above.
301  {-block}
302   adsl.
303   advice.
304   .*downloads.
305
306 </literallayout>
307
308 <para>
309  Then for a <filename>user.action</filename>, we would put local,
310  narrowly defined exceptions:
311 </para>
312
313 <literallayout>
314  # Re-define aliases as needed here
315  {{alias}}
316
317  # Useful aliases
318  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
319  
320  # Set personal exceptions to the policies in default.action #######
321
322  # Sites where we want persistant cookies, so allow *all* cookies
323  {-crunch-cookies -session-cookies-only}
324   .redhat.com
325   .sun.com
326   .msdn.microsoft.com
327  
328  # This site breaks easily.
329  {-block -fast-redirects}
330   .forbes.com
331
332 </literallayout>
333
334 <para>
335  See the comments in the configuration files themselves, or the 
336  <citetitle>user-manual</citetitle>
337  for explanations of the above syntax, and other <command>Privoxy</command>
338  configuration options.
339 </para>
340
341 </refsect1>
342
343
344 <!--   ~~~~~       New section      ~~~~~     -->
345 <refsect1><title>Files</title>
346 <!-- this is a cheesy way to do this, but WTF. -->
347 <literallayout> 
348  <filename>/usr/sbin/privoxy</filename>
349  <filename>/etc/privoxy/config</filename>
350  <filename>/etc/privoxy/default.action</filename>
351  <filename>/etc/privoxy/standard.action</filename>
352  <filename>/etc/privoxy/user.action</filename>
353  <filename>/etc/privoxy/default.filter</filename>
354  <filename>/etc/privoxy/trust</filename>
355  <filename>/etc/privoxy/templates/*</filename>
356  <filename>/var/log/privoxy/logfile</filename>
357 </literallayout>
358
359 <para>
360  Various other files should be included, but may vary depending on platform
361  and build configuration. More documentation should be included in the local
362  documentation directory.
363 </para>
364
365 </refsect1>
366
367
368 <!--   ~~~~~       New section      ~~~~~     -->
369 <refsect1><title>Signals</title>
370 <para>
371  <!-- command tag is used here to get proper looking format  -->
372  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
373  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
374  rotation scripts may cause a re-opening of the logfile by sending a 
375  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
376  other daemons,  <command>Privoxy</command> does not need to be made aware of
377  config file changes by <command>SIGHUP</command> -- it will detect them
378  automatically. 
379 </para>
380
381 </refsect1>
382
383 <!--   ~~~~~       New section      ~~~~~     -->
384 <refsect1><title>Notes</title>
385 <![%p-not-stable;[
386 <para>
387  This is a &p-status; version of <command>Privoxy</command>. Not 
388  all features are well tested.
389 </para>]]>
390 <para>
391  Please see the <citetitle>User Manual</citetitle> on how to contact the
392  developers for feature requests, reporting problems, and other questions.
393 </para>
394
395 </refsect1>
396
397 <!--   ~~~~~       New section      ~~~~~     -->
398 <refsect1><title>See Also</title>
399 <!-- Include seealso.sgml boilerplate: -->
400  &seealso;
401 <!-- end boilerplate -->
402 </refsect1>
403
404 <!--   ~~~~~       New section      ~~~~~     -->
405 <refsect1><title>Development Team</title>
406 <!-- Include p-authors.sgml boilerplate: -->
407  &authors;
408 <!-- end boilerplate -->
409 </refsect1>
410
411 <!--   ~~~~~       New section      ~~~~~     -->
412 <refsect1><title>Copyright and License</title>
413
414 <refsect2><title>Copyright</title>
415 <!-- Include copyright.sgml boilerplate: -->
416  &copyright;
417 <!-- end boilerplate -->
418 </refsect2>
419
420 <refsect2><title>License</title>
421 <!-- Include license.sgml boilerplate: -->
422  &license;
423 <!-- end boilerplate -->
424 </refsect2>
425 </refsect1>
426
427 </refentry>