Moving file version information to a separate CGI page.
[privoxy.git] / templates / show-status
index bfeaca9..2d3576d 100644 (file)
 ##########################################################
 #
-# CGI-Output template for the junkbuster.
+# Show-Status-CGI Output template for junkbuster 2.9.x
 #
-# Lines *starting* with '#' are ignored.
-# Symbols are enclosed in @ characters.
+# USING HTML TEMPLATES:
+# ---------------------
 #
-# Usable symbols in this file: 
-# redirect-url, version, home-page,
-# invocation-args, options, gateway-protocols
-# statistics,
+# Template files are written win plain HTML, with a few
+# additions:
+# 
+# - Lines that start with a '#' character like this one
+#   are ignored
 #
+# - Each item in the below list of exported symbols will
+#   be replaced by dynamically generated text, if they
+#   are enclosed in '@'-characters. E.g. The string @version@
+#   will be replaced by the version number of Junkbuster.
+#
+# - One special application of this is to make whole blocks
+#   of the HTML template disappear if the condition <name>
+#   is not given. Simply enclose the block between the two
+#   strings @if-<name>start and if-<name>-end@. The strings
+#   should be placed in HTML comments (<!-- -->), so the
+#   html structure won't be messed when the magic happens.
+#   
+# USABLE SYMBOLS IN THIS TEMPLATE:
+# --------------------------------
+#
+#  my-ip-addr:
+#    The IP-address that the client used to reach this proxy
+#  my-hostname:
+#    The hostname associated with my-ip-addr
+#  admin-address:
+#    The email address of the pxoxy's administrator, as configured
+#    in the config file
+#  default-cgi:
+#    The URL for the "main menu" builtin CGI of this proxy
+#  menu:
+#    List of <li> elements linking to the other available CGIs
+#  version:
+#    The version number of the proxy software
+#  code-status:
+#    The development status of the proxy software: "alpha", "beta",
+#    or "stable".
+#  homepage:
+#    The URL of the SourceForge ijbswa project, who maintains this
+#    software.
+#
+#  redirect-url:
+#    The URL to a script that will redirect to the junkbuster
+#    documentation for a given item  
+#  invocation:
+#    The command line with whitch junkbuster was invoked
+#  options:
+#    The options read from the configfile, linked to their
+#    explanations, plus warnings if parsing acl or forward
+#    statements produced errors.
+#  sourceversions:
+#    A HTML-formatted list of the individual source file cvs versions
+#  defines:
+#    A HTML-formatted list of all conditional #defines used when
+#    junkbuster was compiled
+#
+#  
+# CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
+# ------------------------------------------------------------------
+#
+#  unstable:
+#    This is an alpha or beta release of the proxy software
+#  have-proxy-info:
+#    A URL for online documentation about this proxy has been
+#    specified and is available through the "proxy-info-url"
+#    symbol
+#  statistics:
+#    Junkbuster was compiled with statistics support
+#  have-stats:
+#    There have been previous requests and statistics have
+#    been collected. In this case, the following symbols
+#    are available:
+#    requests-received:
+#      The number of requests received so far
+#    requests-blocked:
+#      The number of request blocked so far
+#    percent-blocked:
+#      The percentage of blocked requests
+#  have-no-stats:
+#    There haven't any statistics been collected yet
+#  pcrs-support:
+#    Junkbuster was compiled with pcrs support
+#  trust-support:
+#    Junkbuster was compiled with trust support
+#  actions-filename:
+#    The path to the actions file.
+#  re-filter-filename:
+#    The path to the re_filter file. Only available if
+#    pcrs-support is set
+#  trust-filename:
+#    The path to the trust file.Only available if
+#    trust-support is set
 <html>
 
 <head>
-  <title>Internet Junkbuster Status</title>
+  <title>Junkbuster@@my-hostname@: Proxy Status</title>
+  <style type="text/css">
+    BODY, P, H1, H2, UL, OL, LI { font-family: Helvetica, Helv, Arial, Sans-Serif, sans-serif }
+  </style>
 </head>
 
 <body bgcolor="#ffffff">
 
-  <h1>Internet J<small>UNK<i><font color="red">BUSTER</font></i></small>
-      version @version@ <a href="@redirect-url@faq#show">Proxy Status</a></h1>
-
-  <p>Homepage: <a href="@home-page@">@home-page@</a></p>
-
-  <h2>The program was invoked as follows</h2>
-  @invocation-args@<br>
+  <table cellpadding=20 cellspacing=10 border=0 width=100%>
+    <tr>
+      <td bgcolor=#dddddd>
+        <p><font size=+2><b>This is the Internet J</b></font><font size=+1><b>UNK<i></font><font color="red">BUSTER</font></i></b>
+          <font size=+2><b>@version@ on @my-hostname@ (@my-ip-address@), port @my-port@</b></font></p>
+      </td>
+    </tr>
 
