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.5 2002/04/11 10:02:27 oes Exp $
9
10  Written by and Copyright (C) 2001 the SourceForge
11  Privoxy team. http://www.privoxy.org/
12
13  Based on the Internet Junkbuster originally written
14  by and Copyright (C) 1997 Anonymous Coders and 
15  Junkbusters Corporation.  http://www.junkbusters.com
16
17  ========================================================================
18  NOTE: Please read developer-manual/documentation.html before touching 
19  anything in this, or other Privoxy documentation. You have been warned!
20  Failure to abide by this rule will result in the revocation of your license 
21  to live a peaceful existence!
22  ========================================================================
23
24  Doc NOTES: This is some tricky stuff! There are some quirks
25  to how this markup is handled. It is not always so co-operative.
26  Please don't change the markup, unless you are willing to 
27  un-do your changes! 
28  
29  literallayout tags are particularly sensitive to where they are placed.
30  The 'replaceable' and 'command' tags are used here somewhat unconventionally,
31  since it seems to generate the proper formatting (at least for me :).
32
33  Create man page: 'docbook2man privoxy-man-page.sgml'
34
35  For man page references, see:
36  http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/using.html
37  http://docbook.org/tdg/en/html/ch02.html#making-refentry
38
39 -->
40 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[
41 <!entity % dummy "INCLUDE"> 
42 <!entity p-intro SYSTEM "privoxy.sgml">
43 <!entity seealso SYSTEM "seealso.sgml">
44 <!entity copyright SYSTEM "copyright.sgml">
45 <!entity authors SYSTEM "p-authors.sgml">
46 <!entity p-version "2.9.14">
47 <!entity p-status "beta">
48 <!entity % p-not-stable "INCLUDE">
49 <!entity % p-stable "IGNORE">
50 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
51 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
52 ]>
53
54 <refentry id="privoxy">
55 <refentryinfo>
56  <date>2002-04-11</date>
57 </refentryinfo>
58
59 <refmeta>
60  <refentrytitle>privoxy</refentrytitle> 
61  <manvolnum>1</manvolnum>
62  <refmiscinfo>Privoxy &p-version;<![%p-not-stable;[ &p-status;]]></refmiscinfo>
63 </refmeta>
64
65 <refnamediv>
66  <refname><application>privoxy</application></refname>
67  <refpurpose>Privacy Enhancing Proxy</refpurpose>
68 </refnamediv>
69
70 <refsynopsisdiv>
71  <cmdsynopsis> 
72   <command>privoxy</command>
73   <arg><option>--help</option></arg>
74   <arg><option>--version</option></arg>
75   <arg><option>--no-daemon</option></arg>
76   <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>  
77   <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg> 
78   <arg><replaceable class="parameter">configfile</replaceable></arg>        
79   <command>(UNIX)</command>
80  </cmdsynopsis>
81
82  <cmdsynopsis> 
83   <command>privoxy.exe</command>              
84   <arg><replaceable class="parameter">configfile</replaceable></arg>
85   <command>(Windows)</command>
86  </cmdsynopsis>                                      
87 </refsynopsisdiv>
88
89
90 <!--   ~~~~~       New section      ~~~~~     -->
91 <refsect1><title>Options</title>
92  <para>
93   <command>Privoxy</command> may be invoked with the following command line
94   options:
95  </para>
96
97  <variablelist>                                          
98   <varlistentry>
99     <term>--help</term>
100       <listitem>
101        <para>
102          Print brief usage info and exit.
103         </para>
104       </listitem>
105   </varlistentry>
106
107   <varlistentry>
108     <term>--version</term>
109       <listitem>
110        <para>
111          Print version info and exit.
112         </para>
113       </listitem>
114   </varlistentry>
115
116   <varlistentry>
117     <term>--no-daemon</term>
118      <listitem>
119       <para>
120         Don't  become  a daemon, i.e. don't fork and become process group
121         leader, don't detach from controlling tty, and do all logging there.
122       </para>
123     </listitem>
124   </varlistentry>
125
126   <varlistentry>
127     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
128      <listitem>
129       <para>
130         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
131         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
132         Failiure to create or delete the <replaceable class="parameter">pidfile</replaceable>
133         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
134       </para>
135     </listitem>
136   </varlistentry>
137
138   <varlistentry>
139     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
140      <listitem>
141       <para>
142        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
143        <!-- correct looking man output.                              -->
144        After (optionally) writing the PID file, assume the user ID of
145        <replaceable class="parameter">user</replaceable> and the GID of
146        <replaceable class="parameter">group</replaceable>, or, if the optional
147        <replaceable class="parameter">group</replaceable> was not given, the default group of
148        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
149        sufficient to do so.
150      </para>
151     </listitem>
152   </varlistentry>
153  </variablelist>
154  
155  <para>
156   If the <filename>configfile</filename> is not specified on  the  command  line,
157   <command>Privoxy</command>  will  look for a file named
158   <filename>config</filename> in the current directory (except on Win32 where
159   it will try <filename>config.txt</filename>). If no
160   <filename>configfile</filename> is found, <command>Privoxy</command> will 
161   fail to start.
162  </para>
163
164 </refsect1>
165
166
167 <!--   ~~~~~       New section      ~~~~~     -->
168 <refsect1><title>Description</title>
169 <!-- Include privoxy.sgml boilerplate: -->
170  &p-intro;
171 <!-- end boilerplate -->
172 </refsect1>
173
174
175 <!--   ~~~~~       New section      ~~~~~     -->
176 <refsect1><title>Installation and Usage</title>
177 <para>
178  Browsers must be individually configured to use <command>Privoxy</command> as
179  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
180  (configurable in the main config file).  To set the HTTP proxy in Netscape
181  and Mozilla, go through:  <command>Edit</command>;
182  <command>Preferences</command>;  <command>Advanced</command>;
183  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
184  <command>View</command>. 
185 </para>
186 <para>
187  For Internet Explorer, go through: <command>Tools</command>; 
188  <command>Internet Properties</command>; <command>Connections</command>;
189  <command>LAN Settings</command>. 
190 </para>
191 <para>
192  The Secure (SSL) Proxy should also be set to the same values, otherwise
193  https: URLs will not be proxied. 
194 </para>
195 <para>
196  For other browsers, check the documentation.
197 </para>
198 </refsect1>
199
200
201 <!--   ~~~~~       New section      ~~~~~     -->
202 <refsect1><title>Configuration</title>
203 <para>
204  <command>Privoxy</command> can be configured with the various configuration
205  files. The default configuration files are: <filename>config</filename>,
206  <filename>default.action</filename>, and
207  <filename>default.filter</filename>. These are well commented.  On Unix and
208  Unix-like systems, these are located in <filename>/etc/privoxy/</filename> by
209  default. On Windows, OS/2 and AmigaOS, these files are in the same directory
210  as the <command>Privoxy</command> executable.
211 </para>
212 <para>
213  The name and number of configuration files has changed from previous
214  versions, and is subject to change as development progresses. In fact, the
215  configuration itself is changed  and  much more sophisticated. See the
216  <ulink url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a
217  brief explanation of all configuration options. 
218 </para>
219 <para>
220  The actions list (ad blocks, etc) can also be configured with your
221  web browser at <ulink url="http://ijbswa.sourceforge.net/config">http://ijbswa.sourceforge.net/config</ulink>.
222  <command>Privoxy's</command> configuration parameters  can also  be viewed at
223  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
224  This is an internal page.
225 </para>
226 </refsect1>
227
228
229 <!--   ~~~~~       New section      ~~~~~     -->
230 <refsect1><title>Sample Configuration</title>
231 <para>
232  A brief example of what a <filename>default.action</filename> configuration
233  might look like:
234 </para>
235
236 <literallayout>
237
238  # Define a few useful custom aliases for later use
239  {{alias}}
240
241  # Don't accept cookies
242  +no-cookies = +no-cookies-set +no-cookies-read
243
244  # Do accept cookies
245  -no-cookies = -no-cookies-set -no-cookies-read
246
247  # Treat these blocked URLs as images.
248  +imageblock = +block +image
249
250  # Define page filters we want to use.
251  myfilters = +filter{html-annoyances} +filter{js-annoyances}\
252              +filter{no-popups} +filter{webbugs}
253
254  ## Default Policies (actions) ############################
255  { \
256   -block \
257   -downgrade \
258   +fast-redirects \
259   myfilters \
260   +no-compression \
261   +hide-forwarded \
262   +hide-from{block} \
263   +hide-referer{forge} \
264   -hide-user-agent \
265   -image \
266   +image-blocker{blank} \
267   +no-cookies-keep \
268   -no-cookies-read \
269   -no-cookies-set \
270   +no-popups \
271   -vanilla-wafer \
272   -wafer \
273  }
274  /
275
276  # Now set exceptions to the above defined policies #######
277
278  # Sites where we want persistant cookies
279  {-no-cookies -no-cookies-keep}
280   .redhat.com
281   .sun.com
282   .yahoo.com
283   .msdn.microsoft.com
284
285  # This site requires cookies AND 'fast-redirects' on
286  {-no-cookies -no-cookies-keep -fast-redirects}
287   .nytimes.com
288
289  # Add custom headers, and turn off filtering of page source
290  {+add-header{X-Privacy: Yes please} #-add-header{*} \
291   +add-header{X-User-Tracking: No thanks!} -filter}
292   privacy.net
293
294  # Block, and treat these URLs as 'images'.
295  {+imageblock}
296   .adforce.imgis.com
297   .ad.preferences.com/image.*
298   .ads.web.aol.com
299   .ad-adex3.flycast.com
300   .ad.doubleclick.net
301   .ln.doubleclick.net
302   .ad.de.doubleclick.net
303   /.*/count\.cgi\?.*df=
304   194.221.183.22[1-7]
305   a196.g.akamai.net/7/196/2670/000[12]/images.gmx.net/i4/images/.*/
306
307  # Block any URLs that match these patterns
308  {+block}
309   /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
310   /.*/(plain|live|rotate)[-_.]?ads?/
311   /.*/(sponsor)s?[0-9]?/
312   /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
313   /.*/adbanners/
314   /.*/adv((er)?ts?|ertis(ing|ements?))?/
315   /.*/banners?/
316   /.*/popupads/
317   /.*/advert[0-9]+\.jpg
318   /ad_images/
319   /.*/ads/
320   /images/.*/.*_anim\.gif
321   /rotations/ 
322   /.*(ms)?backoff(ice)?.*\.(gif|jpe?g)
323   195.63.104.*/(inbox|log|meld|folderlu|folderru|log(in|out)[lmr]u|)
324   .images.nytimes.com
325   .images.yahoo.com/adv/
326   /.*cnnstore\.gif
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/advanced.action</filename>
348  <filename>/etc/privoxy/basic.action</filename>
349  <filename>/etc/privoxy/intermediate.action</filename>
350  <filename>/etc/privoxy/default.filter</filename>
351  <filename>/etc/privoxy/trust</filename>
352  <filename>/etc/privoxy/templates/*</filename>
353  <filename>/var/log/privoxy/logfile</filename>
354 </literallayout>
355
356 <para>
357  Various other files should be included, but may vary depending on platform
358  and build configuration. More documentation should be included in the local
359  documentation directory, though is not complete at this time.
360 </para>
361
362 </refsect1>
363
364
365 <!--   ~~~~~       New section      ~~~~~     -->
366 <refsect1><title>Signals</title>
367 <para>
368  <!-- command tag is used here to get proper looking format  -->
369  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
370  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
371  rotation scripts may cause a re-opening of the logfile by sending a 
372  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
373  other daemons,  <command>Privoxy</command> does not need to be made aware of
374  config file changes by <command>SIGHUP</command> -- it will detect them
375  automatically. 
376 </para>
377
378 </refsect1>
379
380 <!--   ~~~~~       New section      ~~~~~     -->
381 <refsect1><title>Notes</title>
382 <![%p-not-stable;[
383 <para>
384  This is a &p-status; version of <command>Privoxy</command>. Not 
385  all features are well tested.
386 </para>]]>
387 <para>
388  Please see the <citetitle>user-manual</citetitle> on how to contact the
389  developers for feature requests, reporting problems, and other questions.
390 </para>
391
392 </refsect1>
393
394 <!--   ~~~~~       New section      ~~~~~     -->
395 <refsect1><title>See Also</title>
396 <!-- Include seealso.sgml boilerplate: -->
397  &seealso;
398 <!-- end boilerplate -->
399 </refsect1>
400
401 <!--   ~~~~~       New section      ~~~~~     -->
402 <refsect1><title>Development Team</title>
403 <!-- Include p-authors.sgml boilerplate: -->
404  &authors;
405 <!-- end boilerplate -->
406 </refsect1>
407
408 <!--   ~~~~~       New section      ~~~~~     -->
409 <refsect1><title>Copyright and License</title>
410 <!-- Include seealso.sgml boilerplate: -->
411  &copyright;
412 <!-- end boilerplate -->
413 </refsect1>
414
415 </refentry>