Document the --config-test option
[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.43 2012/03/18 15:41:49 fabiankeil Exp $
9
10  Copyright (C) 2001-2012 Privoxy Developers http://www.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 "3.0.20">
46 <!entity p-status "UNRELEASED">
47 <!entity % p-not-stable "INCLUDE">
48 <!entity % p-stable "IGNORE">
49 <!entity % p-text "IGNORE">           <!-- define we are not a text only doc -->
50 <!entity % p-authors-formal "IGNORE"> <!-- exclude additional formating      -->
51 <!entity my-copy "(C)">               <!-- db2man barfs on copyright symbol  -->
52 <!entity % seealso-extra "IGNORE">    <!-- for excluding sections of seealso -->
53 ]>
54
55 <refentry id="privoxy">
56 <refentryinfo>
57  <date>2012-11-08</date>
58 </refentryinfo>
59 <refmeta>
60  <refentrytitle>privoxy</refentrytitle>
61  <manvolnum>1</manvolnum>
62  <refmiscinfo>
63   Privoxy &p-version;<![%p-not-stable;[ &p-status;]]>
64  </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>--config-test</option></arg>
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><option>--chroot</option></arg>
82   <arg><option>--pre-chroot-nslookup </option><replaceable class="parameter">hostname</replaceable></arg>
83   <arg><replaceable class="parameter">configfile</replaceable></arg>
84  </cmdsynopsis>
85
86 </refsynopsisdiv>
87
88
89 <!--   ~~~~~       New section      ~~~~~     -->
90 <refsect1><title>Options</title>
91  <para>
92   <command>Privoxy</command> may be invoked with the following command line
93   options:
94  </para>
95
96  <variablelist>
97   <varlistentry>
98     <term>--config-test</term>
99       <listitem>
100        <para>
101          Exit after loading the configuration files before binding to
102          the listen address. The exit code signals whether or not the
103          configuration files have been successfully loaded.
104        </para>
105        <para>
106          If the exit code is 1, at least one of the configuration files
107          is invalid, if it is 0, all the configuration files have been
108          successfully loaded (but may still contain errors that can
109          currently only be detected at run time).
110         </para>
111        <para>
112          This option doesn't affect the log setting, combination with
113          "--no-daemon" is recommended if a configured log file shouldn't
114          be used.
115        </para>
116       </listitem>
117   </varlistentry>
118
119   <varlistentry>
120     <term>--help</term>
121       <listitem>
122        <para>
123          Print brief usage info and exit.
124         </para>
125       </listitem>
126   </varlistentry>
127
128   <varlistentry>
129     <term>--version</term>
130       <listitem>
131        <para>
132          Print version info and exit.
133         </para>
134       </listitem>
135   </varlistentry>
136
137   <varlistentry>
138     <term>--no-daemon</term>
139      <listitem>
140       <para>
141         Don't  become  a daemon, i.e. don't fork and become process group
142         leader, don't detach from controlling tty, and do all logging there.
143       </para>
144     </listitem>
145   </varlistentry>
146
147   <varlistentry>
148     <term>--pidfile <replaceable class="parameter">pidfile</replaceable></term>
149      <listitem>
150       <para>
151         On startup, write the process ID to <replaceable class="parameter">pidfile</replaceable>.
152         Delete the <replaceable class="parameter">pidfile</replaceable> on exit.
153         Failure to create or delete the <replaceable class="parameter">pidfile</replaceable>
154         is non-fatal. If no <command>--pidfile</command> option is given, no PID file will be used.
155       </para>
156     </listitem>
157   </varlistentry>
158
159   <varlistentry>
160     <term>--user <replaceable class="parameter">user[.group]</replaceable></term>
161      <listitem>
162       <para>
163        <!-- Note: replaceable is maybe the wrong tag, but generates  -->
164        <!-- correct looking man output.                              -->
165        After (optionally) writing the PID file, assume the user ID of
166        <replaceable class="parameter">user</replaceable> and the GID of
167        <replaceable class="parameter">group</replaceable>, or, if the optional
168        <replaceable class="parameter">group</replaceable> was not given, the default group of
169        <replaceable class="parameter">user</replaceable>. Exit if the privileges are not
170        sufficient to do so.
171      </para>
172     </listitem>
173   </varlistentry>
174   <varlistentry>
175     <term>--chroot</term>
176      <listitem>
177       <para>
178        Before changing to the user ID given in the --user option, chroot to
179        that user's home directory, i.e. make the kernel pretend to the
180        <command>Privoxy</command> process that the directory tree starts
181        there. If set up carefully, this can limit the impact of possible
182        vulnerabilities in <command>Privoxy</command> to the files contained in
183        that hierarchy.
184       </para>
185     </listitem>
186   </varlistentry>
187   <varlistentry>
188     <term>--pre-chroot-nslookup <replaceable class="parameter">hostname</replaceable></term>
189      <listitem>
190       <para>
191         Initialize the resolver library using <replaceable class="parameter">hostname</replaceable>
192         before chroot'ing. On some systems this reduces the number of files
193         that must be copied into the chroot tree.
194      </para>
195     </listitem>
196   </varlistentry>
197  </variablelist>
198
199  <para>
200   If the <filename>configfile</filename> is not specified on  the  command  line,
201   <command>Privoxy</command>  will  look for a file named
202   <filename>config</filename> in the current directory. If no
203   <filename>configfile</filename> is found, <command>Privoxy</command> will
204   fail to start.
205  </para>
206
207 </refsect1>
208
209
210 <!--   ~~~~~       New section      ~~~~~     -->
211 <refsect1><title>Description</title>
212 <!-- Include privoxy.sgml boilerplate: -->
213  &p-intro;
214 <!-- end boilerplate -->
215 </refsect1>
216
217
218 <!--   ~~~~~       New section      ~~~~~     -->
219 <refsect1><title>Installation and Usage</title>
220 <para>
221  Browsers can either be individually configured to use
222  <command>Privoxy</command> as a HTTP proxy (recommended),
223  or <command>Privoxy</command> can be combined with a packet
224  filter to build an intercepting proxy
225  (see <filename>config</filename>).  The default setting is  for
226  localhost,  on port  8118 (configurable in the main config file).  To set the
227  HTTP proxy in Firefox, go through: <command>Tools</command>;
228  <command>Options</command>; <command>General</command>;
229  <command>Connection Settings</command>;
230  <command>Manual Proxy Configuration</command>.
231 </para>
232 <para>
233  For Internet Explorer, go through: <command>Tools</command>;
234  <command>Internet Properties</command>; <command>Connections</command>;
235  <command>LAN Settings</command>.
236 </para>
237 <para>
238  The Secure (SSL) Proxy should also be set to the same values, otherwise
239  https: URLs will not be proxied. Note: <command>Privoxy</command> can only
240  proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
241  HTTPS presents some limitations, and not all features will work with HTTPS
242  connections.
243 </para>
244
245 <para>
246  For other browsers, check the documentation.
247 </para>
248 </refsect1>
249
250
251 <!--   ~~~~~       New section      ~~~~~     -->
252 <refsect1><title>Configuration</title>
253 <para>
254  <command>Privoxy</command> can be configured with the various configuration
255  files. The default configuration files are: <filename>config</filename>,
256  <filename>default.filter</filename>, <filename>default.action</filename> and
257  <filename>default.action</filename>. <filename>user.action</filename> should
258  be used for locally defined exceptions to the default rules in
259  <filename>match-all.action</filename> and <filename>default.action</filename>,
260  and <filename>user.filter</filename> for locally defined filters. These are
261  well commented.  On Unix and Unix-like systems, these are located in
262  <filename>/etc/privoxy/</filename> by default.
263 </para>
264 <para>
265  <command>Privoxy</command> uses the concept of <command>actions</command>
266  in order to manipulate the data stream between the browser and remote sites.
267  There are various actions available with specific functions for such things
268  as blocking web sites, managing cookies, etc. These actions can be invoked
269  individually or combined, and used against individual URLs, or groups of URLs
270  that can be defined using wildcards and regular expressions. The result is
271  that the user has greatly enhanced control and freedom.
272 </para>
273 <para>
274  The actions list (ad blocks, etc) can also be configured with your
275  web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
276  (assuming the configuration allows it).
277  <command>Privoxy's</command> configuration parameters  can also  be viewed at
278  the same page. In addition, <command>Privoxy</command> can be toggled on/off.
279  This is an internal page, and does not require Internet access.
280 </para>
281 <para>
282  See the <ulink
283  url="http://www.privoxy.org/user-manual/"><citetitle>User Manual</citetitle></ulink> for a detailed
284  explanation of installation, general usage, all configuration options, new
285  features and notes on upgrading.
286 </para>
287 </refsect1>
288
289
290
291 <!--   ~~~~~       New section      ~~~~~     -->
292 <refsect1><title>Files</title>
293 <!-- this is a cheesy way to do this, but WTF. -->
294 <literallayout>
295  <filename>/usr/sbin/privoxy</filename>
296  <filename>/etc/privoxy/config</filename>
297  <filename>/etc/privoxy/match-all.action</filename>
298  <filename>/etc/privoxy/default.action</filename>
299  <filename>/etc/privoxy/user.action</filename>
300  <filename>/etc/privoxy/default.filter</filename>
301  <filename>/etc/privoxy/user.filter</filename>
302  <filename>/etc/privoxy/trust</filename>
303  <filename>/etc/privoxy/templates/*</filename>
304  <filename>/var/log/privoxy/logfile</filename>
305 </literallayout>
306
307 <para>
308  Various other files should be included, but may vary depending on platform
309  and build configuration. Additional documentation should be included in the local
310  documentation directory.
311 </para>
312
313 </refsect1>
314
315
316 <!--   ~~~~~       New section      ~~~~~     -->
317 <refsect1><title>Signals</title>
318 <para>
319  <!-- command tag is used here to get proper looking format  -->
320  <command>Privoxy</command> terminates on the <command>SIGINT</command>
321  and <command>SIGTERM</command> signals. Log
322  rotation scripts may cause a re-opening of the logfile by sending a
323  <command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
324  other daemons,  <command>Privoxy</command> does not need to be made aware of
325  config file changes by <command>SIGHUP</command> -- it will detect them
326  automatically. Signals other than the ones listed above aren't explicitly
327  handled and result in the default action defined by the operating system.
328 </para>
329
330 </refsect1>
331
332 <!--   ~~~~~       New section      ~~~~~     -->
333 <refsect1><title>Notes</title>
334 <![%p-not-stable;[
335 <para>
336  This is a &p-status; version of <command>Privoxy</command>. Not
337  all features are well tested.
338 </para>]]>
339 <para>
340  Please see the <citetitle>User Manual</citetitle> on how to contact the
341  developers, for feature requests, reporting problems, and other questions.
342 </para>
343
344 </refsect1>
345
346 <!--   ~~~~~       New section      ~~~~~     -->
347 <refsect1><title>See Also</title>
348 <!-- Include seealso.sgml boilerplate: -->
349  &seealso;
350 <!-- end boilerplate -->
351 </refsect1>
352
353 <!--   ~~~~~       New section      ~~~~~     -->
354 <refsect1><title>Development Team</title>
355 <!-- Include p-authors.sgml boilerplate: -->
356  &authors;
357 <!-- end boilerplate -->
358 </refsect1>
359
360 <!--   ~~~~~       New section      ~~~~~     -->
361 <refsect1><title>Copyright and License</title>
362
363 <refsect2><title>Copyright</title>
364 <!-- Include copyright.sgml boilerplate: -->
365  &copyright;
366 <!-- end boilerplate -->
367 </refsect2>
368
369 <refsect2><title>License</title>
370 <!-- Include license.sgml boilerplate: -->
371  &license;
372 <!-- end boilerplate -->
373 </refsect2>
374 </refsect1>
375
376 </refentry>