Stop advertising the show-version CGI page which no longer exists
[privoxy.git] / doc / source / user-manual.sgml
index 62cf7c6..52181a8 100644 (file)
 <!entity p-authors SYSTEM "p-authors.sgml">
 <!entity config SYSTEM "p-config.sgml">
 <!entity changelog SYSTEM "changelog.sgml">
-<!entity p-version "3.0.27">
-<!entity p-status "UNRELEASED">
+<!entity p-version "3.0.28">
+<!entity p-status "stable">
 <!entity % p-authors-formal "INCLUDE"> <!-- include additional text, etc  -->
-<!entity % p-not-stable "INCLUDE">
-<!entity % p-stable "IGNORE">
+<!entity % p-not-stable "IGNORE">
+<!entity % p-stable "INCLUDE">
 <!entity % p-text "IGNORE">        <!-- define we are not a text only doc -->
 <!entity % p-doc "INCLUDE">        <!-- and we are a formal doc           -->
 <!entity % p-readme "IGNORE">
@@ -53,7 +53,7 @@
  <subscript>
 <!-- Completely the wrong markup, but very little is allowed  -->
 <!-- in this part of an article. FIXME -->
- <link linkend="copyright">Copyright</link> &my-copy; 2001-2017 by
+ <link linkend="copyright">Copyright</link> &my-copy; 2001-2018 by
  <ulink url="https://www.privoxy.org/">Privoxy Developers</ulink>
  </subscript>
 </pubdate>
@@ -121,7 +121,8 @@ Hal.
 <para>
  Since this is a &p-status; version, not all new features are well tested. This
  documentation may be slightly out of sync as a result (especially with
- CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
+ <ulink url="https://www.privoxy.org/gitweb/?p=privoxy.git;a=summary">git sources</ulink>).
+ And there <emphasis>may be</emphasis> bugs, though hopefully
  not many!
 </para>
 ]]>
@@ -339,30 +340,155 @@ How to install the binary packages depends on your operating system:
 <sect2 id="installation-source"><title>Building from Source</title>
 
 <para>
- The most convenient way to obtain the <application>Privoxy</application> sources
- is to download the source tarball from our
- <ulink url="https://sourceforge.net/projects/ijbswa/files/Sources/">project download
- page</ulink>.
-</para>
-
-<para>
- If you like to live on the bleeding edge and are not afraid of using
- possibly unstable development versions, you can check out the up-to-the-minute
- version directly from <ulink url="https://sourceforge.net/p/ijbswa/code/?source=navbar">the
- CVS repository</ulink>.
-<!--
- deprecated...out of business.
- or simply download <ulink
- url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.bz2">the nightly CVS
- tarball.</ulink>
--->
+ The most convenient way to obtain the <application>Privoxy</application> source
+ code is to download the source tarball from our
+ <ulink url="https://sourceforge.net/projects/ijbswa/files/Sources/">
+    project download page</ulink>,
+ or you can get the up-to-the-minute, possibly unstable, development version from
+ <ulink url="https://www.privoxy.org/">https://www.privoxy.org/</ulink>.
 </para>
 
 <!-- include buildsource.sgml boilerplate: -->
 &buildsource;
 <!-- end boilerplate -->
 
