New actions files.
[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.7 2002/04/12 23:07:40 hal9 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. 
20  ========================================================================
21
22  Doc NOTES: This is some tricky markup! There are some quirks
23  to how this markup is handled. It is not always so co-operative.
24  Please don't change the markup unless you can verify the changes 
25  will improve finished output! 
26  
27  literallayout tags are particularly sensitive to where they are placed.
28  The 'replaceable' and 'command' tags are used here somewhat unconventionally,
29  since it seems to generate the proper formatting (at least for me :).
30
31  Create man page: 'make man'
32
33  Requires docbook2man (short perl script), see CVS
34  http://sources.redhat.com/docbook-tools/. Also requires openjade and SGMLSpm
35  perl module. 
36  
37  For man page references, see:
38  http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/using.html
39  http://docbook.org/tdg/en/html/ch02.html#making-refentry
40
41 -->
42 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[
43 <!entity % dummy "INCLUDE"> 
44 <!entity p-intro SYSTEM "privoxy.sgml">
45 <!entity seealso SYSTEM "seealso.sgml">
46 <!entity copyright SYSTEM "copyright.sgml">
47 <!entity authors SYSTEM "p-authors.sgml">
48 <!entity p-version "2.9.14">
49 <!entity p-status "beta">
50 <!entity % p-not-stable "INCLUDE">
51 <!entity % p-stable "IGNORE">
52 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
53 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
54 ]>
55
56 <refentry id="privoxy">
57 <refentryinfo>
58  <date>2002-04-11</date>
59 </refentryinfo>
60
61 <refmeta>
62  <refentrytitle>privoxy</refentrytitle> 
63  <manvolnum>1</manvolnum>
64  <refmiscinfo>Privoxy &p-version;<![%p-not-stable;[ &p-status;]]></refmiscinfo>
65 </refmeta>
66
67 <refnamediv>
68  <refname><application>privoxy</application></refname>
69  <refpurpose>Privacy Enhancing Proxy</refpurpose>
70 </refnamediv>
71
72 <refsynopsisdiv>
73  <cmdsynopsis> 
74   <command>privoxy</command>
75   <arg><option>--help</option></arg>
76   <arg><option>--version</option></arg>
77   <arg><option>--no-daemon</option></arg>
78   <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>  
79   <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg> 
80   <arg><replaceable class="parameter">configfile</replaceable></arg>        
81   <command>(UNIX)</command>
82  </cmdsynopsis>
83
84  <cmdsynopsis> 
85   <command>privoxy.exe</command>              
86   <arg><replaceable class="parameter">configfile</replaceable></arg>
87   <command>(Windows)</command>
88  </cmdsynopsis>                                      
89 </refsynopsisdiv>
90
91
92 <!--   ~~~~~       New section      ~~~~~     -->
93 <refsect1><title>Options</title>
94  <para>
95   <command>Privoxy</command> may be invoked with the following command line
96   options:
97  </para>
98
99  <variablelist>                                          
100   <varlistentry>
101     <term>--help</term>
102       <listitem>
103        <para>
104          Print brief usage info and exit.
105         </para>
106       </listitem>
107   </varlistentry>
108
109   <varlistentry>
110     <term>--version</term>
111       <listitem>
112        <para>
113          Print version info and exit.
114         </para>
115       </listitem>
116   </varlistentry>
117
118   <varlistentry>
119     <term>--no-daemon</term>
120      <listitem>
121       <para>
122         Don't  become  a daemon, i.e. don't fork and become process group
123         leader, don't detach from controlling tty, and do all logging there.
124       </para>
125     </listitem>
126   </varlistentry>
127
128   <varlistentry>
129     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
130      <listitem>
131       <para>
132         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
133         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
134         Failiure to create or delete the <replaceable class="parameter">pidfile</replaceable>
135         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
136       </para>
137     </listitem>
138   </varlistentry>
139
140   <varlistentry>
141     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
142      <listitem>
143       <para>
144        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
145        <!-- correct looking man output.                              -->
146        After (optionally) writing the PID file, assume the user ID of
147        <replaceable class="parameter">user</replaceable> and the GID of
148        <replaceable class="parameter">group</replaceable>, or, if the optional
149        <replaceable class="parameter">group</replaceable> was not given, the default group of
150        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
151        sufficient to do so.
152      </para>
153     </listitem>
154   </varlistentry>
155  </variablelist>
156  
157  <para>
158   If the <filename>configfile</filename> is not specified on  the  command  line,
159   <command>Privoxy</command>  will  look for a file named
160   <filename>config</filename> in the current directory (except on Win32 where
161   it will try <filename>config.txt</filename>). If no
162   <filename>configfile</filename> is found, <command>Privoxy</command> will 
163   fail to start.
164  </para>
165
166 </refsect1>
167
168
169 <!--   ~~~~~       New section      ~~~~~     -->
170 <refsect1><title>Description</title>
171 <!-- Include privoxy.sgml boilerplate: -->
172  &p-intro;
173 <!-- end boilerplate -->
174 </refsect1>
175
176
177 <!--   ~~~~~       New section      ~~~~~     -->
178 <refsect1><title>Installation and Usage</title>
179 <para>
180  Browsers must be individually configured to use <command>Privoxy</command> as
181  a HTTP proxy.  The default setting is  for  localhost,  on port  8118
182  (configurable in the main config file).  To set the HTTP proxy in Netscape
183  and Mozilla, go through:  <command>Edit</command>;
184  <command>Preferences</command>;  <command>Advanced</command>;
185  <command>Proxies</command>;  <command>Manual Proxy Configuration</command>;
186  <command>View</command>. 
187 </para>
188 <para>
189  For Internet Explorer, go through: <command>Tools</command>; 
190  <command>Internet Properties</command>; <command>Connections</command>;
191  <command>LAN Settings</command>. 
192 </para>
193 <para>
194  The Secure (SSL) Proxy should also be set to the same values, otherwise
195  https: URLs will not be proxied. 
196 </para>
197 <para>
198  For other browsers, check the documentation.
199 </para>
200 </refsect1>
201
202
203 <!--   ~~~~~       New section      ~~~~~     -->
204 <refsect1><title>Configuration</title>
205 <para>
206  <command>Privoxy</command> can be configured with the various configuration
207  files. The default configuration files are: <filename>config</filename>,
208  <filename>default.action</filename>, and
209  <filename>default.filter</filename>. These are well commented.  On Unix and
210  Unix-like systems, these are located in <filename>/etc/privoxy/</filename> by
211  default. On Windows, OS/2 and AmigaOS, these files are in the same directory
212  as the <command>Privoxy</command> executable.
213 </para>
214 <para>
215  The name and number of configuration files has changed from previous
216  versions, and is subject to change as development progresses. In fact, the
217  configuration itself is changed  and  much more sophisticated. See the
218  <ulink url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a
219  brief explanation of all configuration options. 
220 </para>
221 <para>
222  The actions list (ad blocks, etc) can also be configured with your
223  web browser at <ulink url="http://ijbswa.sourceforge.net/config">http://ijbswa.sourceforge.net/config</ulink>.
224  <command>Privoxy's</command> configuration parameters  can also  be viewed at
225  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
226  This is an internal page.
227 </para>
228 </refsect1>
229
230
231 <!--   ~~~~~       New section      ~~~~~     -->
232 <refsect1><title>Sample Configuration</title>
233 <para>
234  A brief example of what a <filename>default.action</filename> configuration
235  might look like:
236 </para>
237
238 <literallayout>
239
240  # Define a few useful custom aliases for later use
241  {{alias}}
242
243  # Don't accept cookies
244  +no-cookies = +no-cookies-set +no-cookies-read
245
246  # Do accept cookies
247  -no-cookies = -no-cookies-set -no-cookies-read
248
249  # Treat these blocked URLs as images.
250  +imageblock = +block +image
251
252  # Define page filters we want to use.
253  myfilters = +filter{html-annoyances} +filter{js-annoyances}\
254              +filter{no-popups} +filter{webbugs}
255
256  ## Default Policies (actions) ############################
257  { \
258   -block \
259   -downgrade \
260   +fast-redirects \
261   myfilters \
262   +no-compression \
263   +hide-forwarded \
264   +hide-from{block} \
265   +hide-referer{forge} \
266   -hide-user-agent \
267   -image \
268   +image-blocker{blank} \
269   +no-cookies-keep \
270   -no-cookies-read \
271   -no-cookies-set \
272   +no-popups \
273   -vanilla-wafer \
274   -wafer \
275  }
276  /
277
278  # Now set exceptions to the above defined policies #######
279
280  # Sites where we want persistant cookies
281  {-no-cookies -no-cookies-keep}
282   .redhat.com
283   .sun.com
284   .yahoo.com
285   .msdn.microsoft.com
286
287  # This site requires cookies AND 'fast-redirects' on
288  {-no-cookies -no-cookies-keep -fast-redirects}
289   .nytimes.com
290
291  # Add custom headers, and turn off filtering of page source
292  {+add-header{X-Privacy: Yes please} #-add-header{*} \
293   +add-header{X-User-Tracking: No thanks!} -filter}
294   privacy.net
295
296  # Block, and treat these URLs as 'images'.
297  {+imageblock}
298   .ad.preferences.com/image.*
299   .ads.web.aol.com
300   .ad-adex3.flycast.com
301   .ad.doubleclick.net
302   .ln.doubleclick.net
303   .ad.de.doubleclick.net
304   /.*/count\.cgi\?.*df=
305   194.221.183.22[1-7]
306   a196.g.akamai.net/7/196/2670/000[12]/images.gmx.net/i4/images/.*/
307
308  # Block any URLs that match these patterns
309  {+block}
310   /.*/(.*[-_.])?ads?[0-9]?(/|[-_.].*|\.(gif|jpe?g))
311   /.*/(plain|live|rotate)[-_.]?ads?/
312   /.*/(sponsor)s?[0-9]?/
313   /.*/ad(server|stream|juggler)\.(cgi|pl|dll|exe)
314   /.*/adbanners/
315   /.*/adv((er)?ts?|ertis(ing|ements?))?/
316   /.*/banners?/
317   /.*/popupads/
318   /.*/advert[0-9]+\.jpg
319   /ad_images/
320   /.*/ads/
321   /images/.*/.*_anim\.gif
322   /rotations/ 
323   /.*(ms)?backoff(ice)?.*\.(gif|jpe?g)
324   195.63.104.*/(inbox|log|meld|folderlu|folderru|log(in|out)[lmr]u|)
325   .images.nytimes.com
326   .images.yahoo.com/adv/
327   /.*cnnstore\.gif
328
329 </literallayout>
330
331 <para>
332  See the comments in the configuration files themselves, or the 
333  <citetitle>user-manual</citetitle>
334  for explanations of the above syntax, and other <command>Privoxy</command>
335  configuration options.
336 </para>
337
338 </refsect1>
339
340
341 <!--   ~~~~~       New section      ~~~~~     -->
342 <refsect1><title>Files</title>
343 <!-- this is a cheesy way to do this, but WTF. -->
344 <literallayout> 
345  <filename>/usr/sbin/privoxy</filename>
346  <filename>/etc/privoxy/config</filename>
347  <filename>/etc/privoxy/default.action</filename>
348  <filename>/etc/privoxy/standard.action</filename>
349  <filename>/etc/privoxy/user.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>