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