+
+    <sect3 id="WINBUILD-CYGWIN"><title>Windows</title>
+
+    <sect4 id="WINBUILD-SETUP"><title>Setup</title>
+      <para>
+        Install the Cygwin utilities needed to build <application>Privoxy</application>.
+        If you have a 64 bit CPU (which most people do by now), get the
+        Cygwin setup-x86_64.exe program <ulink url="https://cygwin.com/setup-x86_64.exe">here</ulink>
+        (the .sig file is <ulink url="https://cygwin.com/setup-x86_64.exe.sig">here</ulink>).
+      </para>
+      <para>
+        Run the setup program and from View / Category select:
+      </para>
+      <screen>
+  Devel
+    autoconf 2.5
+    automake 1.15
+    binutils
+    cmake
+    gcc-core
+    gcc-g++
+    git
+    make
+    mingw64-i686-gcc-core
+    mingw64-i686-zlib
+  Editors
+    vim
+  Libs
+    libxslt: GNOME XSLT library (runtime)
+  Net
+    curl
+    openssh
+  Text
+    docbook-dssl
+    docbook-sgml31
+    docbook-utils
+    openjade
+  Utils
+    gnupg
+  Web
+    w3m
+</screen>
+
+      <para>
+        If you haven't already downloaded the Privoxy source code, get it now:
+      </para>
+      <screen>
+  mkdir &lt;root-dir>
+  cd &lt;root-dir>
+  git clone https://www.privoxy.org/git/privoxy.git
+</screen>
+
+      <para>
+        Get the source code (.zip or .tar.gz) for tidy from
+        <ulink url="https://github.com/htacg/tidy-html5/releases">
+                    https://github.com/htacg/tidy-html5/releases</ulink>,
+        unzip into &lt;root-dir> and build the software:
+      </para>
+      <screen>
+  cd &lt;root-dir>
+  cd tidy-html5-x.y.z/build/cmake
+  cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
+  make && make install
+</screen>
+
+      <para>
+        If you want to be able to make a Windows release package, get the NSIS .zip file from
+            <!-- FIXME:  which version(s) are known to work? -->
+        <ulink url="https://sourceforge.net/projects/nsis/files/NSIS%203/">
+                    https://sourceforge.net/projects/nsis/files/NSIS%203/</ulink>
+        and extract the NSIS directory to <literal>privoxy/windows</literal>.
+        Then edit the windows/GNUmakefile to set the location of the NSIS executable - eg:
+      </para>
+      <screen>
+# Path to NSIS
+MAKENSIS = ./nsis/makensis.exe
+</screen>
+
+      </sect4>
+
+      <sect4 id="WINBUILD-BUILD"><title>Build</title>
+
+      <para>
+        To build just the Privoxy executable and not the whole installation package, do:
+      </para>
+      <programlisting>
+  cd &lt;root-dir>/privoxy
+  ./windows/MYconfigure && make
+</programlisting>
+
+      <para>
+        Privoxy uses the <ulink url="https://en.wikipedia.org/wiki/GNU_build_system">GNU Autotools</ulink>
+        for building software, so the process is:
+      </para>
+      <programlisting>
+  $ autoheader              # creates config.h.in
+  $ autoconf                # uses config.h.in to create the configure shell script
+  $ ./configure [options]   # creates GNUmakefile
+  $ make        [options]   # builds the program
+</programlisting>
+
+      <para>
+        The usual <literal>configure</literal> options for building a native Windows application under cygwin are
+      </para>
+
+      <literallayout class="Monospaced">
+  --host=i686-w64-mingw32
+  --enable-mingw32
+  --enable-zlib
+  --enable-static-linking
+  --disable-pthread
+  --disable-dynamic-pcre
+</literallayout>
+
+      <para>
+        You can set the <literal>CFLAGS</literal> and <literal>LDFLAGS</literal> envars before
+        running <literal>configure</literal> to set compiler and linker flags.  For example:
+      </para>
+
+      <programlisting>
+  $ export CFLAGS="-O2"              # set gcc optimization level
+  $ export LDFLAGS="-Wl,--nxcompat"  # Enable DEP
+  $ ./configure --host=i686-w64-mingw32 --enable-mingw32  --enable-zlib \
+  >             --enable-static-linking --disable-pthread --disable-dynamic-pcre
+  $ make                             # build Privoxy
+</programlisting>
+
+      <para>
+        See the <ulink url="../developer-manual/newrelease.html#NEWRELEASE-WINDOWS">Developer's Manual</ulink>
+        for building a Windows release package.
+      </para>
+
+    </sect4>
+    </sect3>
 </sect2>
+
+
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect2 id="installation-keepupdated"><title>Keeping your Installation Up-to-Date</title>
 
@@ -1383,17 +1509,13 @@ for details.
 </para>
 
 <!-- Needs to be put in a table and colorized  -->
-<screen>
+<screen><!-- want the background color that goes with screen -->
  <msgtext>
  <bridgehead renderas="sect2">&nbsp;&nbsp;&nbsp;&nbsp;Privoxy Menu</bridgehead>
-
  <simplelist>
  <member>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-status">View & change the current configuration</ulink>
  </member>
- <member>
-  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-version">View the source code version numbers</ulink>
- </member>
  <member>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&squf;&nbsp;&nbsp;<ulink url="http://config.privoxy.org/show-request">View the request headers.</ulink>
  </member>
@@ -1450,9 +1572,9 @@ for details.
 <sect2 id="confoverview">
 <title>Configuration Files Overview</title>
 <para>
- For Unix, *BSD and Linux, all configuration files are located in
- <filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
AmigaOS these are all in the same directory as the
+ For Unix, *BSD and GNU/Linux, all configuration files are located in
+ <filename>/etc/privoxy/</filename> by default. For MS Windows and OS/2
+ these are all in the same directory as the
  <application>Privoxy</application> executable. <![%p-not-stable;[ The name
  and number of configuration files has changed from previous versions, and is
  subject to change as development progresses.]]>
@@ -1469,7 +1591,7 @@ for details.
   <listitem>
    <para>
      The <link linkend="config">main configuration file</link> is named <filename>config</filename>
-     on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
+     on GNU/Linux, Unix, BSD, and OS/2, and <filename>config.txt</filename>
      on Windows. This is a required file.
    </para>
   </listitem>
@@ -2943,7 +3065,7 @@ TAG:^User-Agent: RPM APT-HTTP/
 TAG:^User-Agent: fetch libfetch/
 TAG:^User-Agent: Ubuntu APT-HTTP/
 TAG:^User-Agent: MPlayer/
-    </screen>
+</screen>
 
      <screen>
 # Tag all requests with the Range header set
@@ -2958,7 +3080,7 @@ TAG:^User-Agent: MPlayer/
 # parts of multimedia files.
 {-filter -deanimate-gifs}
 TAG:^RANGE-REQUEST$
-    </screen>
+</screen>
 
      <screen>
 # Tag all requests with the client IP address
