diff -Naur current-orig/actionlist.h current/actionlist.h
--- current-orig/actionlist.h	2004-10-03 05:53:32.000000000 -0700
+++ current/actionlist.h	2005-06-24 01:49:42.000000000 -0700
@@ -118,6 +118,8 @@
 #define DEFINE_CGI_PARAM_NO_RADIO(name, bit, index, default_val)
 #endif /* ndef DEFINE_CGI_PARAM_RADIO */
 
+DEFINE_ACTION_MULTI      ("timed-block",                ACTION_MULTI_TIMED_BLOCK)
+  
 DEFINE_ACTION_MULTI      ("add-header",                 ACTION_MULTI_ADD_HEADER)
 DEFINE_ACTION_BOOL       ("block",                      ACTION_BLOCK)
 DEFINE_ACTION_BOOL       ("crunch-incoming-cookies",    ACTION_NO_COOKIE_SET)
diff -Naur current-orig/cgi.c current/cgi.c
--- current-orig/cgi.c	2004-02-17 05:30:23.000000000 -0800
+++ current/cgi.c	2005-06-24 02:04:38.000000000 -0700
@@ -715,7 +715,9 @@
       /* ..then the path will all be for us.  Remove leading '/' */
       path++;
    }
-   /* Or it's the host part CGI_SITE_2_HOST, and the path CGI_SITE_2_PATH */
+   /* Or it's the host part CGI_SITE_2_HOST, and the path CGI_SITE_2_PATH 
+		If config-address is specified in configuration file, we only honor
+		these URLs requested from the designated configuration host.*/
    else if ( ( (0 == strcmpic(host, CGI_SITE_2_HOST ))
             || (0 == strcmpic(host, CGI_SITE_2_HOST ".")) )
           && (0 == strncmpic(path, CGI_SITE_2_PATH, strlen(CGI_SITE_2_PATH))) )
@@ -817,6 +819,40 @@
    char *referrer;
    jb_err err;
 
+	/* If config-address is specified in configuration file, we only honor
+		the special magic URLs requested from the designated configuration host.
+	 */
+	if (!client_is_config_host(csp)
+		 ) { /* There is a configuration host specified, and the URL request
+				  is not from the designated host.
+				  We should generate a simple blocked page */
+
+	  if (NULL == (rsp = alloc_http_response())) {
+		 return cgi_error_memory();
+	  }
+	  
+	  memset(rsp, '\0', sizeof(*rsp));
+	  rsp->status = strdup("200 Request for blocked URL");
+	  rsp->head = strdup("Web Page Blocked\r\n"
+								"Content-Type: text/html\r\n"
+								"\r\n");
+	  rsp->body = strdup("<html>\r\n"
+								"<head><title>Web Page Blocked</title></head>\r\n"
+								"<body>\r\n"
+								"<h1><font color=\"#FFFFFF\">"
+								"<span style=\"background-color: #FF0000\">"
+								"BLOCKED</span></font></h1><p>\r\n"
+								"Configuration can only be done on designated config host.\r\n"
+								"</body>\r\n"
+								"</html>\r\n");
+	  rsp->head_length =
+		 strlen(rsp->head);
+	  rsp->content_length =
+		 strlen(rsp->body);
+
+	  return finish_http_response(rsp);
+	}
+	
    if (NULL == (path_copy = strdup(path)))
    {
       return cgi_error_memory();
@@ -2212,6 +2248,13 @@
       if (!err) err = map_block_killer(exports, "have-help-info");
    }
 
+	if (client_is_config_host(csp)) {
+	  if (!err) err = map_block_killer(exports, "noconfig-version");
+	}
+	else {
+	  if (!err) err = map_block_killer(exports, "config-version");
+	}
+	
    if (err)
    {
       free_map(exports);
@@ -2416,6 +2459,32 @@
 }
 
 