-  <h2>And the following options were givem in the config file:</h2>
-  <BLINK>FIXME: Which?</BLINK>
+<!-- @if-unstable-start -->
+# This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in
+    <tr>
+      <td bgcolor=#ffdddd>
+        <p><b>Please note that this is a <font color=red>@code-status@</font> release,
+          of the proxy software, not intended for production systems!
+          <br>Use at your own risk. See the <a href="http://www.gnu.org/copyleft/gpl.html">license</a> for details.</b>
+        </p>
 
-  @statistics@
+        <p>Feel free to <a href=mailto:ijbswa-developers@lists.sourceforge.net>mail the developers</a>
+          with any problems you might have
+        </p>
+      </td>
+    </tr>
+<!-- if-unstable-end@ -->
 
-  <h2>The following files are in use:</h2>
+    <tr>
+      <td bgcolor=#eeeeee>
+        <h2>The program was invoked as follows</h2>
+        <blockquote><p>@invocation@</p></blockquote>
+      </td>
+    </tr>
 
-  <!-- The block following this comment will magically disappear, #ifndef SPLIT_PROXY_ARGS -->
-  <!-- @magic-eliminator-start -->
+    <tr>
+      <td bgcolor=#eeeeee>
+        <h2>The following options were given in the config file:</h2>
+        <blockquote><p>@options@</p></blockquote>
+      </td>
+    </tr>
 
-  <p>(Click filenames to view)</p>
-  <ul>
-  <li>Actions List: <a href="show-status?file=permit">@actions-filename@</a></li>
+<!-- @if-statistics-start -->
+    <tr>
+      <td bgcolor=#eeeeee>
+        <h2>Blocking Statistics:</h2>
+        <blockquote>
+<!-- @if-have-stats-start -->
+        @requests-blocked@ out of @requests-received@ requests have been blocked,
+        which equals a block rate of @percent-blocked@%.
+<!-- if-have-stats-end@ -->
+<!-- @if-have-no-stats-start -->
+        There haven't been any requests so far.
+<!-- if-have-no-stats-end@ -->
+      </td>
+    </tr>
+<!-- if-statistics-end@ -->
 
-  <!-- @re-filter-killer-start -->
-  <li>Regex Filter List: <a href="show-status?file=re">@re-filter-filename@</a></li>
-  <!-- re-filter-killer-end@ -->
+    <tr>
+      <td bgcolor=#eeeeee>
+        <h2>The following files are in use:</h2>
+        <blockquote><p>Click a filename to browse</p></blockquote>
+        <ul>
+          <li>Actions List: <a href="show-status?file=permit">@actions-filename@</a></li>
+<!-- @if-pcrs-support-start -->
+          <li>Regex Filter List: <a href="show-status?file=re">@re-filter-filename@</a></li>
+<!-- if-pcrs-support-end@ -->
+<!-- @if-trust-support-start -->
+          <li>Trust List: <a href="show-status?file=trust">@trust-filename@</a></li>
+<!-- if-trust-support-end@ -->
+        </ul>
+      </td>
+    </tr>
 