@@ -2972,7 +3094,7 @@ TAG:^RANGE-REQUEST$
 # Change forwarding settings for requests coming from address 10.0.0.1
 {+forward-override{forward-socks5 127.0.1.2:2222 .}}
 TAG:^IP-ADDRESS: 10\.0\.0\.1$
-     </screen>
+</screen>
   </listitem>
  </varlistentry>
 
@@ -3162,7 +3284,7 @@ new action
      <screen># Block the non-existent "Privacy-Violation:" client header
 { +crunch-client-header{Privacy-Violation:} }
 /
-    </screen>
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -3244,7 +3366,8 @@ new action
 {+hide-if-modified-since{-60} \
  +overwrite-last-modified{randomize} \
  +crunch-if-none-match}
-/   </screen>
+/
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -3391,7 +3514,8 @@ new action
   <listitem>
      <screen># Crunch server headers that try to prevent caching
 { +crunch-server-header{no-cache} }
-/   </screen>
+/
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -3532,6 +3656,76 @@ new action
 </variablelist>
 </sect3>
 
+
+<!--   ~~~~~       New section      ~~~~~     -->
+<sect3 renderas="sect4" id="delay-response">
+<title>delay-response</title>
+
+<variablelist>
+ <varlistentry>
+  <term>Typical use:</term>
+  <listitem>
+   <para>Delay responses to the client to reduce the load</para>
+  </listitem>
+ </varlistentry>
+
+ <varlistentry>
+  <term>Effect:</term>
+  <listitem>
+   <para>
+    Delays responses to the client by sending the response in ca. 10 byte chunks.
+   </para>
+  </listitem>
+ </varlistentry>
+
+ <varlistentry>
+  <term>Type:</term>
+  <!-- boolean, parameterized, Multi-value -->
+  <listitem>
+   <para>Parameterized.</para>
+  </listitem>
+ </varlistentry>
+
+ <varlistentry>
+  <term>Parameter:</term>
+  <listitem>
+   <para>
+    <quote>Number of milliseconds</quote>
+   </para>
+  </listitem>
+ </varlistentry>
+
+ <varlistentry>
+  <term>Notes:</term>
+  <listitem>
+   <para>
+    Sometimes when JavaScript code is used to fetch advertisements
+    it doesn't respect Privoxy's blocks and retries to fetch the
+    same resource again causing unnecessary load on the client.
+   </para>
+   <para>
+    This action delays responses to the client and can be combined
+    with <literal><link linkend="block">blocks</link></literal>
+    to slow down the JavaScript code, thus reducing
+    the load on the client.
+   </para>
+   <para>
+    When used without <literal><link linkend="block">blocks</link></literal>
+    the action can also be used to simulate a slow internet connection.
+   </para>
+  </listitem>
+ </varlistentry>
+
+ <varlistentry>
+  <term>Example usage:</term>
+  <listitem>
+      <screen>+delay-response{100}</screen>
+  </listitem>
+ </varlistentry>
+</variablelist>
+</sect3>
+
+
 <!--   ~~~~~       New section      ~~~~~     -->
 <sect3 renderas="sect4" id="downgrade-http-version">
 <title>downgrade-http-version</title>
@@ -4123,7 +4317,7 @@ new action
   <listitem>
      <screen>
 +force-text-mode
-     </screen>
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -4268,7 +4462,7 @@ new action
  -overwrite-last-modified     \
 }
 TAG:^User-Agent: fetch libfetch/2\.0$
-     </screen>
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -4344,7 +4538,7 @@ new action
 # but send an empty document instead of the usual HTML message.
 {+block{Blocked JavaScript} +handle-as-empty-document}
 example.org/.*\.js$
-     </screen>
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -4513,7 +4707,8 @@ new action
 {+hide-accept-language{en-ca} \
 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
 }
-/   </screen>
+/
+</screen>
   </listitem>
  </varlistentry>
 </variablelist>
@@ -5515,7 +5710,7 @@ example.org/xml-instance-that-is-delivered-as-html
 
 {+server-header-filter{xml-to-html}}
 example.org/instance-that-is-delivered-as-xml-but-is-not
-    </screen>
+</screen>
   </listitem>
  </varlistentry>
 
@@ -5986,7 +6181,7 @@ hal stop here
  +<link linkend="SET-IMAGE-BLOCKER">set-image-blocker{pattern}</link> \
 }
 / # Match all URLs
- </screen>
+</screen>
 
 <para>
  The default behavior is now set.
@@ -7853,17 +8048,6 @@ Requests</title>
   </blockquote>
  </listitem>
 
- <listitem>
-  <para>
-    Show the source code version numbers:
-  </para>
-  <blockquote>
-   <para>
-    <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
-   </para>
-  </blockquote>
- </listitem>
-
  <listitem>
   <para>
    Show the browser's request headers:
@@ -8252,7 +8436,8 @@ In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibut
  -server-header-filter{xml-to-html}
  -server-header-filter{html-to-xml}
  -session-cookies-only
- +set-image-blocker {pattern} </screen>
+ +set-image-blocker {pattern}
+</screen>
 
 <para>
  Notice the only difference here to the previous listing, is to