# Sample Configuration file for the Internet Junkbuster 2.9.x
#
-# $Id: config,v 1.19 2001/07/25 13:48:54 oes Exp $
+# $Id: config,v 1.20 2001/07/26 15:06:21 haroon Exp $
#
# Table of Contents
#
# Default: Multithreaded mode
#
-#single-threaded
+single-threaded
#
# 'toggle' allows you to temporarily disable all Junkbuster's
#
toggle 1
+#
+# For content filtering, i.e. the +filter and +deanimate-gif
+# actions, it is neccessary that Junkbuster buffers up the
+# whole document body. This can be potentially dangerous, since
+# a server could just keep sending data indefinitely and wait
+# for your RAM to exhaust.
+# The buffer-limit option lets you set the size in Kbytes that
+# each buffer may use at maximum. When the documents buffer
+# exceeds that size, it is flushed to the client unfiltered and
+# no further attempt to filter the rest of it is taken.
+# Remember that there may multiple threads running, which might
+# require up to buffer-limit Kbytes *each*, unless you have set
+# single-threaded below.
+#
+# Default: 4069, i.e. 4 MB
+#
+buffer-limit 4069
#############################################################################
# Access Control List
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.21 2001/09/16 17:10:43 jongfoster Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.22 2001/09/22 16:36:59 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.22 2001/09/22 16:36:59 jongfoster
+ * Removing unused parameter fs from read_config_line()
+ *
* Revision 1.21 2001/09/16 17:10:43 jongfoster
* Moving function savearg() here, since it was the only thing left in
* showargs.c.
#define hash_actions_file 1196306641ul /* "actionsfile" */
#define hash_admin_address 4112573064ul /* "admin-address" */
+#define hash_buffer_limit 1881726070ul /* "buffer-limit */
#define hash_confdir 1978389ul /* "confdir" */
#define hash_debug 78263ul /* "debug" */
#define hash_deny_access 1227333715ul /* "deny-access" */
config->multi_threaded = 1;
config->hport = HADDR_PORT;
+ config->buffer_limit = 4096 * 1024;
if ((configfp = fopen(configfile, "r")) == NULL)
{
config->admin_address = strdup(arg);
continue;
+/****************************************************************************
+ * buffer-limit n
+ ****************************************************************************/
+ case hash_buffer_limit :
+ config->buffer_limit = (size_t) 1024 * atoi(arg);
+ continue;
+
/****************************************************************************
* confdir directory-name
****************************************************************************/