-  <!-- @trust-killer-start -->
-  <li>Access Control List: <a href="show-status?file=trust">@trust-filename@</a></li>
-  <!-- trust-killer-end@ -->
+    <tr>
+      <td bgcolor=#eeeeee>
+        <h2>Conditional #defines:</h2>
+          <table border=1>
+          <tr> 
+            <th>#define</th> <th>Enabled?</th> <th>Effects when enabled</th>
+          </tr>
+          <tr>
+             <td><code>FEATURE_ACL</code></td>
+             <td>@if-FEATURE_ACL-then@ Yes @else-not-FEATURE_ACL@ No @endif-FEATURE_ACL@</td>
+             <td>Allows the use of an ACL to control access to the proxy by IP address.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_COOKIE_JAR</code></td>
+             <td>@if-FEATURE_COOKIE_JAR-then@ Yes @else-not-FEATURE_COOKIE_JAR@ No @endif-FEATURE_COOKIE_JAR@</td>
+             <td>Allows the use of a "cookie jar" file to capture cookies.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_DENY_GZIP</code></td>
+             <td>@if-FEATURE_DENY_GZIP-then@ Yes @else-not-FEATURE_DENY_GZIP@ No @endif-FEATURE_DENY_GZIP@</td>
+             <td>Prevents requests from being compressed.  This means that all 
+                 sites can be filtered through +filter and +no-popups, but it
+                 wastes bandwidth.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_FAST_REDIRECTS</code></td>
+             <td>@if-FEATURE_FAST_REDIRECTS-then@ Yes @else-not-FEATURE_FAST_REDIRECTS@ No @endif-FEATURE_FAST_REDIRECTS@</td>
+             <td>Allows the +fast-redirects action, to bypass redirect and logging scripts.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_FORCE_LOAD</code></td>
+             <td>@if-FEATURE_FORCE_LOAD-then@ Yes @else-not-FEATURE_FORCE_LOAD@ No @endif-FEATURE_FORCE_LOAD@</td>
+             <td>Allows bypassing all filtering for a single page using the prefix "<code>@FORCE_PREFIX@</code>".</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_IMAGE_BLOCKING</code></td>
+             <td>@if-FEATURE_IMAGE_BLOCKING-then@ Yes @else-not-FEATURE_IMAGE_BLOCKING@ No @endif-FEATURE_IMAGE_BLOCKING@</td>
+             <td>Allows the +image ation, to send "blocked" images instead of HTML.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_IMAGE_DETECT_MSIE</code></td>
+             <td>@if-FEATURE_IMAGE_DETECT_MSIE-then@ Yes @else-not-FEATURE_IMAGE_DETECT_MSIE@ No @endif-FEATURE_IMAGE_DETECT_MSIE@</td>
+             <td>Enables automatic detection of image and HTML requests from
+             Microsoft Internet Explorer users, overriding the setting of 
+             +image in the actions file.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_KILL_POPUPS</code></td>
+             <td>@if-FEATURE_KILL_POPUPS-then@ Yes @else-not-FEATURE_KILL_POPUPS@ No @endif-FEATURE_KILL_POPUPS@</td>
+             <td>Allows the +no-popups action, to block JavaScript popups.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_PTHREAD</code></td>
+             <td>@if-FEATURE_PTHREAD-then@ Yes @else-not-FEATURE_PTHREAD@ No @endif-FEATURE_PTHREAD@</td>
+             <td>Use POSIX threads rather than native threads</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_STATISTICS</code></td>
+             <td>@if-FEATURE_STATISTICS-then@ Yes @else-not-FEATURE_STATISTICS@ No @endif-FEATURE_STATISTICS@</td>
+             <td>Enables the statistics function.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_TOGGLE</code></td>
+             <td>@if-FEATURE_TOGGLE-then@ Yes @else-not-FEATURE_TOGGLE@ No @endif-FEATURE_TOGGLE@</td>
+             <td>Allow JunkBuster to be "disabled" so it is just a normal non-blocking non-anonymizing proxy.</td>
+          </tr>
+          <tr>
+             <td><code>FEATURE_TRUST</code></td>
+             <td>@if-FEATURE_TRUST-then@ Yes @else-not-FEATURE_TRUST@ No @endif-FEATURE_TRUST@</td>
+             <td>Allows the use of trust files.</td>
+          </tr>
+          <tr>
+             <td><code>REGEX_GNU</code></td>
+             <td>@if-REGEX_GNU-then@ Yes @else-not-REGEX_GNU@ No @endif-REGEX_GNU@</td>
+             <td rowspan="2">Changes the type of pattern matching done on URL paths.  PCRE is by far the best.
+             The old GNU style will slow down JunkBuster and increase the executable's size.  If both of
+             these are disabled, simple prefix matching is done, but this is very inflexible.</td>
+          </tr>
+          <tr>
+             <td><code>REGEX_PCRE</code></td>
+             <td>@if-REGEX_PCRE-then@ Yes @else-not-REGEX_PCRE@ No @endif-REGEX_PCRE@</td>
+          </tr>
+          <tr>
+             <td><code>STATIC_PCRE</code></td>
+             <td>@if-STATIC_PCRE-then@ Yes @else-not-STATIC_PCRE@ No @endif-STATIC_PCRE@</td>
+             <td>Use the supplied statically-linked PCRE library.  This is set automatically
+             by <code>./configure</code> if you do not have the libpcre installed.</td>
+          </tr>
+          <tr>
+             <td><code>STATIC_PCRS</code></td>
+             <td>@if-STATIC_PCRS-then@ Yes @else-not-STATIC_PCRS@ No @endif-STATIC_PCRS@</td>
+             <td>Use the supplied statically-linked PCRS library.  This is set automatically
+             by <code>./configure</code> if you do not have the libpcrs installed.</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
 
-  </ul>
-  <!-- magic-eliminator-end@ -->
-  <!-- The block above this comment will magically disappear, #ifndef SPLIT_PROXY_ARGS -->
+    <tr>
+      <td bgcolor=#dddddd>
+        <h2>More Junkbuster:</h2>
+        <ul>@menu@</ul>
+      </td>
+    </tr>
 
-  @clist@ @flist@ @alist@ @rlist@ @tlist@
+    <tr>
+      <td bgcolor=#dddddd>
+        <p>If you have any questions about this service,
 
-  @rcs-and-defines@
+<!-- @if-have-proxy-info-start -->
+          consult the <a href="@proxy-info-url@">online documentation</a> or
+<!-- if-have-proxy-info-end@ -->
 
-  <p>Please feel free to mail <a href=mailto:ijbswa-developers@lists.sourceforge.net>the developers</a>
-     with any problems you might have</p>
+          <a href=mailto:@admin-address@>send mail to <code>@admin-address@</code></a>
+          who will be glad to help you.
+        </p>
+      </td>
+    </tr>
 
+  </table>
 
-  
 </body>
 </html>