+/*********************************************************************
+ *
+ * Function    :  client_is_config_host
+ *
+ * Description :  Check to see if a client is allowed to do privoxy configuration
+ *                If config-address is specified, only designated client can
+ *                do configuration and is a config_host. Otherwise all clients
+ *                are config_host
+ *
+ * Parameters  :
+ *          1  :  csp -- client state
+ *
+ * Returns     :  true or false
+ *
+ *********************************************************************/
+int client_is_config_host(const struct client_state *csp)
+{
+  /* If config-address is specified in configfile. A host is a config one
+	  only if it has the specified IP address.
+	  If config-address is not specified, then all hosts are for config.*/
+  return (csp->config->caddr == NULL ||
+			 (csp->ip_addr_str != NULL &&
+			  strcmpic(csp->config->caddr, csp->ip_addr_str) == 0
+			  ));
+}
+
 /*
   Local Variables:
   tab-width: 3
diff -Naur current-orig/cgi.h current/cgi.h
--- current-orig/cgi.h	2004-02-17 05:30:23.000000000 -0800
+++ current/cgi.h	2005-06-24 01:57:25.000000000 -0700
@@ -246,6 +246,11 @@
 extern char *dump_map(const struct map *the_map);
 
 /*
+ * Check to see if client is designated config host.
+ */
+extern int client_is_config_host(const struct client_state *csp);
+
+/*
  * Ad replacement images
  */
 extern const char image_pattern_data[];
diff -Naur current-orig/config current/config
--- current-orig/config	2005-05-07 14:50:55.000000000 -0700
+++ current/config	2005-06-24 01:44:34.000000000 -0700
@@ -661,6 +661,14 @@
 #  
 listen-address  :8118
 
+# config-address: IP address of a specific host that is designated 
+# for web-based configuration. If specified, only this host can 
+# access config.privoxy.org. And only this host will get a regular 
+# "BLOCKED" status on a blocked image. Other hosts will get a 
+# simpler status page without references to config.privoxy.org
+
+config-address 192.168.1.2
+
 #  
 #  4.2. toggle
 #  ===========
diff -Naur current-orig/filters.c current/filters.c
--- current-orig/filters.c	2005-05-07 14:50:55.000000000 -0700
+++ current/filters.c	2005-06-24 02:11:44.000000000 -0700
@@ -443,6 +443,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <assert.h>
+#include <time.h>
 
 #ifndef _WIN32
 #ifndef __OS2__
