X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=project.h;h=4bf92a17afbac955b7165ca63c823ab2814d58de;hb=4620b87a27719adaa4a57c16569f6acf8b4df724;hp=fe3cfeec10aa95480f909f7fbaf9e1c3e8ac76ff;hpb=5cbdab89ea07a8a231e7b066017fe692f1dec236;p=privoxy.git diff --git a/project.h b/project.h index fe3cfeec..4bf92a17 100644 --- a/project.h +++ b/project.h @@ -1,7 +1,7 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.76 2006/08/14 08:25:19 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.81 2006/09/06 13:03:04 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -37,6 +37,30 @@ * * Revisions : * $Log: project.h,v $ + * Revision 1.81 2006/09/06 13:03:04 fabiankeil + * Respond with 400 and a short text message + * if the client tries to use Privoxy as FTP proxy. + * + * Revision 1.80 2006/09/06 10:43:32 fabiankeil + * Added config option enable-remote-http-toggle + * to specify if Privoxy should recognize special + * headers (currently only X-Filter) to change its + * behaviour. Disabled by default. + * + * Revision 1.79 2006/09/06 09:23:37 fabiankeil + * Make number of retries in case of forwarded-connect problems + * a config file option (forwarded-connect-retries) and use 0 as + * default. + * + * Revision 1.78 2006/08/31 16:25:06 fabiankeil + * Work around a buffer overflow that caused Privoxy to + * segfault if too many trusted referrers were used. Good + * enough for now, but should be replaced with a real + * solution after the next release. + * + * Revision 1.77 2006/08/21 12:50:51 david__schmidt + * Formatting cleanup + * * Revision 1.76 2006/08/14 08:25:19 fabiankeil * Split filter-headers{} into filter-client-headers{} * and filter-server-headers{}. @@ -633,7 +657,12 @@ typedef int jb_err; * load balancing. W3C's wwwlib uses 1K, so that should be * good enough for us, too. */ -#define HOSTENT_BUFFER_SIZE 1024 +/** + * XXX: Temporary doubled, for some configurations + * 1K is still too small and we didn't get the + * real fix ready for inclusion. + */ +#define HOSTENT_BUFFER_SIZE 2048 /** * Do not use. Originally this was so that you can @@ -1276,6 +1305,12 @@ struct block_spec struct block_spec *next; /**< Next entry in linked list */ }; +/** + * Arbitrary limit for the number of trusted referrers + * Privoxy can print in its blocking message. + */ +#define MAX_TRUSTED_REFERRERS 512 + #endif /* def FEATURE_TRUST */ @@ -1376,6 +1411,8 @@ struct access_control_list /** configuration_spec::feature_flags: Web-based toggle. */ #define RUNTIME_FEATURE_CGI_TOGGLE 2 +/** configuration_spec::feature_flags: HTTP-header-based toggle. */ +#define RUNTIME_FEATURE_HTTP_TOGGLE 4 /** * Data loaded from the configuration file. @@ -1396,6 +1433,7 @@ struct configuration_spec * * - RUNTIME_FEATURE_CGI_EDIT_ACTIONS * - RUNTIME_FEATURE_CGI_TOGGLE + * - RUNTIME_FEATURE_HTTP_TOGGLE */ unsigned feature_flags; @@ -1457,7 +1495,7 @@ struct configuration_spec struct list trust_info[1]; /** FIXME: DOCME: Document this. */ - struct url_spec *trust_list[64]; + struct url_spec *trust_list[MAX_TRUSTED_REFERRERS]; #endif /* def FEATURE_TRUST */ @@ -1471,6 +1509,9 @@ struct configuration_spec /** Information about parent proxies (forwarding). */ struct forward_spec *forward; + /** Number of retries in case a forwarded connection attempt fails */ + int forwarded_connect_retries; + /** All options from the config file, HTML-formatted. */ char *proxy_args; @@ -1551,6 +1592,10 @@ static const char CHEADER[] = static const char CFORBIDDEN[] = "HTTP/1.0 403 Connection not allowable\r\nX-Hint: If you read this message interactively, then you know why this happens ,-)\r\n\r\n"; +static const char FTP_RESPONSE[] = + "HTTP/1.0 400 Invalid header received from browser\r\n\r\nPrivoxy doesn't support FTP. Please fix your setup."; + + #ifdef __cplusplus } /* extern "C" */ #endif