Updated Makefile with 3.0 changes (pdf and man targets, etc). Revise comments
[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.3 2002/09/05 05:45:30 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  For man page references, see:
28  http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/using.html
29  http://docbook.org/tdg/en/html/ch02.html#making-refentry
30
31 -->
32 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[
33 <!entity % dummy "IGNORE"> 
34 <!entity p-intro SYSTEM "privoxy.sgml">
35 <!entity seealso SYSTEM "seealso.sgml">
36 <!entity copyright SYSTEM "copyright.sgml">
37 <!entity license SYSTEM "license.sgml">
38 <!entity authors SYSTEM "p-authors.sgml">
39 <!entity p-version SYSTEM "doc_version.tmp">
40 <!entity p-status SYSTEM "doc_status.tmp">
41 <!entity % p-not-stable "IGNORE">
42 <!entity % p-stable "IGNORE">
43 <!entity % p-alpha "IGNORE">
44 <!entity % p-beta "IGNORE">
45 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
46 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
47 <!entity my-copy "(C)">               <!-- db2man barfs on copyright symbol  -->
48 ]>
49
50 <refentry id="privoxy">
51 <refentryinfo>
52  <date>2002-05-14</date>
53 </refentryinfo>
54 <refmeta>
55  <refentrytitle>privoxy</refentrytitle> 
56  <manvolnum>1</manvolnum>
57  <refmiscinfo>
58   Privoxy &p-version;<![%p-not-stable;[ &p-status;]]>
59  </refmiscinfo>
60 </refmeta>
61
62 <refnamediv>
63  <refname><application>privoxy</application></refname>
64  <refpurpose>Privacy Enhancing Proxy</refpurpose>
65 </refnamediv>
66
67 <refsynopsisdiv>
68  <cmdsynopsis> 
69   <command>privoxy</command>
70   <arg><option>--help</option></arg>
71   <arg><option>--version</option></arg>
72   <arg><option>--no-daemon</option></arg>
73   <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>  
74   <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg> 
75   <arg><replaceable class="parameter">configfile</replaceable></arg>        
76   <command>&nbsp;(UNIX)</command>
77  </cmdsynopsis>
78
79  <cmdsynopsis> 
80   <command>privoxy.exe</command>              
81   <arg><replaceable class="parameter">configfile</replaceable></arg>
82   <command>&nbsp;(Windows)</command>
83  </cmdsynopsis>                                      
84 </refsynopsisdiv>
85
86
87 <!--   ~~~~~       New section      ~~~~~     -->
88 <refsect1><title>Options</title>
89  <para>
90   <command>Privoxy</command> may be invoked with the following command line
91   options:
92  </para>
93
94  <variablelist>                                          
95   <varlistentry>
96     <term>--help</term>
97       <listitem>
98        <para>
99          Print brief usage info and exit.
100         </para>
101       </listitem>
102   </varlistentry>
103
104   <varlistentry>
105     <term>--version</term>
106       <listitem>
107        <para>
108          Print version info and exit.
109         </para>
110       </listitem>
111   </varlistentry>
112
113   <varlistentry>
114     <term>--no-daemon</term>
115      <listitem>
116       <para>
117         Don't  become  a daemon, i.e. don't fork and become process group
118         leader, don't detach from controlling tty, and do all logging there.
119       </para>
120     </listitem>
121   </varlistentry>
122
123   <varlistentry>
124     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
125      <listitem>
126       <para>
127         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
128         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
129         Failure to create or delete the <replaceable class="parameter">pidfile</replaceable>
130         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
131       </para>
132     </listitem>
133   </varlistentry>
134
135   <varlistentry>
136     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
137      <listitem>
138       <para>
139        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
140        <!-- correct looking man output.                              -->
141        After (optionally) writing the PID file, assume the user ID of
142        <replaceable class="parameter">user</replaceable> and the GID of
143        <replaceable class="parameter">group</replaceable>, or, if the optional
144        <replaceable class="parameter">group</replaceable> was not given, the default group of
145        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
146        sufficient to do so.
147      </para>
148     </listitem>
149   </varlistentry>
150  </variablelist>
151  
152  <para>
153   If the <filename>configfile</filename> is not specified on  the  command  line,
154   <command>Privoxy</command>  will  look for a file named
155   <filename>config</filename> in the current directory (except on Win32 where
156   it will try <filename>config.txt</filename>). If no
157   <filename>configfile</filename> is found, <command>Privoxy</command> will 
158   fail to start.
159  </para>
160
161 </refsect1>
162
163
164 <!--   ~~~~~       New section      ~~~~~     -->
165 <refsect1><title>Description</title>
166 <!-- Include privoxy.sgml boilerplate: -->
167  &p-intro;
168 <!-- end boilerplate -->
169 </refsect1>
170
171
172 <!--   ~~~~~       New section      ~~~~~     -->
173 <refsect1><title>Installation and Usage</title>
174 <para>
175  Browsers must be individually configured to use <command>Privoxy</command> as
176  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
177  (configurable in the main config file).  To set the HTTP proxy in Netscape
178  and Mozilla, go through:  <command>Edit</command>;
179  <command>Preferences</command>;  <command>Advanced</command>;
180  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
181  <command>View</command>. 
182 </para>
183 <para>
184  For Internet Explorer, go through: <command>Tools</command>; 
185  <command>Internet Properties</command>; <command>Connections</command>;
186  <command>LAN Settings</command>. 
187 </para>
188 <para>
189  The Secure (SSL) Proxy should also be set to the same values, otherwise
190  https: URLs will not be proxied. Note: <command>Privoxy</command> can only
191  proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
192 </para>
193
194 <para>
195  For other browsers, check the documentation.
196 </para>
197 </refsect1>
198
199
200 <!--   ~~~~~       New section      ~~~~~     -->
201 <refsect1><title>Configuration</title>
202 <para>
203  <command>Privoxy</command> can be configured with the various configuration
204  files. The default configuration files are: <filename>config</filename>,
205  <filename>default.filter</filename>, and
206  <filename>default.action</filename>. <filename>user.action</filename> should 
207  be used for locally defined exceptions to the default rules of
208  <filename>default.action</filename> These are all well commented.  On Unix
209  and Unix-like systems, these are located in
210  <filename>/etc/privoxy/</filename> by default. On Windows, OS/2 and AmigaOS,
211  these files are in the same directory as the <command>Privoxy</command>
212  executable.
213 </para>
214 <para>
215  The name and number of configuration files has changed from previous
216  versions<![%p-not-stable;[, and is subject to change as development
217  progresses]]>. In fact, the configuration itself is changed  and  much more
218  sophisticated. See the <ulink
219  url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a complete
220  explanation of all configuration options and general usage, and notes for 
221  upgrading from <command>Junkbuster</command> and earlier <command>Privoxy</command>
222  versions.
223 </para>
224 <para>
225  The actions list (ad blocks, etc) can also be configured with your
226  web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>.
227  <command>Privoxy's</command> configuration parameters  can also  be viewed at
228  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
229  This is an internal page, and does not require Internet access.
230 </para>
231 </refsect1>
232
233
234 <!--   ~~~~~       New section      ~~~~~     -->
235 <refsect1><title>Sample Configuration</title>
236 <para>
237  A brief example of what a simple <filename>default.action</filename>
238  configuration might look like:
239 </para>
240
241 <literallayout>
242  # Define a few useful custom aliases for later use
243  {{alias}}
244
245  # Useful aliases
246  +crunch-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
247  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
248  +imageblock      = +block +handle-as-image
249
250  # Fragile sites should have the minimum changes
251  fragile     = -block -deanimate-gifs -fast-redirects -filter \
252                -hide-referer -prevent-cookies -kill-popups
253
254  ## Turn some actions on ################################
255  { \
256  -add-header \
257  -block \
258  +deanimate-gifs{last} \
259  -downgrade-http-version \
260  -fast-redirects \
261  +filter{html-annoyances} \
262  +filter{js-annoyances} \
263  +filter{content-cookies} \
264  +filter{webbugs} \
265  +filter{banners-by-size} \
266  +hide-forwarded-for-headers \
267  +hide-from-header{block} \
268  +hide-referrer{forge} \
269  -hide-user-agent \
270  -handle-as-image \
271  +set-image-blocker{pattern} \
272  -limit-connect \
273  +prevent-compression \
274  +session-cookies-only \
275  -crunch-cookies \
276  -kill-popups \
277  }
278  /   # '/' Matches *all* URL patterns
279  
280  # Block, and treat these URL patterns as if they were 'images'.
281  # We would expect these to be ads.
282  {+imageblock}
283   .ad.doubleclick.net
284   .a[0-9].yimg.com/(?:(?!/i/).)*$
285   ad.*.doubleclick.net
286
287  # Block any URLs that match these patterns
288  {+block}
289   ad*.
290   .*ads.
291   banner?.
292   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
293   .hitbox.com 
294
295  # Make exceptions for these harmless ones that would be 
296  # caught by our +block patterns just above.
297  {-block}
298   adsl.
299   advice.
300   .*downloads.
301
302 </literallayout>
303
304 <para>
305  Then for a <filename>user.action</filename>, we would put local,
306  narrowly defined exceptions:
307 </para>
308
309 <literallayout>
310  # Re-define aliases as needed here
311  {{alias}}
312
313  # Useful aliases
314  -crunch-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
315  
316  # Set personal exceptions to the policies in default.action #######
317
318  # Sites where we want persistant cookies, so allow *all* cookies
319  {-crunch-cookies -session-cookies-only}
320   .redhat.com
321   .sun.com
322   .msdn.microsoft.com
323  
324  # This site breaks easily.
325  {-block -fast-redirects}
326   .forbes.com
327
328 </literallayout>
329
330 <para>
331  See the comments in the configuration files themselves, or the 
332  <citetitle>user-manual</citetitle>
333  for explanations of the above syntax, and other <command>Privoxy</command>
334  configuration options.
335 </para>
336
337 </refsect1>
338
339
340 <!--   ~~~~~       New section      ~~~~~     -->
341 <refsect1><title>Files</title>
342 <!-- this is a cheesy way to do this, but WTF. -->
343 <literallayout> 
344  <filename>/usr/sbin/privoxy</filename>
345  <filename>/etc/privoxy/config</filename>
346  <filename>/etc/privoxy/default.action</filename>
347  <filename>/etc/privoxy/standard.action</filename>
348  <filename>/etc/privoxy/user.action</filename>
349  <filename>/etc/privoxy/default.filter</filename>
350  <filename>/etc/privoxy/trust</filename>
351  <filename>/etc/privoxy/templates/*</filename>
352  <filename>/var/log/privoxy/logfile</filename>
353 </literallayout>
354
355 <para>
356  Various other files should be included, but may vary depending on platform
357  and build configuration. More documentation should be included in the local
358  documentation directory.
359 </para>
360
361 </refsect1>
362
363
364 <!--   ~~~~~       New section      ~~~~~     -->
365 <refsect1><title>Signals</title>
366 <para>
367  <!-- command tag is used here to get proper looking format  -->
368  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
369  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
370  rotation scripts may cause a re-opening of the logfile by sending a 
371  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
372  other daemons,  <command>Privoxy</command> does not need to be made aware of
373  config file changes by <command>SIGHUP</command> -- it will detect them
374  automatically. 
375 </para>
376
377 </refsect1>
378
379 <!--   ~~~~~       New section      ~~~~~     -->
380 <refsect1><title>Notes</title>
381 <![%p-not-stable;[
382 <para>
383  This is a &p-status; version of <command>Privoxy</command>. Not 
384  all features are well tested.
385 </para>]]>
386 <para>
387  Please see the <citetitle>User Manual</citetitle> on how to contact the
388  developers for feature requests, reporting problems, and other questions.
389 </para>
390
391 </refsect1>
392
393 <!--   ~~~~~       New section      ~~~~~     -->
394 <refsect1><title>See Also</title>
395 <!-- Include seealso.sgml boilerplate: -->
396  &seealso;
397 <!-- end boilerplate -->
398 </refsect1>
399
400 <!--   ~~~~~       New section      ~~~~~     -->
401 <refsect1><title>Development Team</title>
402 <!-- Include p-authors.sgml boilerplate: -->
403  &authors;
404 <!-- end boilerplate -->
405 </refsect1>
406
407 <!--   ~~~~~       New section      ~~~~~     -->
408 <refsect1><title>Copyright and License</title>
409
410 <refsect2><title>Copyright</title>
411 <!-- Include copyright.sgml boilerplate: -->
412  &copyright;
413 <!-- end boilerplate -->
414 </refsect2>
415
416 <refsect2><title>License</title>
417 <!-- Include license.sgml boilerplate: -->
418  &license;
419 <!-- end boilerplate -->
420 </refsect2>
421 </refsect1>
422
423 </refentry>