@@ -718,14 +719,65 @@
 struct http_response *block_url(struct client_state *csp)
 {
    struct http_response *rsp;
+	int block_it = 0; // 1-- block, 2-- timed-block
 
    /*
     * If it's not blocked, don't block it ;-)
     */
-   if ((csp->action->flags & ACTION_BLOCK) == 0)
-   {
-      return NULL;
-   }
+   if (csp->action->flags & ACTION_BLOCK) {
+	  block_it = 1;
+   }	
+	
+	if (!block_it) { // check to see if it is timed-blocked.
+	  struct list_entry *lst;
+	  
+	  for (lst = csp->action->multi[ACTION_MULTI_TIMED_BLOCK]->first;
+			 lst ; lst = lst->next)
+		 {
+			int day1=0, h1=0, m1=0, s1=-1;
+			int day2=0, h2=0, m2=0, s2=-1;
+			int hms1, hms2;
+			sscanf(lst->str, "%d-%d_%d:%d:%d-%d:%d:%d",
+					  &day1, &day2,
+					  &h1, &m1, &s1, &h2, &m2, &s2);
+			if (s2 == -1) {
+			  log_error(LOG_LEVEL_ERROR, "timed_block parameter %s incorrects", lst->str);
+			  continue;
+			}
+			hms1 = (h1 * 10000) + (m1 * 100) + s1;
+			hms2 = (h2 * 10000) + (m2 * 100) + s2;
+#ifdef _WIN32
+			// FIXME -- WIN32 NOT SUPPORTED YET
+			break;
+#else
+			// UNIX/Linux platforms
+			{
+			  time_t t;
+			  struct tm *ts;
+			  int wday, hms;
+			  t = time(NULL);
+			  ts = localtime(&t);
+			  wday = ts->tm_wday;
+			  hms = (ts->tm_hour * 10000) + (ts->tm_min * 100) + ts->tm_sec;
+			  
+			  //log_error(LOG_LEVEL_ERROR, "timed_block parameter: %s", lst->str);
+			  //log_error(LOG_LEVEL_ERROR, "day1=%d hms1=%d day2=%d hms2=%d wday=%d hms=%d",
+			  //			day1, hms1, day2, hms2, wday, hms);
+			  
+			  if ((wday >= day1 && wday <= day2) &&
+					(hms >= hms1 && hms <= hms2)) {
+				 // Falls into block window
+				 block_it = 2;
+				 break;
+			  }
+			}
+#endif
+		 }
+	}
+	if (!block_it) {
+	  return NULL;
+	}
+	log_error(LOG_LEVEL_ERROR, "This URL is blocked #%d", block_it);
 
    /*
     * Else, prepare a response
diff -Naur current-orig/INSTALL current/INSTALL
--- current-orig/INSTALL	2004-01-30 15:35:38.000000000 -0800
+++ current/INSTALL	2005-06-24 02:51:08.000000000 -0700
@@ -37,6 +37,9 @@
 To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
 compiler like gcc are required.
 
+For RH9 box, the built-in autoconf 2.57-3 is outdated and does not work with
+the source. You will need to install version 2.59
+
 When building from a source tarball (either release version or nightly CVS
 tarball), first unpack the source:
 
diff -Naur current-orig/jbsockets.c current/jbsockets.c
--- current-orig/jbsockets.c	2005-05-07 14:50:55.000000000 -0700
+++ current/jbsockets.c	2005-06-24 01:51:32.000000000 -0700
@@ -749,7 +749,12 @@
 #endif
       if (host == NULL)
       {
-         log_error(LOG_LEVEL_ERROR, "Unable to get my own hostname: %E\n");
+			static int toReport = 1;
+			if (toReport)
+			{
+			   toReport = 0;
+				log_error(LOG_LEVEL_ERROR, "Unable to get my own hostname: %E\n");
+			}
       }
       else
       {
diff -Naur current-orig/loadcfg.c current/loadcfg.c
--- current-orig/loadcfg.c	2003-05-08 08:17:25.000000000 -0700
+++ current/loadcfg.c	2005-06-06 22:08:13.000000000 -0700
@@ -430,6 +430,7 @@
 #define hash_forward_socks4a           2639958518ul /* "forward-socks4a" */
 #define hash_jarfile                      2046641ul /* "jarfile" */
 #define hash_listen_address            1255650842ul /* "listen-address" */
+#define hash_config_address            4243287105ul /* "config-address" */
 #define hash_logdir                        422889ul /* "logdir" */
 #define hash_logfile                      2114766ul /* "logfile" */
 #define hash_permit_access             3587953268ul /* "permit-access" */
@@ -508,6 +509,9 @@
    freez(config->logdir);
 
    freez(config->haddr);
+	
+   freez(config->caddr);
+	
    freez(config->logfile);
 
    for (i = 0; i < MAX_ACTION_FILES; i++)
@@ -1113,6 +1117,14 @@
             continue;
 
 /* *************************************************************************
+ * config-address [ip]
+ * *************************************************************************/
+         case hash_config_address :
+            freez(config->caddr);
+            config->caddr = strdup(arg);
+            continue;
+
+/* *************************************************************************
  * logdir directory-name
  * *************************************************************************/
          case hash_logdir :
@@ -1396,6 +1408,7 @@
              */
             log_error(LOG_LEVEL_ERROR, "Ignoring unrecognized directive '%s' (%luul) in line %lu "
                   "in configuration file (%s).",  buf, hash_string(cmd), linenum, configfile);
+				//log_error(LOG_LEVEL_FATAL, "What??");
             string_append(&config->proxy_args,
                " <b><font color=\"red\">WARNING: unrecognized directive, ignored</font></b>");
             continue;
diff -Naur current-orig/project.h current/project.h
--- current-orig/project.h	2004-10-03 05:53:46.000000000 -0700
+++ current/project.h	2005-06-24 01:55:06.000000000 -0700
@@ -897,9 +897,16 @@
 #define ACTION_MULTI_WAFER          1
 /** Index into current_action_spec::multi[] for filters to apply. */
 #define ACTION_MULTI_FILTER         2
-/** Number of multi-string actions. */
-#define ACTION_MULTI_COUNT          3
 
+/** Block the request within specified time windows */
+/* timed-block followed by one or more time windows, each specified
+	as StartDay-EndDay_startHHMMSS-EndHHMMSS, inclusive.
+	Day is represented as 0 to 6 as Sunday to Saturday.
+	e.g. 1-5_08:00:00-17:00:00 means block Monday-Friday between 8am to 5pm */
+#define ACTION_MULTI_TIMED_BLOCK    3
+
+/** Number of multi-string actions. */
+#define ACTION_MULTI_COUNT          4
 
 /**
  * This structure contains a list of actions to apply to a URL.
@@ -1374,6 +1381,9 @@
    /** Port to bind to.  Defaults to HADDR_PORT == 8118. */
    int         hport;
 
+   /** Web based configuration host address. Default == NULL */
+   const char *caddr;
+
    /** Size limit for IOB */
    size_t buffer_limit;
 
diff -Naur current-orig/templates/blocked current/templates/blocked
--- current-orig/templates/blocked	2003-11-11 05:10:32.000000000 -0800
+++ current/templates/blocked	2005-06-07 22:20:58.000000000 -0700
@@ -84,6 +84,70 @@
 #    of blocked content. In that case, the symbol "force-prefix" is
 #    avaiable, which translates to the FORCE_PREFIX  
 #
+<!-- @if-noconfig-version-start -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+  <title>Request blocked (Privoxy@@my-hostname@)</title>
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <meta http-equiv="Content-Script-Type" content="text/javascript">
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+  <meta name="robots" content="noindex,nofollow">
+  <script type="text/javascript" language="javascript">
+  <!--
+    function isSmallFrame()
+    {
+       minWidth  = 400;
+       minHeight = 300;
+       if (window.innerWidth 
+           && (window.innerWidth >= minWidth) 
+           && (window.innerHeight >= minHeight))
+       {
+          return false;
+       }
+       else if (document.body && document.body.clientWidth 
+                && (document.body.clientWidth >= minWidth)
+                && (document.body.clientHeight >= minHeight))
+       {
+          return false;
+       }
+       return true;
+   }
+  //-->
+  </script>
+ </head>
+ <body>
+  <script type="text/javascript" language="javascript">
+  <!--
+  if (isSmallFrame())
+  {
+     document.write('\
+   <p class="small" align="center"> \
+   ***URL blocked*** \
+   </p> \
+   ');
+  }
+  else
+  {
+     document.write('\
+<h1><font color="#FFFFFF"> \
+<span style="background-color: #FF0000"> \
+BLOCKED</span></font></h1><p> \
+Your web page is blocked by the proxy. <p> \
+Either the page is not good,<br> \
+or you are not supposed to be online \
+playing games at this time.\
+     ');
+  }
+  //-->
+  </script>
+  <noscript>
+  </noscript>
+ </body>
+</html>
+<!-- if-noconfig-version-end@ -->
+
+<!-- @if-config-version-start -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
  <head>
@@ -270,3 +334,4 @@
 
  </body>
 </html>
+<!-- if-config-version-end@ -->
diff -Naur current-orig/templates/connect-failed current/templates/connect-failed
--- current-orig/templates/connect-failed	2002-08-24 13:52:22.000000000 -0700
+++ current/templates/connect-failed	2005-06-07 22:21:19.000000000 -0700
@@ -88,6 +88,8 @@
 <body>
 
   <table cellpadding="20" cellspacing="10" border="0" width="100%">
+
+<!-- @if-config-version-start -->
     <tr>
       <td class="status">
         503
@@ -109,6 +111,7 @@
       </td>
     </tr>
 <!-- if-unstable-end@ -->
+<!-- if-config-version-end@ -->
 
     <tr>
       <td class="warning" colspan=2>
@@ -122,6 +125,7 @@
       </td>
     </tr>
 
+<!-- @if-config-version-start -->
     <tr>
       <td class="box" colspan="2">
         <h2>More Privoxy:</h2>
@@ -152,6 +156,7 @@
         <p class="small">Valid <a href="http://validator.w3.org/">HTML 4.01 Strict</a></p>
       </td>
     </tr>
+<!-- if-config-version-end@ -->
     
   </table>
 
diff -Naur current-orig/templates/edit-actions-for-url current/templates/edit-actions-for-url
--- current-orig/templates/edit-actions-for-url	2004-10-04 20:17:26.000000000 -0700
+++ current/templates/edit-actions-for-url	2005-06-24 02:17:02.000000000 -0700
@@ -466,6 +466,20 @@
       <td>Block the request</td>
     </tr>
     <tr class="bg1" align="left" valign="top">
+      <td class="en1">&nbsp;</td>
+      <td class="dis1">&nbsp;</td>
+      <td class="noc1">&nbsp;</td>
+      <td>timed-block</td>
+      <td>timed-block followed by one or more time windows, each specified
+	as StartDay-EndDay_startHHMMSS-EndHHMMSS, inclusive.
+	Day is represented as 0 to 6 as Sunday to Saturday.
+	e.g. 1-5_08:00:00-17:00:00 means block Monday-Friday between 8am to 5pm.
+        <br>
+        Editing the settings for this timed-block option, or turning
+        it on if it was off, is not yet supported using this web-based
+        editor.</td>
+    </tr>
+    <tr class="bg1" align="left" valign="top">
       <td class="en1" align="center" valign="middle"><input type="radio"
         name="crunch_incoming_cookies" value="Y" @crunch-incoming-cookies-y@
         ></td>
diff -Naur current-orig/templates/no-such-domain current/templates/no-such-domain
--- current-orig/templates/no-such-domain	2002-08-24 13:52:22.000000000 -0700
+++ current/templates/no-such-domain	2005-06-07 22:20:08.000000000 -0700
@@ -90,6 +90,8 @@
 <body>
 
   <table cellpadding="20" cellspacing="10" border="0" width="100%">
+
+<!-- @if-config-version-start -->
     <tr>
       <td class="status">
         404
@@ -111,6 +113,7 @@
       </td>
     </tr>
 <!-- if-unstable-end@ -->
+<!-- if-config-version-end@ -->
 
     <tr>
       <td class="warning" colspan="2">
@@ -124,6 +127,7 @@
       </td>
     </tr>
 
+<!-- @if-config-version-start -->
     <tr>
       <td class="box" colspan="2">
         <h2>More Privoxy:</h2>
@@ -148,12 +152,14 @@
       </td>
     </tr>
 <!-- if-have-help-info-end@ -->
-    
+
     <tr>
       <td colspan="2">
         <p class="small">Valid <a href="http://validator.w3.org/">HTML 4.01 Strict</a></p>
       </td>
     </tr>
+<!-- if-config-version-end@ -->
+
   </table>
 
 </body>
diff -Naur current-orig/templates/untrusted current/templates/untrusted
--- current-orig/templates/untrusted	2002-08-22 19:22:54.000000000 -0700
+++ current/templates/untrusted	2005-06-07 22:21:39.000000000 -0700
@@ -99,6 +99,8 @@
 <body>
 
   <table cellpadding="20" cellspacing="10" border="0" width="100%">
+
+<!-- @if-config-version-start -->
     <tr>
       <td class="status">
         UNTRUSTED
@@ -120,6 +122,7 @@
       </td>
     </tr>
 <!-- if-unstable-end@ -->
+<!-- if-config-version-end@ -->
 
     <tr>
       <td class="warning" colspan="2">
@@ -157,6 +160,7 @@
     </tr>
 <!-- if-have-trust-info-end@ -->
 
+<!-- @if-config-version-start -->
     <tr>
       <td class="box" colspan="2">
         <h2>More Privoxy:</h2>
@@ -187,6 +191,7 @@
         <p class="small">Valid <a href="http://validator.w3.org/">HTML 4.01 Strict</a></p>
       </td>
     </tr>
+<!-- if-config-version-end@ -->
 
   </table>
 
diff -Naur current-orig/user.action current/user.action
--- current-orig/user.action	2004-01-30 08:48:26.000000000 -0800
+++ current/user.action	2005-06-24 01:47:50.000000000 -0700
@@ -57,19 +57,6 @@
 # Allow ads for selected useful free sites:
 #
 allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
-
-## end aliases ########################################################
-#######################################################################
-
-# Begin examples: #####################################################
-
-# Say you have accounts on some sites that you visit regularly, and you
-# don't want to have to log in manually each time. So you'd like to allow
-# persistent cookies for these sites. The allow-all-cookies alias defined
-# above does exactly that, i.e. it disables crunching of cookies in any
-# direction, and the processing of cookies to make them only temporary.
-#
-{ allow-all-cookies }
 #.sourceforge.net
 #sunsolve.sun.com
 #slashdot.org
@@ -153,6 +140,38 @@
 # patterns:
 #
 { +set-image-blocker{blank} }
-#/
+{+timed-block{1-5_00:00:00-08:30:00} \
+ +timed-block{1-5_17:00:00-23:59:59} \
+ +timed-block{0-0_00:00:00-08:30:00} \
+ +timed-block{6-6_00:00:00-08:30:00} \
+}
+.slimeathlete.com
+.runescape.com
+.crayola.com
+.battleon.com
+.cartoonnetwork.com
 
+#x/
 ## set vi:nowrap tw=72
+{+block \
+}
+.3pic.com
+.gogogo.com
+.girls.com
+## end aliases ########################################################
+#######################################################################
+# Begin examples: #####################################################
+# Say you have accounts on some sites that you visit regularly, and you
+# don't want to have to log in manually each time. So you'd like to allow
+# persistent cookies for these sites. The allow-all-cookies alias defined
+# above does exactly that, i.e. it disables crunching of cookies in any
+# direction, and the processing of cookies to make them only temporary.
+#
+{-crunch-incoming-cookies \
+ -crunch-outgoing-cookies \
+ -fast-redirects \
+ -filter{content-cookies} \
+ -session-cookies-only \
+}
+.pcc.edu
+.yahoo.com
