Sorting out license vs copyright in these docs.
[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.10 2002/05/04 08:44:44 swa 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 "IGNORE"> 
44 <!entity p-intro SYSTEM "privoxy.sgml">
45 <!entity seealso SYSTEM "seealso.sgml">
46 <!entity copyright SYSTEM "copyright.sgml">
47 <!entity license SYSTEM "license.sgml">
48 <!entity authors SYSTEM "p-authors.sgml">
49 <!entity p-version "2.9.15">
50 <!entity p-status "beta">
51 <!entity % p-not-stable "INCLUDE">
52 <!entity % p-stable "IGNORE">
53 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
54 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
55 ]>
56
57 <refentry id="privoxy">
58 <refentryinfo>
59  <date>2002-04-11</date>
60 </refentryinfo>
61
62 <refmeta>
63  <refentrytitle>privoxy</refentrytitle> 
64  <manvolnum>1</manvolnum>
65  <refmiscinfo>Privoxy &p-version;<![%p-not-stable;[ &p-status;]]></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. 
197 </para>
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, and is subject to change as development progresses. In fact, the
221  configuration itself is changed  and  much more sophisticated. See the
222  <ulink url="http://www.privoxy.org/user-manual/">user-manual</ulink> for a
223  brief explanation of all configuration options. 
224 </para>
225 <para>
226  The actions list (ad blocks, etc) can also be configured with your
227  web browser at <ulink url="http://ijbswa.sourceforge.net/config">http://ijbswa.sourceforge.net/config</ulink>.
228  <command>Privoxy's</command> configuration parameters  can also  be viewed at
229  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
230  This is an internal page.
231 </para>
232 </refsect1>
233
234
235 <!--   ~~~~~       New section      ~~~~~     -->
236 <refsect1><title>Sample Configuration</title>
237 <para>
238  A brief example of what a simple <filename>default.action</filename>
239  configuration might look like:
240 </para>
241
242 <literallayout>
243  # Define a few useful custom aliases for later use
244  {{alias}}
245
246  # Useful aliases
247  +prevent-cookies = +prevent-setting-cookies +prevent-reading-cookies
248  -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies
249  +imageblock      = +block +handle-as-image
250
251  # Fragile sites should have the minimum changes
252  fragile     = -block -deanimate-gifs -fast-redirects -filter \
253                -hide-referer -prevent-cookies -kill-popups
254
255  ## Turn some actions on ################################
256  { \
257  -add-header \
258  -block \
259  +deanimate-gifs{last} \
260  -downgrade-http-version \
261  -fast-redirects \
262  +filter{html-annoyances} \
263  +filter{js-annoyances} \
264  +filter{content-cookies} \
265  +filter{webbugs} \
266  +filter{banners-by-size} \
267  +hide-forwarded-for-headers \
268  +hide-from-header{block} \
269  +hide-referrer{forge} \
270  -hide-user-agent \
271  -handle-as-image \
272  +set-image-blocker{pattern} \
273  -limit-connect \
274  +prevent-compression \
275  +session-cookies-only \
276  +prevent-reading-cookies \
277  +prevent-setting-cookies \
278  -kill-popups \
279  }
280  /   # Match all URLs
281  
282  # Block, and treat these URL patterns as if they were 'images'.
283  {+imageblock}
284   .ad.doubleclick.net
285   .a[0-9].yimg.com/(?:(?!/i/).)*$
286   ad.*.doubleclick.net
287
288  # Block any URLs that match these patterns
289  {+block}
290   ad*.
291   .*ads.
292   banner?.
293   /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
294   /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|maino(kset|nta|s)?)/
295   .hitbox.com 
296
297  # Make exceptions for these harmless ones that would be 
298  # caught by +block above.
299  {-block}
300   adsl.
301   advice.
302   .*downloads.
303
304 </literallayout>
305
306 <para>
307  Then for a <filename>user.action</filename>, we would put local,
308  narrowly defined exceptions:
309 </para>
310
311 <literallayout>
312  # Set personal exceptions to the policies in default.action #######
313
314  # Sites where we want persistant cookies
315  {-prevent-reading-cookies -prevent-setting-cookies -session-cookies-only}
316   .redhat.com
317   .sun.com
318   .msdn.microsoft.com
319  
320  {-block -fast-redirects}
321   .forbes.com
322
323 </literallayout>
324
325 <para>
326  See the comments in the configuration files themselves, or the 
327  <citetitle>user-manual</citetitle>
328  for explanations of the above syntax, and other <command>Privoxy</command>
329  configuration options.
330 </para>
331
332 </refsect1>
333
334
335 <!--   ~~~~~       New section      ~~~~~     -->
336 <refsect1><title>Files</title>
337 <!-- this is a cheesy way to do this, but WTF. -->
338 <literallayout> 
339  <filename>/usr/sbin/privoxy</filename>
340  <filename>/etc/privoxy/config</filename>
341  <filename>/etc/privoxy/default.action</filename>
342  <filename>/etc/privoxy/standard.action</filename>
343  <filename>/etc/privoxy/user.action</filename>
344  <filename>/etc/privoxy/default.filter</filename>
345  <filename>/etc/privoxy/trust</filename>
346  <filename>/etc/privoxy/templates/*</filename>
347  <filename>/var/log/privoxy/logfile</filename>
348 </literallayout>
349
350 <para>
351  Various other files should be included, but may vary depending on platform
352  and build configuration. More documentation should be included in the local
353  documentation directory, though is not complete at this time.
354 </para>
355
356 </refsect1>
357
358
359 <!--   ~~~~~       New section      ~~~~~     -->
360 <refsect1><title>Signals</title>
361 <para>
362  <!-- command tag is used here to get proper looking format  -->
363  <command>Privoxy</command> terminates on the <command>SIGINT</command>,
364  <command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
365  rotation scripts may cause a re-opening of the logfile by sending a 
366  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
367  other daemons,  <command>Privoxy</command> does not need to be made aware of
368  config file changes by <command>SIGHUP</command> -- it will detect them
369  automatically. 
370 </para>
371
372 </refsect1>
373
374 <!--   ~~~~~       New section      ~~~~~     -->
375 <refsect1><title>Notes</title>
376 <![%p-not-stable;[
377 <para>
378  This is a &p-status; version of <command>Privoxy</command>. Not 
379  all features are well tested.
380 </para>]]>
381 <para>
382  Please see the <citetitle>user-manual</citetitle> on how to contact the
383  developers for feature requests, reporting problems, and other questions.
384 </para>
385
386 </refsect1>
387
388 <!--   ~~~~~       New section      ~~~~~     -->
389 <refsect1><title>See Also</title>
390 <!-- Include seealso.sgml boilerplate: -->
391  &seealso;
392 <!-- end boilerplate -->
393 </refsect1>
394
395 <!--   ~~~~~       New section      ~~~~~     -->
396 <refsect1><title>Development Team</title>
397 <!-- Include p-authors.sgml boilerplate: -->
398  &authors;
399 <!-- end boilerplate -->
400 </refsect1>
401
402 <!--   ~~~~~       New section      ~~~~~     -->
403 <refsect1><title>Copyright and License</title>
404
405 <refsect2><title>Copyright</title>
406 <!-- Include copyright.sgml boilerplate: -->
407  &copyright;
408 <!-- end boilerplate -->
409 </refsect2>
410
411 <refsect2><title>License</title>
412 <!-- Include license.sgml boilerplate: -->
413  &license;
414 <!-- end boilerplate -->
415 </refsect2>
416 </refsect1>
417
418 </refentry>